com.codemesh.terp.eval.converters
Class ToJar
java.lang.Object
com.codemesh.terp.eval.converters.ToJar
- All Implemented Interfaces:
- Converter<JarExecutor>
public class ToJar
- extends java.lang.Object
- implements Converter<JarExecutor>
A converter for jar tool executors.
This converter is registered with the terp runtime under the
^jar() alias.
|
Constructor Summary |
ToJar()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TO_VERSION
protected static final ToVersion TO_VERSION
TO_FILE
protected static final ToFile TO_FILE
ToJar
public ToJar()
fromObject
public JarExecutor fromObject(java.lang.Object obj,
TerpContext ctx)
- Converts the given object into an object of the target type.
Conversions can be implemented in any way that makes sense.
Normally, converters will return null for null, but some converters
may choose to interpret null as an indicator to return a
default-initialized target object. An example of this type
of conversion is the ShellExecutor. null simply indicates that
no preference overrides of any kind have been provided.
- Specified by:
fromObject in interface Converter<JarExecutor>
- Parameters:
obj - the source object.ctx - the context in which the conversion takes place.
- Returns:
- an instance of the target type or null.
fromString
public JarExecutor fromString(java.lang.String java)
fromFile
public JarExecutor fromFile(java.io.File java)
fromVersion
public JarExecutor fromVersion(Version vers)
fromMap
public JarExecutor fromMap(java.util.Map map)
fromMap
public JarExecutor fromMap(JarExecutor result,
java.util.Map map)
Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.