|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoscript.data.JavaBridge.FunctionTransformer
This abstract class is implemented by transformers that understand how to transform a script object (function) to a certain type of java class. For example, this can be used to register a tranformer that can make a wrapper that implements Runnable, or ActionListener. This way script code can simply pass a script function to java code that expects to take a, for example, ActionListener.
Constructor Summary | |
JavaBridge.FunctionTransformer(java.lang.Class targetClass)
Class Constructor |
Method Summary | |
java.lang.Class |
getTargetClass()
Get the type of the class that this tranformer understands how to transform to. |
abstract java.lang.Object |
transform(Value fxn)
Perform the transform, and return a java object that is an instance of the class returned by getTargetClass() . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JavaBridge.FunctionTransformer(java.lang.Class targetClass)
targetClass
- the class to tranfrom script object toMethod Detail |
public java.lang.Class getTargetClass()
public abstract java.lang.Object transform(Value fxn)
getTargetClass()
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |