terp - the Codemesh Modular
Template Interpreter v1.3.304

com.codemesh.terp.eval.converters
Class ToJre

java.lang.Object
  extended by com.codemesh.terp.eval.converters.ToJre
All Implemented Interfaces:
Converter<Jre>

public class ToJre
extends java.lang.Object
implements Converter<Jre>

A converter for Java Runtime Environments. This converter is registered with the terp runtime under the ^jre() alias.


Field Summary
protected static ToFile TO_FILE
           
protected static ToVersion TO_VERSION
           
 
Constructor Summary
ToJre()
           
 
Method Summary
 Jre fromFile(java.io.File jre)
           
 Jre fromMap(java.util.Map<java.lang.String,java.lang.Object> map)
           
 Jre fromObject(java.lang.Object obj, TerpContext ctx)
          Converts the given object into an object of the target type.
 Jre fromString(java.lang.String jre)
           
 Jre fromVersion(Version vers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TO_VERSION

protected static final ToVersion TO_VERSION

TO_FILE

protected static final ToFile TO_FILE
Constructor Detail

ToJre

public ToJre()
Method Detail

fromObject

public Jre 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<Jre>
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 Jre fromString(java.lang.String jre)

fromFile

public Jre fromFile(java.io.File jre)

fromVersion

public Jre fromVersion(Version vers)

fromMap

public Jre fromMap(java.util.Map<java.lang.String,java.lang.Object> map)

terp - the Codemesh Modular
Template Interpreter v1.3.304

Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.