|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.storm.DynEnv
Class for wrapping and unwrapping values send and recived via DynamicObject
| Constructor Summary | |
DynEnv()
|
|
| Method Summary | |
int |
checkBound(int value,
int min_bound)
|
abstract int |
checkBound(int value,
int min_bound,
int max_bound)
Ensure integer returned by toInt belongs [min_bound, max_bound]. |
String |
fuseArgsToString(Object[] args)
Concatenate all string presentations of `args' elements into one string. |
abstract Object |
getRawObject(Object[] args,
int index)
|
abstract Scripter |
getScripter()
|
static DynEnv |
getScriptlessEnv()
|
abstract int |
nativeIndexTest(Object object)
Test whether object can be used to index native arrays. |
Object |
onNotImplemented()
|
abstract boolean |
toBoolean(Object obj)
Unwrap dynamic argument to boolean value |
boolean |
toBoolean(Object[] args,
int index)
Unwrap dynamic argument from function agrument list at the given 'index' to single boolean value |
abstract double |
toDouble(Object obj)
Unwrap dynamic argument to double value. |
double |
toDouble(Object[] args,
int index)
|
abstract int |
toInt(Object obj)
Unwrap dynamic argument to int value. |
int |
toInt(Object[] args,
int index)
|
abstract long |
toLong(Object obj)
Unwrap dynamic argument to long value. |
long |
toLong(Object[] args,
int index)
|
abstract Object |
toNative(Object obj)
Unwrap dynamic argument to a general java object |
Object |
toNative(Object[] args,
int index)
|
abstract long |
toPossibleInt(Object obj)
Unwrap dynamic argument to int value. |
short |
toShort(Object obj)
|
short |
toShort(Object[] args,
int index)
|
abstract String |
toStr(Object obj)
Unwrap dynamic argument to its string presentation |
String |
toStr(Object[] args,
int index)
|
Object |
wrapBoolean(boolean value)
Wrap boolean to Object |
abstract Object |
wrapDouble(double value)
Wrap double to Object |
Object |
wrapDoubleOrString(String value)
If 'value' is string representation of double number, return wrapper for that number, otherwise return value |
abstract Object |
wrapDynamic(DynamicObject dynamic)
|
abstract Object |
wrapEventHandler(DynamicObject target,
Object handler)
To return wrapper for event handler |
abstract RuntimeException |
wrapException(Exception ex)
Wrap int to Object |
abstract Object |
wrapGeneralObject(Object obj)
|
abstract Integer |
wrapInt(int value)
Wrap int to Object |
abstract Object |
wrapLong(long value)
Wrap long to Object |
abstract Object |
wrapMethod(DynamicObject dynamic,
String methodName)
To return function wrapper to indicate that field is a method in reality |
Object |
wrapStr(String str)
|
abstract Object |
wrapVoid()
To indicate that method does not have return value |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DynEnv()
| Method Detail |
public static DynEnv getScriptlessEnv()
public abstract Scripter getScripter()
public Object onNotImplemented()
public abstract RuntimeException wrapException(Exception ex)
public abstract Integer wrapInt(int value)
public abstract Object wrapLong(long value)
public abstract Object wrapDouble(double value)
public Object wrapDoubleOrString(String value)
public Object wrapBoolean(boolean value)
public abstract Object wrapMethod(DynamicObject dynamic,
String methodName)
public Object wrapStr(String str)
public abstract Object wrapDynamic(DynamicObject dynamic)
public abstract Object wrapGeneralObject(Object obj)
public abstract Object wrapVoid()
public abstract Object wrapEventHandler(DynamicObject target,
Object handler)
public abstract boolean toBoolean(Object obj)
RuntimeException - if convertion is not possiblepublic abstract double toDouble(Object obj)
RuntimeException - if convertion is not possiblepublic abstract int toInt(Object obj)
RuntimeException - if convertion is not possiblepublic abstract long toPossibleInt(Object obj)
public abstract int checkBound(int value,
int min_bound,
int max_bound)
public final int checkBound(int value,
int min_bound)
public final short toShort(Object obj)
public abstract long toLong(Object obj)
RuntimeException - if convertion is not possiblepublic abstract String toStr(Object obj)
RuntimeException - if convertion is not possiblepublic abstract Object toNative(Object obj)
RuntimeException - if convertion is not possible
public boolean toBoolean(Object[] args,
int index)
RuntimeException - if convertion is not possible
public double toDouble(Object[] args,
int index)
public int toInt(Object[] args,
int index)
public final short toShort(Object[] args,
int index)
public long toLong(Object[] args,
int index)
public String toStr(Object[] args,
int index)
public Object toNative(Object[] args,
int index)
public abstract Object getRawObject(Object[] args,
int index)
public abstract int nativeIndexTest(Object object)
public String fuseArgsToString(Object[] args)
RuntimeException - if convertion is not possible
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||