proj_name
stringclasses 131
values | relative_path
stringlengths 30
228
| class_name
stringlengths 1
68
| func_name
stringlengths 1
48
| masked_class
stringlengths 78
9.82k
| func_body
stringlengths 46
9.61k
| len_input
int64 29
2.01k
| len_output
int64 14
1.94k
| total
int64 55
2.05k
| relevant_context
stringlengths 0
38.4k
|
|---|---|---|---|---|---|---|---|---|---|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/string/StringSplitFunction.java
|
StringSplitFunction
|
call
|
class StringSplitFunction extends AbstractFunction {
private static final long serialVersionUID = -8513586590310490323L;
@Override
public String getName() {
return "string.split";
}
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1, AviatorObject arg2,
AviatorObject arg3) {<FILL_FUNCTION_BODY>}
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1, AviatorObject arg2) {
String target = FunctionUtils.getStringValue(arg1, env);
if (target == null)
throw new ExpressionRuntimeException("Could not replace with null string");
String regex = FunctionUtils.getStringValue(arg2, env);
return AviatorRuntimeJavaType.valueOf(target.split(regex));
}
}
|
String target = FunctionUtils.getStringValue(arg1, env);
if (target == null)
throw new ExpressionRuntimeException("Could not split with null string");
String regex = FunctionUtils.getStringValue(arg2, env);
int limit = FunctionUtils.getNumberValue(arg3, env).intValue();
return AviatorRuntimeJavaType.valueOf(target.split(regex, limit));
| 244
| 100
| 344
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/string/StringStartsWithFunction.java
|
StringStartsWithFunction
|
call
|
class StringStartsWithFunction extends AbstractFunction {
private static final long serialVersionUID = 1529665864351661711L;
@Override
public String getName() {
return "string.startsWith";
}
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1, AviatorObject arg2) {<FILL_FUNCTION_BODY>}
}
|
String target = FunctionUtils.getStringValue(arg1, env);
String param = FunctionUtils.getStringValue(arg2, env);
return target.startsWith(param) ? AviatorBoolean.TRUE : AviatorBoolean.FALSE;
| 123
| 62
| 185
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/string/StringSubStringFunction.java
|
StringSubStringFunction
|
call
|
class StringSubStringFunction extends AbstractFunction {
private static final long serialVersionUID = -5815382413034383204L;
@Override
public String getName() {
return "string.substring";
}
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1, AviatorObject arg2,
AviatorObject arg3) {
String target = FunctionUtils.getStringValue(arg1, env);
Number beginIndex = FunctionUtils.getNumberValue(arg2, env);
Number endIndex = FunctionUtils.getNumberValue(arg3, env);
return new AviatorString(target.substring(beginIndex.intValue(), endIndex.intValue()));
}
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1, AviatorObject arg2) {<FILL_FUNCTION_BODY>}
}
|
String target = FunctionUtils.getStringValue(arg1, env);
Number beginIndex = FunctionUtils.getNumberValue(arg2, env);
return new AviatorString(target.substring(beginIndex.intValue()));
| 252
| 59
| 311
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/AbstractMinMaxFunction.java
|
AbstractMinMaxFunction
|
compare
|
class AbstractMinMaxFunction extends AbstractVariadicFunction {
private static final long serialVersionUID = -2554658421948407347L;
static enum Op {
Min, Max
}
@Override
public AviatorObject variadicCall(final Map<String, Object> env, final AviatorObject... args) {
if (args == null || args.length == 0) {
return AviatorNil.NIL;
}
boolean wasFirst = true;
AviatorObject result = AviatorNil.NIL;
for (AviatorObject obj : args) {
result = compareObjects(env, result, obj, wasFirst);
if (wasFirst) {
wasFirst = false;
}
if (getOp() == Op.Min && result.isNull(env)) {
break;
}
}
return result;
}
protected abstract Op getOp();
private AviatorObject compareObjects(final Map<String, Object> env, AviatorObject result,
final AviatorObject obj, final boolean wasFirst) {
if (obj.isNull(env)) {
switch (getOp()) {
case Min:
return obj;
case Max:
return result;
}
}
if (wasFirst || compare(env, result, obj)) {
result = obj;
}
return result;
}
private boolean compare(final Map<String, Object> env, final AviatorObject result,
final AviatorObject obj) {<FILL_FUNCTION_BODY>}
}
|
int c = obj.compare(result, env);
switch (getOp()) {
case Min:
return c < 0;
case Max:
return c > 0;
}
return false;
| 418
| 56
| 474
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public transient abstract com.googlecode.aviator.runtime.type.AviatorObject variadicCall(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject[]) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/AssertFunction.java
|
AssertFailed
|
call
|
class AssertFailed extends RuntimeException {
private static final long serialVersionUID = 1L;
public AssertFailed() {
super();
}
public AssertFailed(final String message, final Throwable cause,
final boolean enableSuppression, final boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
public AssertFailed(final String message, final Throwable cause) {
super(message, cause);
}
public AssertFailed(final String message) {
super(message);
}
public AssertFailed(final Throwable cause) {
super(cause);
}
}
@Override
public String getName() {
return "assert";
}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1) {
boolean result = (boolean) arg1.getValue(env);
if (!result) {
throw new AssertFailed();
}
return AviatorNil.NIL;
}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1,
final AviatorObject arg2) {<FILL_FUNCTION_BODY>
|
boolean result = (boolean) arg1.getValue(env);
if (!result) {
throw new AssertFailed(FunctionUtils.getStringValue(arg2, env));
}
return AviatorNil.NIL;
| 320
| 58
| 378
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/BigIntFunction.java
|
BigIntFunction
|
call
|
class BigIntFunction extends AbstractFunction {
private static final long serialVersionUID = 820173052464302490L;
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1) {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return "bigint";
}
}
|
switch (arg1.getAviatorType()) {
case Boolean:
return AviatorBigInt.valueOf(arg1.booleanValue(env) ? BigInteger.ONE : BigInteger.ZERO);
case JavaType:
Object obj = arg1.getValue(env);
if (obj instanceof Number) {
return AviatorBigInt.valueOf(new BigInteger(String.valueOf(obj)));
} else if (obj instanceof String) {
return AviatorBigInt.valueOf(new BigInteger((String) obj));
} else if (obj instanceof Character) {
return AviatorBigInt.valueOf(new BigInteger(String.valueOf(obj)));
} else {
throw new ClassCastException("Could not cast " + obj.getClass().getName() + " to bigint");
}
case String:
return AviatorBigInt.valueOf(new BigInteger((String) arg1.getValue(env)));
case BigInt:
case Decimal:
case Long:
case Double:
return AviatorBigInt.valueOf(((AviatorNumber) arg1).toBigInt());
default:
throw new ClassCastException("Could not cast " + arg1 + " to bigint");
}
| 113
| 309
| 422
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/BinaryFunction.java
|
BinaryFunction
|
call
|
class BinaryFunction extends AbstractFunction {
private static final long serialVersionUID = -7543895978170666671L;
private final OperatorType opType;
public BinaryFunction(final OperatorType opType) {
super();
this.opType = opType;
}
@Override
public String getName() {
return this.opType.getToken();
}
public OperatorType getOpType() {
return this.opType;
}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1,
final AviatorObject arg2) {
return OperationRuntime.eval(arg1, arg2, env, this.opType);
}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1) {<FILL_FUNCTION_BODY>}
}
|
AviatorObject left = arg1;
switch (this.opType) {
case BIT_AND:
case BIT_OR:
case BIT_XOR:
case ADD:
case SUB:
case MULT:
case Exponent:
case DIV:
case MOD:
return throwArity(1);
case NOT:
case NEG:
return OperationRuntime.eval(left, null, env, this.opType);
default:
throw new ExpressionRuntimeException("Invalid binary operator");
}
| 253
| 144
| 397
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/BooleanFunction.java
|
BooleanFunction
|
call
|
class BooleanFunction extends AbstractFunction {
private static final long serialVersionUID = -2549798338853017229L;
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1) {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return "boolean";
}
}
|
switch (arg1.getAviatorType()) {
case Boolean:
return arg1;
default:
if (arg1.getValue(env) == null) {
return AviatorBoolean.FALSE;
} else {
return AviatorBoolean.TRUE;
}
}
| 113
| 78
| 191
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/ComparatorFunction.java
|
ComparatorFunction
|
call
|
class ComparatorFunction extends AbstractFunction {
private ComparatorFunction() {}
public static final ComparatorFunction INSTANCE = new ComparatorFunction();
private static final long serialVersionUID = 6748727841901719306L;
@Override
public String getName() {
return "comparator";
}
@SuppressWarnings("rawtypes")
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1) {<FILL_FUNCTION_BODY>}
}
|
final AviatorFunction func = FunctionUtils.getFunction(arg1, env, 2);
return AviatorRuntimeJavaType.valueOf(new Comparator() {
@Override
public int compare(final Object o1, final Object o2) {
AviatorObject x = AviatorRuntimeJavaType.valueOf(o1);
AviatorObject y = AviatorRuntimeJavaType.valueOf(o2);
if ((boolean) func.call(env, x, y).getValue(env)) {
return -1;
} else if ((boolean) func.call(env, y, x).getValue(env)) {
return 1;
} else {
return 0;
}
}
});
| 156
| 188
| 344
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/Date2StringFunction.java
|
Date2StringFunction
|
call
|
class Date2StringFunction extends AbstractFunction {
private static final long serialVersionUID = -774515438944931814L;
@Override
public String getName() {
return "date_to_string";
}
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1, AviatorObject arg2) {<FILL_FUNCTION_BODY>}
}
|
Date date = (Date) arg1.getValue(env);
String format = FunctionUtils.getStringValue(arg2, env);
SimpleDateFormat dateFormat = DateFormatCache.getOrCreateDateFormat(format);
return new AviatorString(dateFormat.format(date));
| 123
| 70
| 193
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/DateFormatCache.java
|
DateFormatCache
|
getOrCreateDateFormat
|
class DateFormatCache {
private static int maxSize =
Integer.valueOf(System.getProperty("aviator.date_format.cache.max", "256"));
private static ThreadLocal<LRUMap<String/* format */, SimpleDateFormat>> formatCache =
new ThreadLocal<LRUMap<String, SimpleDateFormat>>();
public static SimpleDateFormat getOrCreateDateFormat(String format) {<FILL_FUNCTION_BODY>}
}
|
LRUMap<String/* format */, SimpleDateFormat> cache = formatCache.get();
if (cache == null) {
cache = new LRUMap<String, SimpleDateFormat>(maxSize);
formatCache.set(cache);
}
SimpleDateFormat rt = cache.get(format);
if (rt == null) {
rt = new SimpleDateFormat(format);
cache.put(format, rt);
}
return rt;
| 118
| 122
| 240
|
<no_super_class>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/DecimalFunction.java
|
DecimalFunction
|
call
|
class DecimalFunction extends AbstractFunction {
private static final long serialVersionUID = 820173052464302490L;
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1) {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return "decimal";
}
}
|
switch (arg1.getAviatorType()) {
case Boolean:
return AviatorDecimal.valueOf(arg1.booleanValue(env) ? BigDecimal.ONE : BigDecimal.ZERO);
case JavaType:
Object obj = arg1.getValue(env);
if (obj instanceof Number) {
return AviatorDecimal
.valueOf(new BigDecimal(String.valueOf(obj), RuntimeUtils.getMathContext(env)));
} else if (obj instanceof String) {
return AviatorDecimal
.valueOf(new BigDecimal((String) obj, RuntimeUtils.getMathContext(env)));
} else if (obj instanceof Character) {
return AviatorDecimal
.valueOf(new BigDecimal(String.valueOf(obj), RuntimeUtils.getMathContext(env)));
} else {
throw new ClassCastException(
"Could not cast " + obj.getClass().getName() + " to decimal");
}
case String:
return AviatorDecimal
.valueOf(new BigDecimal((String) arg1.getValue(env), RuntimeUtils.getMathContext(env)));
case BigInt:
case Decimal:
case Long:
case Double:
return AviatorDecimal.valueOf(((AviatorNumber) arg1).toDecimal(env));
default:
throw new ClassCastException("Could not cast " + arg1 + " to decimal");
}
| 113
| 362
| 475
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/DoubleFunction.java
|
DoubleFunction
|
call
|
class DoubleFunction extends AbstractFunction {
private static final long serialVersionUID = 7418978804691784744L;
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1) {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return "double";
}
}
|
switch (arg1.getAviatorType()) {
case Boolean:
return new AviatorDouble(arg1.booleanValue(env) ? 1 : 0);
case JavaType:
Object obj = arg1.getValue(env);
if (obj instanceof Number) {
return new AviatorDouble(((Number) obj).doubleValue());
} else if (obj instanceof String) {
return new AviatorDouble(Double.parseDouble((String) obj));
} else if (obj instanceof Character) {
return new AviatorDouble(Double.parseDouble(String.valueOf(obj)));
} else {
throw new ClassCastException("Could not cast " + obj.getClass().getName() + " to double");
}
case String:
return new AviatorDouble(Double.parseDouble((String) arg1.getValue(env)));
case BigInt:
case Decimal:
case Long:
case Double:
return new AviatorDouble(((Number) arg1.getValue(env)).doubleValue());
default:
throw new ClassCastException("Could not cast " + arg1 + " to double");
}
| 110
| 283
| 393
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/EvalFunction.java
|
EvalFunction
|
call
|
class EvalFunction extends AbstractFunction {
private static final long serialVersionUID = 541446001268353015L;
public static final EvalFunction INSTANCE = new EvalFunction();
@Override
public String getName() {
return "eval";
}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1) {
AviatorEvaluatorInstance instance = RuntimeUtils.getInstance(env);
String script = FunctionUtils.getStringValue(arg1, env);
return AviatorRuntimeJavaType
.valueOf(instance.execute(script, env, instance.isCachedExpressionByDefault()));
}
@SuppressWarnings("unchecked")
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1,
final AviatorObject arg2) {
AviatorEvaluatorInstance instance = RuntimeUtils.getInstance(env);
String script = FunctionUtils.getStringValue(arg1, env);
return AviatorRuntimeJavaType.valueOf(instance.execute(script,
(Map<String, Object>) arg2.getValue(env), instance.isCachedExpressionByDefault()));
}
@SuppressWarnings("unchecked")
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1,
final AviatorObject arg2, final AviatorObject arg3) {<FILL_FUNCTION_BODY>}
}
|
AviatorEvaluatorInstance instance = RuntimeUtils.getInstance(env);
String script = FunctionUtils.getStringValue(arg1, env);
return AviatorRuntimeJavaType.valueOf(instance.execute(script,
(Map<String, Object>) arg2.getValue(env), FunctionUtils.getBooleanValue(arg3, env)));
| 394
| 85
| 479
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/IsAFunction.java
|
IsAFunction
|
call
|
class IsAFunction extends AbstractFunction {
private static final long serialVersionUID = -7543895978170666671L;
private IsAFunction() {}
public static final IsAFunction INSTANCE = new IsAFunction();
@Override
public String getName() {
return "is_a";
}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1,
final AviatorObject arg2) {<FILL_FUNCTION_BODY>}
}
|
Object obj = arg1.getValue(env);
if (obj == null) {
return AviatorBoolean.FALSE;
}
if (arg2.getAviatorType() != AviatorType.JavaType) {
throw new IllegalArgumentException("Invalid class type: " + arg2.desc(env));
}
try {
Class<?> clazz = null;
final String name = ((AviatorJavaType) arg2).getName();
if (TypeUtils.PRIMITIVE_TYPES.containsKey(name)) {
clazz = TypeUtils.PRIMITIVE_TYPES.get(name);
} else {
clazz = ((Env) env).resolveClassSymbol(name, false);
}
return AviatorBoolean.valueOf(clazz.isInstance(obj));
} catch (ClassNotFoundException e) {
throw Reflector.sneakyThrow(e);
}
| 154
| 234
| 388
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/IsDefFunction.java
|
IsDefFunction
|
call
|
class IsDefFunction extends AbstractFunction {
private static final long serialVersionUID = 8641929538658275527L;
@Override
public String getName() {
return "is_def";
}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1) {<FILL_FUNCTION_BODY>}
}
|
if (arg1.getAviatorType() != AviatorType.JavaType) {
throw new IllegalArgumentException(
"Invalid argument type for is_def: " + arg1.getAviatorType());
}
final String varName = ((AviatorJavaType) arg1).getName();
return AviatorBoolean.valueOf(
env.containsKey(varName) || RuntimeUtils.getInstance(env).containsFunction(varName));
| 113
| 113
| 226
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/LoadFunction.java
|
LoadFunction
|
call
|
class LoadFunction extends AbstractFunction {
private static final long serialVersionUID = -6860446850416005514L;
private LoadFunction() {
}
public static final LoadFunction INSTANCE = new LoadFunction();
@Override
public String getName() {
return Constants.LOAD_FN;
}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1) {<FILL_FUNCTION_BODY>}
}
|
if (arg1.getAviatorType() != AviatorType.String) {
throw new IllegalArgumentException(
"Invalid argument type for load: " + arg1.getAviatorType());
}
try {
return AviatorRuntimeJavaType
.valueOf(RuntimeUtils.getInstance(env).loadScript((String) arg1.getValue(env)));
} catch (IOException e) {
throw new LoadScriptFailureException("Fail to load script from: " + arg1.getValue(env), e);
}
| 143
| 133
| 276
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/LongFunction.java
|
LongFunction
|
call
|
class LongFunction extends AbstractFunction {
private static final long serialVersionUID = 820173052464302490L;
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1) {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return "long";
}
}
|
switch (arg1.getAviatorType()) {
case Boolean:
return AviatorLong.valueOf(arg1.booleanValue(env) ? 1 : 0);
case JavaType:
Object obj = arg1.getValue(env);
if (obj instanceof Number) {
return AviatorLong.valueOf(((Number) obj).longValue());
} else if (obj instanceof String) {
return AviatorLong.valueOf(Long.valueOf((String) obj));
} else if (obj instanceof Character) {
return AviatorLong.valueOf(Long.valueOf(String.valueOf(obj)));
} else {
throw new ClassCastException("Could not cast " + obj.getClass().getName() + " to long");
}
case String:
return AviatorLong.valueOf(Long.valueOf((String) arg1.getValue(env)));
case BigInt:
case Decimal:
case Long:
case Double:
return AviatorLong.valueOf(((Number) arg1.getValue(env)).longValue());
default:
throw new ClassCastException("Could not cast " + arg1 + " to long");
}
| 109
| 295
| 404
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/MetaFunction.java
|
MetaFunction
|
call
|
class MetaFunction extends AbstractFunction {
private MetaFunction() {
}
public static final MetaFunction INSTANCE = new MetaFunction();
private static final long serialVersionUID = 7765397596826385646L;
@Override
public String getName() {
return "meta";
}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1) {<FILL_FUNCTION_BODY>}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1,
final AviatorObject arg2) {
return AviatorRuntimeJavaType.valueOf(arg1.meta(arg2.getValue(env)));
}
}
|
final Map<Object, Object> m = arg1.getMetadata();
return AviatorRuntimeJavaType.valueOf(m.isEmpty() ? null : m);
| 211
| 42
| 253
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/PrintFunction.java
|
PrintFunction
|
call
|
class PrintFunction extends AbstractFunction {
private static final long serialVersionUID = -215228684025127631L;
@Override
public String getName() {
return "print";
}
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1) {
System.out.print(arg1.getValue(env));
return AviatorNil.NIL;
}
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1, AviatorObject arg2) {<FILL_FUNCTION_BODY>}
}
|
OutputStream out = (OutputStream) FunctionUtils.getJavaObject(arg1, env);
PrintStream printStream = new PrintStream(out);
printStream.print(arg2.getValue(env));
return AviatorNil.NIL;
| 179
| 65
| 244
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/PrintlnFunction.java
|
PrintlnFunction
|
call
|
class PrintlnFunction extends AbstractFunction {
private static final long serialVersionUID = -1592661531857237654L;
@Override
public String getName() {
return "println";
}
@Override
public AviatorObject call(Map<String, Object> env) {
System.out.println();
return AviatorNil.NIL;
}
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1) {
System.out.println(arg1.getValue(env));
return AviatorNil.NIL;
}
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1, AviatorObject arg2) {<FILL_FUNCTION_BODY>}
}
|
OutputStream out = (OutputStream) FunctionUtils.getJavaObject(arg1, env);
PrintStream printStream = new PrintStream(out);
printStream.println(arg2.getValue(env));
return AviatorNil.NIL;
| 227
| 64
| 291
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/PstFunction.java
|
PstFunction
|
call
|
class PstFunction extends AbstractFunction {
private static final long serialVersionUID = -215228684025127631L;
@Override
public String getName() {
return "pst";
}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1) {
Throwable t = (Throwable) arg1.getValue(env);
t.printStackTrace();
return AviatorNil.NIL;
}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1,
final AviatorObject arg2) {<FILL_FUNCTION_BODY>}
}
|
OutputStream out = (OutputStream) FunctionUtils.getJavaObject(arg1, env);
PrintStream printStream = new PrintStream(out);
Throwable t = (Throwable) arg2.getValue(env);
t.printStackTrace(printStream);
return AviatorNil.NIL;
| 199
| 80
| 279
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/RequireFunction.java
|
RequireFunction
|
call
|
class RequireFunction extends AbstractFunction {
private static final long serialVersionUID = 5708185199888892952L;
private RequireFunction() {
}
public static final RequireFunction INSTANCE = new RequireFunction();
@Override
public String getName() {
return Constants.REQUIRE_FN;
}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1) {<FILL_FUNCTION_BODY>}
}
|
if (arg1.getAviatorType() != AviatorType.String) {
throw new IllegalArgumentException(
"Invalid argument type for require: " + arg1.getAviatorType());
}
try {
return AviatorRuntimeJavaType
.valueOf(RuntimeUtils.getInstance(env).requireScript((String) arg1.getValue(env)));
} catch (IOException e) {
throw new LoadScriptFailureException("Fail to require script from: " + arg1.getValue(env), e);
}
| 148
| 133
| 281
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/StrFunction.java
|
StrFunction
|
call
|
class StrFunction extends AbstractFunction {
private static final long serialVersionUID = 8649875989830820633L;
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1) {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return "str";
}
}
|
final Object value = arg1.getValue(env);
return new AviatorString(value == null ? "null" : value.toString());
| 108
| 37
| 145
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/String2DateFunction.java
|
String2DateFunction
|
call
|
class String2DateFunction extends AbstractFunction {
private static final long serialVersionUID = -1899407811376304410L;
@Override
public String getName() {
return "string_to_date";
}
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1, AviatorObject arg2) {<FILL_FUNCTION_BODY>}
}
|
String source = FunctionUtils.getStringValue(arg1, env);
String format = FunctionUtils.getStringValue(arg2, env);
SimpleDateFormat dateFormat = DateFormatCache.getOrCreateDateFormat(format);
try {
return AviatorRuntimeJavaType.valueOf(dateFormat.parse(source));
} catch (ParseException e) {
throw new ExpressionRuntimeException("Cast string to date failed", e);
}
| 124
| 109
| 233
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/TupleFunction.java
|
TupleFunction
|
variadicCall
|
class TupleFunction extends AbstractVariadicFunction {
private static final long serialVersionUID = -7377110880312266008L;
@Override
public String getName() {
return "tuple";
}
@Override
public AviatorObject variadicCall(Map<String, Object> env, AviatorObject... args) {<FILL_FUNCTION_BODY>}
}
|
Object[] tuple = new Object[args.length];
for (int i = 0; i < args.length; i++) {
tuple[i] = args[i].getValue(env);
}
return AviatorRuntimeJavaType.valueOf(tuple);
| 115
| 69
| 184
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public transient abstract com.googlecode.aviator.runtime.type.AviatorObject variadicCall(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject[]) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/TypeFunction.java
|
TypeFunction
|
call
|
class TypeFunction extends AbstractFunction {
private static final long serialVersionUID = 501798543495705123L;
private static final AviatorString STRING_TYPE = new AviatorString("string", true, false, 0);
private static final AviatorString PATTERN_TYPE = new AviatorString("pattern", true, false, 0);
private static final AviatorString RANGE_TYPE = new AviatorString("range", true, false, 0);
private static final AviatorString NIL_TYPE = new AviatorString("nil", true, false, 0);
private static final AviatorString LONG_TYPE = new AviatorString("long", true, false, 0);
private static final AviatorString FUNC_TYPE = new AviatorString("function", true, false, 0);
private static final AviatorString DOUBLE_TYPE = new AviatorString("double", true, false, 0);
private static final AviatorString DECIMAL_TYPE = new AviatorString("decimal", true, false, 0);
private static final AviatorString BOOL_TYPE = new AviatorString("boolean", true, false, 0);
private static final AviatorString BIGINT_TYPE = new AviatorString("bigint", true, false, 0);
@Override
public String getName() {
return "type";
}
@Override
public AviatorObject call(final Map<String, Object> env, AviatorObject arg1) {<FILL_FUNCTION_BODY>}
}
|
boolean retry = false;
while (true) {
switch (arg1.getAviatorType()) {
case BigInt:
return BIGINT_TYPE;
case Boolean:
return BOOL_TYPE;
case Decimal:
return DECIMAL_TYPE;
case Double:
return DOUBLE_TYPE;
case Lambda:
case Method:
return FUNC_TYPE;
case Long:
return LONG_TYPE;
case Nil:
return NIL_TYPE;
case Range:
return RANGE_TYPE;
case Pattern:
return PATTERN_TYPE;
case String:
return STRING_TYPE;
case JavaType:
if (retry) {
return new AviatorString(arg1.getValue(env).getClass().getCanonicalName());
}
arg1 = FunctionUtils.wrapReturn(arg1.getValue(env));
retry = true;
break;
}
}
| 405
| 254
| 659
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/function/system/UndefFunction.java
|
UndefFunction
|
call
|
class UndefFunction extends AbstractFunction {
private static final long serialVersionUID = -1301889134837125717L;
@Override
public String getName() {
return "undef";
}
@Override
public AviatorObject call(final Map<String, Object> env, final AviatorObject arg1) {<FILL_FUNCTION_BODY>}
}
|
if (arg1.getAviatorType() != AviatorType.JavaType) {
throw new IllegalArgumentException(
"Invalid argument type for undef: " + arg1.getAviatorType());
}
return FunctionUtils.wrapReturn(((Env) env).forgot(((AviatorJavaType) arg1).getName()));
| 113
| 87
| 200
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject call() throws java.lang.Exception,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject) ,public transient com.googlecode.aviator.runtime.type.AviatorObject call(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject, com.googlecode.aviator.runtime.type.AviatorObject[]) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public void run() ,public com.googlecode.aviator.runtime.type.AviatorObject throwArity(int) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/module/IoModule.java
|
IoModule
|
slurp
|
class IoModule {
private static final int INIT_BUFFER_SIZE = 32 * 1024;
private static final int BUFFER_SIZE = 8096;
/**
* A function to return java.io.File instance by path.
*
* @param path
* @return
*/
public static final File file(final String path) {
return new File(path);
}
public static boolean exists(final File file) {
return file.exists();
}
@Function(rename = "list_files")
public static File[] files(final File file) {
return file.listFiles();
}
public static final URL resource(final String name) {
return Thread.currentThread().getContextClassLoader().getResource(name);
}
@Function(rename = "input_stream")
public static InputStream inputStream(final File file) throws IOException {
return new FileInputStream(file);
}
@Function(rename = "input_stream")
public static InputStream inputStream(final URL url) throws IOException {
return url.openStream();
}
@Function(rename = "output_stream")
public static FileOutputStream outputStream(final File file) throws FileNotFoundException {
return new FileOutputStream(file);
}
public int read(final InputStream in) throws IOException {
return in.read();
}
public void write(final OutputStream out, final int b) throws IOException {
out.write(b);
}
public static BufferedReader reader(final File file) throws IOException {
return reader(file, Charset.defaultCharset().name());
}
public static BufferedReader reader(final File file, final String charsetName)
throws IOException {
return reader(inputStream(file), charsetName);
}
public static BufferedReader reader(final InputStream in) throws IOException {
return new BufferedReader(new InputStreamReader(in, Charset.defaultCharset().name()));
}
public static BufferedReader reader(final InputStream in, final String charsetName)
throws IOException {
return new BufferedReader(new InputStreamReader(in, Charset.forName(charsetName)));
}
public static BufferedWriter writer(final File file) throws IOException {
return writer(file, Charset.defaultCharset().name());
}
public static BufferedWriter writer(final File file, final String charsetName)
throws IOException {
return writer(outputStream(file), charsetName);
}
public static BufferedWriter writer(final OutputStream out) throws IOException {
return writer(out, Charset.defaultCharset().name());
}
public static BufferedWriter writer(final OutputStream out, final String charsetName)
throws IOException {
return new BufferedWriter(new OutputStreamWriter(out, Charset.forName(charsetName)));
}
/**
* slurp function to read file fully as a string.
*
* @param path
* @return
* @throws IOException
*/
public static String slurp(final String path) throws IOException {
return slurp(file(path));
}
public static String slurp(final String path, final String charset) throws IOException {
return slurp(file(path), charset);
}
public static String slurp(final File file) throws IOException {
return slurp(file, Charset.defaultCharset().name());
}
public static boolean delete(final File file) {
return file.delete();
}
public static String slurp(final File file, final String charset) throws IOException {
byte[] data = new byte[(int) file.length()];
try (InputStream in = inputStream(file)) {
int read = in.read(data);
assert (read == data.length);
}
return new String(data, charset);
}
public static String slurp(final URL file) throws IOException {
return slurp(file, Charset.defaultCharset().name());
}
private static byte[] resizeBuffer(final byte[] buffer, final int newSize, final int len) {
byte[] newBuffer = new byte[newSize];
System.arraycopy(buffer, 0, newBuffer, 0, len);
return newBuffer;
}
public static String slurp(final URL file, final String charset) throws IOException {<FILL_FUNCTION_BODY>}
/**
* spit function to write a string fully to file.
*
* @param path
* @return
* @throws IOException
*/
public static void spit(final String path, final String content) throws IOException {
spit(file(path), content);
}
public static void spit(final String path, final String content, final String charset)
throws IOException {
spit(file(path), content, charset);
}
public static void spit(final File file, final String content) throws IOException {
spit(file, content, Charset.defaultCharset().name());
}
public static void spit(final File file, final String content, final String charset)
throws IOException {
byte[] data = content.getBytes(Charset.forName(charset));
try (OutputStream out = outputStream(file)) {
out.write(data);
}
}
/**
* cast a file into a sequence of text lines in file.
*
* @param file
* @return
* @throws IOException
*/
@Function(rename = "line_seq")
public static LineSequence seq(final File file) throws IOException {
return new LineSequence(reader(file));
}
@Function(rename = "line_seq")
public static LineSequence seq(final BufferedReader reader) {
return new LineSequence(reader);
}
public static void close(final Closeable closeable) {
if (closeable != null) {
try {
closeable.close();
} catch (IOException e) {
// ignore
}
}
}
}
|
byte[] data = new byte[BUFFER_SIZE];
byte[] buffer = new byte[INIT_BUFFER_SIZE];
int destPos = 0;
try (InputStream in = inputStream(file)) {
int read = 0;
while ((read = in.read(data)) == data.length) {
while (destPos + read > buffer.length) {
buffer = resizeBuffer(buffer, buffer.length + INIT_BUFFER_SIZE, destPos);
}
System.arraycopy(data, 0, buffer, destPos, read);
destPos += data.length;
}
if (read > 0) {
while (destPos + read > buffer.length) {
buffer = resizeBuffer(buffer, buffer.length + INIT_BUFFER_SIZE, destPos);
}
System.arraycopy(data, 0, buffer, destPos, read);
destPos += data.length;
}
}
return new String(data, 0, destPos, charset);
| 1,540
| 252
| 1,792
|
<no_super_class>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/module/LineSequence.java
|
LineSequence
|
hasNext
|
class LineSequence implements Sequence<String> {
private final BufferedReader reader;
public LineSequence(final BufferedReader reader) {
super();
this.reader = reader;
}
@Override
public Iterator<String> iterator() {
return new Iterator<String>() {
String line;
boolean eof;
@Override
public String next() {
if (this.eof) {
throw new NoSuchElementException();
}
return this.line;
}
private void readLine() {
try {
this.line = LineSequence.this.reader.readLine();
} catch (IOException e) {
throw Reflector.sneakyThrow(e);
}
}
@Override
public boolean hasNext() {<FILL_FUNCTION_BODY>}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
@Override
public Collector newCollector(final int size) {
return new ListCollector(size, false);
}
@Override
public int hintSize() {
return 0;
}
}
|
if (this.eof) {
return false;
} else {
readLine();
this.eof = (this.line == null);
return !this.eof;
}
| 304
| 54
| 358
|
<no_super_class>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/op/OperationRuntime.java
|
OperationRuntime
|
eval
|
class OperationRuntime {
private static final ThreadLocal<AviatorObject[]> TWO_ARRGS = new ThreadLocal<AviatorObject[]>() {
@Override
protected AviatorObject[] initialValue() {
return new AviatorObject[2];
}
};
private static final ThreadLocal<AviatorObject[]> ONE_ARG = new ThreadLocal<AviatorObject[]>() {
@Override
protected AviatorObject[] initialValue() {
return new AviatorObject[1];
}
};
/**
* Eval with arguments array.
*
* @param args
* @param opType
* @return
*/
public static AviatorObject eval(final Map<String, Object> env, final AviatorObject[] args,
final OperatorType opType) {<FILL_FUNCTION_BODY>}
private static AviatorObject eval0(final Map<String, Object> env, final AviatorObject[] args,
final OperatorType opType, final AviatorFunction func) {
if (func == null) {
return opType.eval(args, env);
} else {
return evalOpFunction(env, args, opType, func);
}
}
public static AviatorObject evalOpFunction(final Map<String, Object> env,
final AviatorObject[] args, final OperatorType opType, final AviatorFunction func) {
switch (opType.getArity()) {
case 1:
return func.call(env, args[0]);
case 2:
return func.call(env, args[0], args[1]);
case 3:
return func.call(env, args[0], args[1], args[2]);
}
throw new IllegalArityException("Too many arguments.");
}
/**
* Eval with unary operator
*
* @param arg
* @param env
* @param opType
* @return
*/
public static AviatorObject eval(final AviatorObject arg, final Map<String, Object> env,
final OperatorType opType) {
AviatorFunction func = RuntimeUtils.getInstance(env).getOpFunction(opType);
AviatorObject ret = eval0(arg, env, opType, func);
if (RuntimeUtils.isTracedEval(env)) {
trace(env, opType, ret, arg);
}
return ret;
}
private static AviatorObject eval0(final AviatorObject arg, final Map<String, Object> env,
final OperatorType opType, final AviatorFunction func) {
if (func == null) {
AviatorObject[] args = ONE_ARG.get();
args[0] = arg;
return opType.eval(args, env);
} else {
return func.call(env, arg);
}
}
/**
* Just like {@link #eval(AviatorObject, AviatorObject, Map, OperatorType)}, but with difference
* arguments order.
*
* @param left
* @param env
* @param right
* @param opType
* @return
*/
public static AviatorObject eval(final AviatorObject left, final Map<String, Object> env,
final AviatorObject right, final OperatorType opType) {
return eval(left, right, env, opType);
}
/**
* Eval with binary operator
*
* @param left
* @param right
* @param env
* @param opType
* @return
*/
public static AviatorObject eval(final AviatorObject left, final AviatorObject right,
final Map<String, Object> env, final OperatorType opType) {
AviatorFunction func = RuntimeUtils.getInstance(env).getOpFunction(opType);
AviatorObject ret = eval0(left, right, env, opType, func);
if (RuntimeUtils.isTracedEval(env)) {
trace(env, opType, ret, left, right);
}
return ret;
}
private static AviatorObject eval0(final AviatorObject left, final AviatorObject right,
final Map<String, Object> env, final OperatorType opType, final AviatorFunction func) {
if (func == null) {
AviatorObject[] args = TWO_ARRGS.get();
args[0] = left;
args[1] = right;
return opType.eval(args, env);
} else {
return func.call(env, left, right);
}
}
public static final boolean hasRuntimeContext(final Map<String, Object> env,
final OperatorType opType) {
return containsOpFunction(env, opType) || RuntimeUtils.isTracedEval(env);
}
public static boolean containsOpFunction(final Map<String, Object> env,
final OperatorType opType) {
return RuntimeUtils.getInstance(env).getOpsMap().containsKey(opType);
}
private static final String WHITE_SPACE = " ";
private static final String TRACE_PREFIX = " ";
private static String desc(final AviatorObject arg, final Map<String, Object> env) {
if (arg != null) {
return arg.desc(env);
} else {
return Variable.NIL.getLexeme();
}
}
private static void trace(final Map<String, Object> env, final OperatorType opType,
final AviatorObject result, final AviatorObject... args) {
StringBuilder argsDec = new StringBuilder();
argsDec.append(desc(args[0], env));
for (int i = 1; i < args.length; i++) {
if (args[i] != null) {
argsDec.append(WHITE_SPACE).append(opType.token).append(WHITE_SPACE)
.append(desc(args[i], env));
}
}
RuntimeUtils.printlnTrace(env, TRACE_PREFIX + argsDec + " => " + desc(result, env));
}
}
|
AviatorFunction func = RuntimeUtils.getInstance(env).getOpFunction(opType);
AviatorObject ret = eval0(env, args, opType, func);
if (RuntimeUtils.isTracedEval(env)) {
trace(env, opType, ret, args);
}
return ret;
| 1,591
| 83
| 1,674
|
<no_super_class>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/AviatorBigInt.java
|
BigIntCache
|
innerAdd
|
class BigIntCache {
private BigIntCache() {}
static final AviatorBigInt cache[] = new AviatorBigInt[256];
static {
for (long i = 0; i < cache.length; i++) {
cache[(int) i] = new AviatorBigInt(BigInteger.valueOf(i - 128));
}
}
}
@Override
public Object getValue(Map<String, Object> env) {
return this.number;
}
@Override
public long longValue() {
return this.number.longValue();
}
@Override
public double doubleValue() {
return this.number.doubleValue();
}
public AviatorBigInt(Number number) {
super(number);
}
public static final AviatorBigInt valueOf(BigInteger v) {
return new AviatorBigInt(v);
}
public static final AviatorBigInt valueOf(String v) {
return new AviatorBigInt(new BigInteger(v));
}
public static final AviatorBigInt valueOf(long l) {
final int offset = 128;
if (l >= -128 && l <= 127) {
return BigIntCache.cache[(int) l + offset];
}
return valueOf(BigInteger.valueOf(l));
}
@Override
public AviatorObject neg(Map<String, Object> env) {
return AviatorBigInt.valueOf(this.toBigInt().negate());
}
@Override
public AviatorObject innerSub(Map<String, Object> env, AviatorNumber other) {
switch (other.getAviatorType()) {
case Decimal:
return AviatorDecimal.valueOf(
this.toDecimal(env).subtract(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
case Double:
return AviatorDouble.valueOf(this.doubleValue() - other.doubleValue());
default:
return AviatorBigInt.valueOf(this.toBigInt().subtract(other.toBigInt()));
}
}
@Override
public AviatorObject innerMult(Map<String, Object> env, AviatorNumber other) {
switch (other.getAviatorType()) {
case Decimal:
return AviatorDecimal.valueOf(
this.toDecimal(env).multiply(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
case Double:
return AviatorDouble.valueOf(this.doubleValue() * other.doubleValue());
default:
return AviatorBigInt.valueOf(this.toBigInt().multiply(other.toBigInt()));
}
}
@Override
public AviatorObject innerMod(Map<String, Object> env, AviatorNumber other) {
switch (other.getAviatorType()) {
case Decimal:
return AviatorDecimal.valueOf(
this.toDecimal(env).remainder(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
case Double:
return AviatorDouble.valueOf(this.doubleValue() % other.doubleValue());
default:
return AviatorBigInt.valueOf(this.toBigInt().mod(other.toBigInt()));
}
}
@Override
public AviatorObject innerDiv(Map<String, Object> env, AviatorNumber other) {
switch (other.getAviatorType()) {
case Decimal:
return AviatorDecimal.valueOf(
this.toDecimal(env).divide(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
case Double:
return AviatorDouble.valueOf(this.doubleValue() / other.doubleValue());
default:
return AviatorBigInt.valueOf(this.toBigInt().divide(other.toBigInt()));
}
}
@Override
public AviatorNumber innerAdd(Map<String, Object> env, AviatorNumber other) {<FILL_FUNCTION_BODY>
|
switch (other.getAviatorType()) {
case Decimal:
return AviatorDecimal.valueOf(
this.toDecimal(env).add(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
case Double:
return AviatorDouble.valueOf(this.doubleValue() + other.doubleValue());
default:
return AviatorBigInt.valueOf(this.toBigInt().add(other.toBigInt()));
}
| 1,084
| 123
| 1,207
|
<methods>public com.googlecode.aviator.runtime.type.AviatorObject bitAnd(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitNot(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitOr(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitXor(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public double doubleValue() ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject innerAdd(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public int innerCompare(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public com.googlecode.aviator.runtime.type.AviatorObject innerDiv(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public com.googlecode.aviator.runtime.type.AviatorObject innerMod(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public com.googlecode.aviator.runtime.type.AviatorObject innerMult(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public com.googlecode.aviator.runtime.type.AviatorObject innerSub(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public long longValue() ,public com.googlecode.aviator.runtime.type.AviatorObject neg(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftLeft(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject unsignedShiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public static com.googlecode.aviator.runtime.type.AviatorLong valueOf(long) ,public static com.googlecode.aviator.runtime.type.AviatorLong valueOf(java.lang.Long) <variables>private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/AviatorBoolean.java
|
AviatorBoolean
|
innerCompare
|
class AviatorBoolean extends AviatorObject {
/**
*
*/
private static final long serialVersionUID = -685795150869373183L;
Boolean value;
public static final AviatorBoolean TRUE = new AviatorBoolean(Boolean.TRUE);
public static final AviatorBoolean FALSE = new AviatorBoolean(Boolean.FALSE);
@Override
public AviatorObject not(final Map<String, Object> env) {
return this.value.booleanValue() ? FALSE : TRUE;
}
@Override
public final boolean booleanValue(final Map<String, Object> env) {
return this.value.booleanValue();
}
public boolean getBooleanValue() {
return this.value;
}
@Override
public AviatorObject add(final AviatorObject other, final Map<String, Object> env) {
switch (other.getAviatorType()) {
case String:
return new AviatorString(this.value.toString() + ((AviatorString) other).getLexeme(env));
case JavaType:
AviatorJavaType javaType = (AviatorJavaType) other;
final Object otherJavaValue = javaType.getValue(env);
if (TypeUtils.isString(otherJavaValue)) {
return new AviatorString(this.value.toString() + otherJavaValue.toString());
} else {
return super.add(other, env);
}
default:
return super.add(other, env);
}
}
@Override
public AviatorType getAviatorType() {
return AviatorType.Boolean;
}
@Override
public final Object getValue(final Map<String, Object> env) {
return this.value;
}
private AviatorBoolean(final Boolean value) {
super();
this.value = value;
}
public static AviatorBoolean valueOf(final boolean b) {
return b ? AviatorBoolean.TRUE : AviatorBoolean.FALSE;
}
@Override
public int innerCompare(final AviatorObject other, final Map<String, Object> env) {<FILL_FUNCTION_BODY>}
}
|
switch (other.getAviatorType()) {
case Boolean:
AviatorBoolean otherBoolean = (AviatorBoolean) other;
return this.value.compareTo(otherBoolean.value);
case JavaType:
AviatorJavaType javaType = (AviatorJavaType) other;
final Object otherValue = javaType.getValue(env);
if (otherValue == null) {
return 1;
}
if (otherValue instanceof Boolean) {
return this.value.compareTo((Boolean) otherValue);
} else {
throw new CompareNotSupportedException(
"Could not compare " + desc(env) + " with " + other.desc(env));
}
case Nil:
return 1;
default:
throw new CompareNotSupportedException(
"Could not compare " + desc(env) + " with " + other.desc(env));
}
| 583
| 230
| 813
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject add(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitAnd(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitNot(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitOr(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitXor(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public boolean booleanValue(Map<java.lang.String,java.lang.Object>) ,public int compare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public int compareEq(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject defineValue(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject deref(Map<java.lang.String,java.lang.Object>) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject div(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject exponent(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public abstract com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public com.googlecode.aviator.runtime.type.AviatorObject getElement(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public Map<java.lang.Object,java.lang.Object> getMetadata() ,public abstract java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public abstract int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public boolean isNull(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject match(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.Object meta(java.lang.Object) ,public com.googlecode.aviator.runtime.type.AviatorObject mod(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject mult(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject neg(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject not(Map<java.lang.String,java.lang.Object>) ,public java.lang.Number numberValue(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject setValue(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftLeft(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.String stringValue(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject sub(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.String toString() ,public com.googlecode.aviator.runtime.type.AviatorObject unsignedShiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject withMeta(java.lang.Object, java.lang.Object) ,public com.googlecode.aviator.runtime.type.AviatorObject withoutMeta(java.lang.Object) <variables>protected Map<java.lang.Object,java.lang.Object> metadata,private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/AviatorDecimal.java
|
AviatorDecimal
|
innerMod
|
class AviatorDecimal extends AviatorNumber {
private static final long serialVersionUID = 7084583813460322882L;
public AviatorDecimal(final Number number) {
super(number);
}
public static final AviatorDecimal valueOf(final BigDecimal d) {
return new AviatorDecimal(d);
}
public static final AviatorDecimal valueOf(final Map<String, Object> env, final String d) {
return new AviatorDecimal(new BigDecimal(d, RuntimeUtils.getMathContext(env)));
}
public static final AviatorDecimal valueOf(final AviatorEvaluatorInstance instance,
final String d) {
return new AviatorDecimal(
new BigDecimal(d, instance.getOptionValue(Options.MATH_CONTEXT).mathContext));
}
@Override
public AviatorObject innerSub(final Map<String, Object> env, final AviatorNumber other) {
if (other.getAviatorType() != AviatorType.Double) {
return AviatorDecimal
.valueOf(toDecimal(env).subtract(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
} else {
return AviatorDouble.valueOf(doubleValue() - other.doubleValue());
}
}
@Override
public AviatorObject neg(final Map<String, Object> env) {
return AviatorDecimal.valueOf(toDecimal(env).negate());
}
@Override
public AviatorObject innerMult(final Map<String, Object> env, final AviatorNumber other) {
if (other.getAviatorType() != AviatorType.Double) {
return AviatorDecimal
.valueOf(toDecimal(env).multiply(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
} else {
return AviatorDouble.valueOf(doubleValue() * other.doubleValue());
}
}
@Override
public AviatorObject innerMod(final Map<String, Object> env, final AviatorNumber other) {<FILL_FUNCTION_BODY>}
@Override
public AviatorObject innerDiv(final Map<String, Object> env, final AviatorNumber other) {
if (other.getAviatorType() != AviatorType.Double) {
return AviatorDecimal
.valueOf(toDecimal(env).divide(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
} else {
return AviatorDouble.valueOf(doubleValue() / other.doubleValue());
}
}
@Override
public AviatorNumber innerAdd(final Map<String, Object> env, final AviatorNumber other) {
if (other.getAviatorType() != AviatorType.Double) {
return AviatorDecimal
.valueOf(toDecimal(env).add(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
} else {
return AviatorDouble.valueOf(doubleValue() + other.doubleValue());
}
}
@Override
public int innerCompare(final Map<String, Object> env, final AviatorNumber other) {
if (other.getAviatorType() != AviatorType.Double) {
return toDecimal(env).compareTo(other.toDecimal(env));
} else {
return Double.compare(doubleValue(), other.doubleValue());
}
}
@Override
public AviatorType getAviatorType() {
return AviatorType.Decimal;
}
}
|
if (other.getAviatorType() != AviatorType.Double) {
return AviatorDecimal.valueOf(
toDecimal(env).remainder(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
} else {
return AviatorDouble.valueOf(doubleValue() % other.doubleValue());
}
| 970
| 94
| 1,064
|
<methods>public void <init>(long) ,public void <init>(double) ,public void <init>(java.lang.Number) ,public com.googlecode.aviator.runtime.type.AviatorObject add(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject div(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public double doubleValue() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerAdd(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public abstract int innerCompare(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerDiv(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerMod(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerMult(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerSub(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public long longValue() ,public com.googlecode.aviator.runtime.type.AviatorObject mod(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject mult(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject sub(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public final java.math.BigInteger toBigInt() ,public final java.math.BigDecimal toDecimal(Map<java.lang.String,java.lang.Object>) ,public static com.googlecode.aviator.runtime.type.AviatorNumber valueOf(java.lang.Object) <variables>protected double doubleValue,protected long longValue,protected java.lang.Number number,private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/AviatorLong.java
|
LongCache
|
innerMod
|
class LongCache {
private LongCache() {}
static final AviatorLong cache[] = new AviatorLong[256];
static {
for (long i = 0; i < cache.length; i++) {
cache[(int) i] = new AviatorLong(i - 128);
}
}
}
AviatorLong(final long i) {
super(i);
}
AviatorLong(final Number number) {
super(number);
}
public static AviatorLong valueOf(final long l) {
final int offset = 128;
if (l >= -128 && l <= 127) { // will cache
return LongCache.cache[(int) l + offset];
}
return new AviatorLong(l);
}
public static AviatorLong valueOf(final Long l) {
return valueOf(l.longValue());
}
@Override
public AviatorObject neg(final Map<String, Object> env) {
return AviatorLong.valueOf(-this.longValue);
}
@Override
public int innerCompare(final Map<String, Object> env, final AviatorNumber other) {
if (other.getAviatorType() == AviatorType.Long) {
return TypeUtils.comapreLong(longValue(), other.longValue());
}
switch (other.getAviatorType()) {
case BigInt:
return toBigInt().compareTo(other.toBigInt());
case Decimal:
return toDecimal(env).compareTo(other.toDecimal(env));
case Double:
return Double.compare(doubleValue(), other.doubleValue());
default:
throw new CompareNotSupportedException(
"Could not compare " + desc(env) + " with " + other.desc(env));
}
}
@Override
public AviatorObject innerDiv(final Map<String, Object> env, final AviatorNumber other) {
switch (other.getAviatorType()) {
case BigInt:
return AviatorBigInt.valueOf(toBigInt().divide(other.toBigInt()));
case Decimal:
return AviatorDecimal
.valueOf(toDecimal(env).divide(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
case Long:
return AviatorLong.valueOf(this.longValue / other.longValue());
default:
return AviatorDouble.valueOf(this.longValue / other.doubleValue());
}
}
@Override
public AviatorObject innerAdd(final Map<String, Object> env, final AviatorNumber other) {
switch (other.getAviatorType()) {
case BigInt:
return AviatorBigInt.valueOf(toBigInt().add(other.toBigInt()));
case Decimal:
return AviatorDecimal
.valueOf(toDecimal(env).add(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
case Long:
return AviatorLong.valueOf(this.longValue + other.longValue());
default:
return new AviatorDouble(this.longValue + other.doubleValue());
}
}
@Override
public AviatorObject innerMod(final Map<String, Object> env, final AviatorNumber other) {<FILL_FUNCTION_BODY>
|
switch (other.getAviatorType()) {
case BigInt:
return AviatorBigInt.valueOf(toBigInt().mod(other.toBigInt()));
case Decimal:
return AviatorDecimal.valueOf(
toDecimal(env).remainder(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
case Long:
return AviatorLong.valueOf(this.longValue % other.longValue());
default:
return new AviatorDouble(this.longValue % other.doubleValue());
}
| 889
| 145
| 1,034
|
<methods>public void <init>(long) ,public void <init>(double) ,public void <init>(java.lang.Number) ,public com.googlecode.aviator.runtime.type.AviatorObject add(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject div(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public double doubleValue() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerAdd(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public abstract int innerCompare(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerDiv(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerMod(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerMult(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerSub(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public long longValue() ,public com.googlecode.aviator.runtime.type.AviatorObject mod(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject mult(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject sub(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public final java.math.BigInteger toBigInt() ,public final java.math.BigDecimal toDecimal(Map<java.lang.String,java.lang.Object>) ,public static com.googlecode.aviator.runtime.type.AviatorNumber valueOf(java.lang.Object) <variables>protected double doubleValue,protected long longValue,protected java.lang.Number number,private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/AviatorNil.java
|
AviatorNil
|
add
|
class AviatorNil extends AviatorObject {
private static final long serialVersionUID = 5030890238879926682L;
public static final AviatorNil NIL = new AviatorNil();
private AviatorNil() {
}
@Override
public AviatorObject add(final AviatorObject other, final Map<String, Object> env) {<FILL_FUNCTION_BODY>}
@Override
public int innerCompare(final AviatorObject other, final Map<String, Object> env) {
switch (other.getAviatorType()) {
case Nil:
return 0;
case JavaType:
if (other.getValue(env) == null) {
return 0;
}
}
// Any object is greater than nil except nil
return -1;
}
@Override
public AviatorType getAviatorType() {
return AviatorType.Nil;
}
@Override
public Object getValue(final Map<String, Object> env) {
return null;
}
}
|
switch (other.getAviatorType()) {
case String:
return new AviatorString("null" + other.getValue(env));
case JavaType:
final Object otherValue = other.getValue(env);
if (TypeUtils.isString(otherValue)) {
return new AviatorString("null" + otherValue);
} else {
return super.add(other, env);
}
default:
return super.add(other, env);
}
| 299
| 124
| 423
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject add(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitAnd(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitNot(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitOr(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitXor(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public boolean booleanValue(Map<java.lang.String,java.lang.Object>) ,public int compare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public int compareEq(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject defineValue(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject deref(Map<java.lang.String,java.lang.Object>) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject div(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject exponent(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public abstract com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public com.googlecode.aviator.runtime.type.AviatorObject getElement(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public Map<java.lang.Object,java.lang.Object> getMetadata() ,public abstract java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public abstract int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public boolean isNull(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject match(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.Object meta(java.lang.Object) ,public com.googlecode.aviator.runtime.type.AviatorObject mod(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject mult(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject neg(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject not(Map<java.lang.String,java.lang.Object>) ,public java.lang.Number numberValue(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject setValue(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftLeft(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.String stringValue(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject sub(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.String toString() ,public com.googlecode.aviator.runtime.type.AviatorObject unsignedShiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject withMeta(java.lang.Object, java.lang.Object) ,public com.googlecode.aviator.runtime.type.AviatorObject withoutMeta(java.lang.Object) <variables>protected Map<java.lang.Object,java.lang.Object> metadata,private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/AviatorPattern.java
|
AviatorPattern
|
add
|
class AviatorPattern extends AviatorObject {
private static final long serialVersionUID = -6667072156431636239L;
final Pattern pattern;
public AviatorPattern(final String expression) {
super();
this.pattern = Pattern.compile(expression);
}
public AviatorPattern(final Pattern pattern) {
super();
this.pattern = pattern;
}
public Pattern getPattern() {
return this.pattern;
}
@Override
public AviatorObject add(final AviatorObject other, final Map<String, Object> env) {<FILL_FUNCTION_BODY>}
@Override
public AviatorObject match(final AviatorObject other, final Map<String, Object> env) {
switch (other.getAviatorType()) {
case Nil:
return AviatorBoolean.FALSE;
case String:
AviatorString aviatorString = (AviatorString) other;
Matcher m = this.pattern.matcher(aviatorString.getLexeme(env));
if (m.matches()) {
boolean captureGroups = RuntimeUtils.getInstance(env)
.getOptionValue(Options.PUT_CAPTURING_GROUPS_INTO_ENV).bool;
if (captureGroups && env != Collections.EMPTY_MAP) {
int groupCount = m.groupCount();
for (int i = 0; i <= groupCount; i++) {
((Env) env).override("$" + i, m.group(i));
}
}
return AviatorBoolean.TRUE;
} else {
return AviatorBoolean.FALSE;
}
case JavaType:
AviatorJavaType javaType = (AviatorJavaType) other;
final Object javaValue = javaType.getValue(env);
if (javaValue == null) {
return AviatorBoolean.FALSE;
}
if (TypeUtils.isString(javaValue)) {
return match(new AviatorString(String.valueOf(javaValue)), env);
} else {
throw new ExpressionRuntimeException(desc(env) + " could not match " + other.desc(env));
}
default:
throw new ExpressionRuntimeException(desc(env) + " could not match " + other.desc(env));
}
}
@Override
public int innerCompare(final AviatorObject other, final Map<String, Object> env) {
if (this == other) {
return 0;
}
switch (other.getAviatorType()) {
case Pattern:
return this.pattern.pattern().compareTo(((AviatorPattern) other).pattern.pattern());
case JavaType:
if (other.getValue(env) == null) {
return 1;
} else {
throw new CompareNotSupportedException(
"Could not compare Pattern with " + other.desc(env));
}
case Nil:
return 1;
default:
throw new CompareNotSupportedException("Could not compare Pattern with " + other.desc(env));
}
}
@Override
public AviatorType getAviatorType() {
return AviatorType.Pattern;
}
@Override
public Object getValue(final Map<String, Object> env) {
return this.pattern;
}
}
|
switch (other.getAviatorType()) {
case String:
return new AviatorString(this.pattern.pattern() + ((AviatorString) other).getLexeme(env));
case JavaType:
AviatorJavaType javaType = (AviatorJavaType) other;
final Object otherValue = javaType.getValue(env);
if (TypeUtils.isString(otherValue)) {
return new AviatorString(this.pattern.pattern() + otherValue.toString());
} else {
return super.add(other, env);
}
default:
return super.add(other, env);
}
| 884
| 164
| 1,048
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject add(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitAnd(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitNot(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitOr(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitXor(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public boolean booleanValue(Map<java.lang.String,java.lang.Object>) ,public int compare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public int compareEq(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject defineValue(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject deref(Map<java.lang.String,java.lang.Object>) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject div(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject exponent(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public abstract com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public com.googlecode.aviator.runtime.type.AviatorObject getElement(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public Map<java.lang.Object,java.lang.Object> getMetadata() ,public abstract java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public abstract int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public boolean isNull(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject match(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.Object meta(java.lang.Object) ,public com.googlecode.aviator.runtime.type.AviatorObject mod(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject mult(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject neg(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject not(Map<java.lang.String,java.lang.Object>) ,public java.lang.Number numberValue(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject setValue(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftLeft(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.String stringValue(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject sub(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.String toString() ,public com.googlecode.aviator.runtime.type.AviatorObject unsignedShiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject withMeta(java.lang.Object, java.lang.Object) ,public com.googlecode.aviator.runtime.type.AviatorObject withoutMeta(java.lang.Object) <variables>protected Map<java.lang.Object,java.lang.Object> metadata,private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/AviatorRuntimeJavaElementType.java
|
AviatorRuntimeJavaElementType
|
setValue
|
class AviatorRuntimeJavaElementType extends AviatorRuntimeJavaType {
private static final long serialVersionUID = -955529214730255727L;
private final Object index;
private final Object container;
private final ContainerType containerType;
public static enum ContainerType {
List, Array, Map
}
public AviatorRuntimeJavaElementType(final ContainerType containerType, final Object container,
final Object index, final Callable<Object> callable) {
super(null);
setCallable(callable);
this.container = container;
this.index = index;
this.containerType = containerType;
}
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public AviatorObject setValue(final AviatorObject value, final Map<String, Object> env) {<FILL_FUNCTION_BODY>}
}
|
Object val = value.getValue(env);
switch (this.containerType) {
case Array:
ArrayUtils.set(this.container, (int) this.index,
Reflector.boxArg(this.container.getClass().getComponentType(), val));
break;
case List:
((List) this.container).set((int) this.index, val);
break;
case Map:
((Map) this.container).put(this.index, val);
break;
default:
throw new ExpressionRuntimeException("Unknown container type: " + this.containerType);
}
return AviatorRuntimeJavaType.valueOf(val);
| 242
| 169
| 411
|
<methods>public void <init>(java.lang.Object) ,public static java.lang.String genName() ,public Callable<java.lang.Object> getCallable() ,public java.lang.String getName() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public void setCallable(Callable<java.lang.Object>) ,public static com.googlecode.aviator.runtime.type.AviatorObject valueOf(java.lang.Object) <variables>public static final ThreadLocal<com.googlecode.aviator.utils.VarNameGenerator> TEMP_VAR_GEN,protected Callable<java.lang.Object> callable,protected java.lang.Object object,private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/AviatorRuntimeJavaType.java
|
AviatorRuntimeJavaType
|
valueOf
|
class AviatorRuntimeJavaType extends AviatorJavaType {
private static final long serialVersionUID = 3107203976124904223L;
public static final ThreadLocal<VarNameGenerator> TEMP_VAR_GEN =
new ThreadLocal<VarNameGenerator>() {
@Override
protected VarNameGenerator initialValue() {
return new VarNameGenerator();
}
};
protected Object object;
protected Callable<Object> callable;
public static AviatorObject valueOf(final Object object) {<FILL_FUNCTION_BODY>}
/**
* Deprecated since 5.0.0, please use {@link AviatorRuntimeJavaType#valueOf(Object)} instead.
*
* @deprecated
* @param object
*/
@Deprecated
public AviatorRuntimeJavaType(final Object object) {
super(null);
this.object = object;
}
public Callable<Object> getCallable() {
return this.callable;
}
public void setCallable(final Callable<Object> callable) {
this.callable = callable;
}
public static String genName() {
return TEMP_VAR_GEN.get().gen();
}
@Override
public String getName() {
if (this.name == null) {
this.name = genName();
}
return this.name;
}
@Override
public Object getValue(final Map<String, Object> env) {
if (this.callable != null) {
try {
return this.callable.call();
} catch (Exception e) {
throw Reflector.sneakyThrow(e);
}
}
return this.object;
}
}
|
if (object == null) {
return AviatorNil.NIL;
}
if (object instanceof AviatorObject) {
return (AviatorObject) object;
}
return new AviatorRuntimeJavaType(object);
| 467
| 66
| 533
|
<methods>public void <init>(java.lang.String) ,public void <init>(java.lang.String, com.googlecode.aviator.lexer.SymbolTable) ,public com.googlecode.aviator.runtime.type.AviatorObject add(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitAnd(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitNot(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitOr(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitXor(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject defineValue(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject deref(Map<java.lang.String,java.lang.Object>) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject div(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public com.googlecode.aviator.runtime.type.AviatorObject getElement(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public java.lang.String getName() ,public static java.lang.Object getProperty(java.lang.String, java.lang.String[], Map<java.lang.String,java.lang.Object>, boolean, boolean) ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public java.lang.Object getValueFromEnv(java.lang.String, boolean, Map<java.lang.String,java.lang.Object>, boolean) ,public static java.lang.Object getValueFromEnv(java.lang.String, boolean, java.lang.String[], Map<java.lang.String,java.lang.Object>, boolean, boolean) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject match(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject mod(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject mult(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject neg(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject not(Map<java.lang.String,java.lang.Object>) ,public static java.lang.String reserveName(java.lang.String) ,public com.googlecode.aviator.runtime.type.AviatorObject setValue(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftLeft(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject sub(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public static java.lang.Object tryResolveAsClass(Map<java.lang.String,java.lang.Object>, java.lang.String) ,public com.googlecode.aviator.runtime.type.AviatorObject unsignedShiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) <variables>private boolean containsDot,protected java.lang.String name,private static final long serialVersionUID,private java.lang.String[] subNames,private com.googlecode.aviator.lexer.SymbolTable symbolTable
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/AviatorString.java
|
AviatorString
|
getLexeme
|
class AviatorString extends AviatorObject {
private static final long serialVersionUID = -7430694306919959899L;
private final String lexeme;
private final boolean isLiteral;
private boolean hasInterpolation = true; // default must be true to avoid corner cases;
private int lineNo;
@Override
public String desc(final Map<String, Object> env) {
Object val = this.getLexeme(env, false);
if (val != this) {
return "<" + getAviatorType() + ", " + val + ">";
} else {
return "<" + getAviatorType() + ", this>";
}
}
@Override
public AviatorType getAviatorType() {
return AviatorType.String;
}
@Override
public Object getValue(final Map<String, Object> env) {
return getLexeme(env);
}
public AviatorString(final String lexeme) {
this(lexeme, false);
}
public AviatorString(final String lexeme, final boolean isLiteral) {
super();
this.lexeme = lexeme;
this.isLiteral = isLiteral;
}
public AviatorString(final String lexeme, final boolean isLiteral, final boolean hasInterpolation,
final int lineNo) {
super();
this.lexeme = lexeme;
this.isLiteral = isLiteral;
this.hasInterpolation = hasInterpolation;
this.lineNo = lineNo;
}
@Override
public AviatorObject add(final AviatorObject other, final Map<String, Object> env) {
final StringBuilder sb = new StringBuilder(getLexeme(env));
if (other.getAviatorType() != AviatorType.Pattern) {
sb.append(other.getValue(env));
} else {
final AviatorPattern otherPatterh = (AviatorPattern) other;
sb.append(otherPatterh.pattern.pattern());
}
return new AviatorStringBuilder(sb);
}
private static final ThreadLocal<SimpleDateFormat> DATE_FORMATTER =
new ThreadLocal<SimpleDateFormat>() {
@Override
protected SimpleDateFormat initialValue() {
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SS");
}
};
private int tryCompareDate(final Map<String, Object> env, final Date otherDate) {
try {
final SimpleDateFormat simpleDateFormat = DATE_FORMATTER.get();
final Date thisDate = simpleDateFormat.parse(getLexeme(env));
return thisDate.compareTo(otherDate);
} catch (final Throwable t) {
throw new ExpressionRuntimeException("Compare date error", t);
}
}
@Override
public int innerCompare(final AviatorObject other, final Map<String, Object> env) {
final String left = getLexeme(env);
if (other.getAviatorType() == AviatorType.String) {
final AviatorString otherString = (AviatorString) other;
final String right = otherString.getLexeme(env);
if (left != null && right != null) {
return left.compareTo(right);
} else if (left == null && right != null) {
return -1;
} else if (left != null && right == null) {
return 1;
} else {
return 0;
}
}
switch (other.getAviatorType()) {
case JavaType:
final AviatorJavaType javaType = (AviatorJavaType) other;
final Object otherJavaValue = javaType.getValue(env);
if (left == null && otherJavaValue == null) {
return 0;
} else if (left != null && otherJavaValue == null) {
return 1;
}
if (TypeUtils.isString(otherJavaValue)) {
if (left == null) {
return -1;
} else {
return left.compareTo(String.valueOf(otherJavaValue));
}
} else if (otherJavaValue instanceof Date) {
return tryCompareDate(env, (Date) otherJavaValue);
} else {
throw new CompareNotSupportedException(
"Could not compare " + desc(env) + " with " + other.desc(env));
}
case Nil:
if (left == null) {
return 0;
} else {
return 1;
}
default:
throw new CompareNotSupportedException(
"Could not compare " + desc(env) + " with " + other.desc(env));
}
}
public String getLexeme(final Map<String, Object> env) {
return this.getLexeme(env, true);
}
public String getLexeme(final Map<String, Object> env, final boolean warnOnCompile) {<FILL_FUNCTION_BODY>}
private static int COMPILE_TIMES = 0;
private void warnOnCompileWithoutCaching() {
if (COMPILE_TIMES++ % 1000 == 0) {
final StackTraceElement[] stackTraces = Thread.currentThread().getStackTrace();
StringBuilder sb = new StringBuilder();
boolean wasFirst = true;
for (StackTraceElement st : stackTraces) {
if (!wasFirst) {
sb.append("\t").append(st.toString()).append("\n");
}
if (wasFirst) {
wasFirst = false;
}
}
System.err.println("[Aviator WARN] compile lexeme `" + this.lexeme
+ "` without caching, it may hurt performance and cause metaspace full gc, the stack:\n"
+ sb.toString());
}
}
}
|
AviatorEvaluatorInstance engine = RuntimeUtils.getInstance(env);
if (!this.isLiteral || !this.hasInterpolation
|| !engine.isFeatureEnabled(Feature.StringInterpolation) || this.lexeme == null
|| this.lexeme.length() < 3) {
return this.lexeme;
}
StringSegments segs = null;
BaseExpression exp = (BaseExpression) (env == null ? null : env.get(Constants.EXP_VAR));
if (exp != null) {
segs = exp.getStringSegements(this.lexeme, this.lineNo);
} else {
segs = engine.compileStringSegments(this.lexeme);
if (warnOnCompile) {
warnOnCompileWithoutCaching();
}
}
assert (segs != null);
return segs.toString(env, this.lexeme);
| 1,538
| 228
| 1,766
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject add(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitAnd(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitNot(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitOr(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitXor(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public boolean booleanValue(Map<java.lang.String,java.lang.Object>) ,public int compare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public int compareEq(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject defineValue(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject deref(Map<java.lang.String,java.lang.Object>) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject div(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject exponent(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public abstract com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public com.googlecode.aviator.runtime.type.AviatorObject getElement(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public Map<java.lang.Object,java.lang.Object> getMetadata() ,public abstract java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public abstract int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public boolean isNull(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject match(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.Object meta(java.lang.Object) ,public com.googlecode.aviator.runtime.type.AviatorObject mod(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject mult(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject neg(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject not(Map<java.lang.String,java.lang.Object>) ,public java.lang.Number numberValue(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject setValue(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftLeft(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.String stringValue(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject sub(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.String toString() ,public com.googlecode.aviator.runtime.type.AviatorObject unsignedShiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject withMeta(java.lang.Object, java.lang.Object) ,public com.googlecode.aviator.runtime.type.AviatorObject withoutMeta(java.lang.Object) <variables>protected Map<java.lang.Object,java.lang.Object> metadata,private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/AviatorStringBuilder.java
|
AviatorStringBuilder
|
add
|
class AviatorStringBuilder extends AviatorString {
private static final long serialVersionUID = 1958289382573221857L;
private final StringBuilder sb;
public AviatorStringBuilder(final StringBuilder sb) {
super(null);
this.sb = sb;
}
public AviatorStringBuilder(final String lexeme) {
super(null);
this.sb = new StringBuilder(lexeme);
}
@Override
public String getLexeme(final Map<String, Object> env, final boolean warnOnCompile) {
return this.sb.toString();
}
@Override
public AviatorObject deref(final Map<String, Object> env) {
return new AviatorString(getLexeme(env));
}
@Override
public AviatorObject add(final AviatorObject other, final Map<String, Object> env) {<FILL_FUNCTION_BODY>}
}
|
if (other.getAviatorType() == AviatorType.Pattern) {
final AviatorPattern otherPatterh = (AviatorPattern) other;
this.sb.append(otherPatterh.pattern.pattern());
} else {
this.sb.append(other.getValue(env));
}
return new AviatorStringBuilder(this.sb);
| 258
| 97
| 355
|
<methods>public void <init>(java.lang.String) ,public void <init>(java.lang.String, boolean) ,public void <init>(java.lang.String, boolean, boolean, int) ,public com.googlecode.aviator.runtime.type.AviatorObject add(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public java.lang.String getLexeme(Map<java.lang.String,java.lang.Object>) ,public java.lang.String getLexeme(Map<java.lang.String,java.lang.Object>, boolean) ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) <variables>private static int COMPILE_TIMES,private static final ThreadLocal<java.text.SimpleDateFormat> DATE_FORMATTER,private boolean hasInterpolation,private final non-sealed boolean isLiteral,private final non-sealed java.lang.String lexeme,private int lineNo,private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/Range.java
|
Range
|
desc
|
class Range extends AviatorObject implements Sequence<Number> {
private static final long serialVersionUID = 1463899968843425932L;
private static final AviatorLong ZERO = AviatorLong.valueOf(0L);
public static final Range LOOP = new Range(ZERO, ZERO, ZERO);
static {
LOOP.isLoop = true;
}
private final AviatorNumber step;
private final AviatorNumber start;
private final AviatorNumber end;
final boolean forward;
private boolean isLoop;
public boolean isLoop() {
return this.isLoop;
}
public Range(final AviatorNumber start, final AviatorNumber end, final AviatorNumber step) {
super();
this.start = start;
this.end = end;
this.step = step;
this.forward = Range.this.step.compare(ZERO, Env.EMPTY_ENV) >= 0;
this.isLoop = false;
}
@Override
public String desc(final Map<String, Object> env) {<FILL_FUNCTION_BODY>}
@Override
public int innerCompare(final AviatorObject other, final Map<String, Object> env) {
throw new CompareNotSupportedException();
}
@Override
public AviatorType getAviatorType() {
return AviatorType.Range;
}
@Override
public Object getValue(final Map<String, Object> env) {
return this;
}
public AviatorNumber first() {
return this.start;
}
public AviatorNumber last() {
return this.end;
}
@Override
public int hintSize() {
try {
return size();
} catch (Throwable t) {
return 10;
}
}
public int size() {
int size =
((Number) this.end.sub(this.start, null).div(this.step, null).getValue(null)).intValue();
return size < 0 ? 0 : size;
}
@Override
public Collector newCollector(final int size) {
if (size <= 0) {
return new Collector() {
List<Object> list = new ArrayList<>();
@Override
public void add(final Object e) {
this.list.add(e);
}
@Override
public Object getRawContainer() {
return this.list;
}
};
} else {
return new Collector() {
Object array = Array.newInstance(Object.class, size);
int i = 0;
@Override
public void add(final Object e) {
ArrayUtils.set(this.array, this.i++, e);
}
@Override
public Object getRawContainer() {
return this.array;
}
};
}
}
@Override
public Iterator<Number> iterator() {
return new Iterator<Number>() {
AviatorNumber current = Range.this.start;
@Override
public boolean hasNext() {
if (Range.this.forward) {
return this.current.compare(Range.this.end, Env.EMPTY_ENV) < 0;
} else {
return this.current.compare(Range.this.end, Env.EMPTY_ENV) > 0;
}
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
@Override
public Number next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
AviatorNumber result = this.current;
this.current = (AviatorNumber) this.current.add(Range.this.step, Env.EMPTY_ENV);
return (Number) result.getValue(Env.EMPTY_ENV);
}
};
}
}
|
return "<Range, [" + this.start.getValue(env) + ", " + this.end.getValue(env) + "], "
+ this.step.getValue(env) + ">";
| 1,042
| 51
| 1,093
|
<methods>public non-sealed void <init>() ,public com.googlecode.aviator.runtime.type.AviatorObject add(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitAnd(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitNot(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitOr(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject bitXor(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public boolean booleanValue(Map<java.lang.String,java.lang.Object>) ,public int compare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public int compareEq(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject defineValue(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject deref(Map<java.lang.String,java.lang.Object>) ,public java.lang.String desc(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject div(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject exponent(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public abstract com.googlecode.aviator.runtime.type.AviatorType getAviatorType() ,public com.googlecode.aviator.runtime.type.AviatorObject getElement(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorObject) ,public Map<java.lang.Object,java.lang.Object> getMetadata() ,public abstract java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public abstract int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public boolean isNull(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject match(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.Object meta(java.lang.Object) ,public com.googlecode.aviator.runtime.type.AviatorObject mod(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject mult(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject neg(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject not(Map<java.lang.String,java.lang.Object>) ,public java.lang.Number numberValue(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject setValue(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftLeft(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject shiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.String stringValue(Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject sub(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public java.lang.String toString() ,public com.googlecode.aviator.runtime.type.AviatorObject unsignedShiftRight(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject withMeta(java.lang.Object, java.lang.Object) ,public com.googlecode.aviator.runtime.type.AviatorObject withoutMeta(java.lang.Object) <variables>protected Map<java.lang.Object,java.lang.Object> metadata,private static final long serialVersionUID
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/seq/AbstractSequence.java
|
AbstractSequence
|
toString
|
class AbstractSequence<T> implements Sequence<T> {
@Override
public String toString() {<FILL_FUNCTION_BODY>}
}
|
StringBuilder sb = new StringBuilder(super.toString());
sb.append("[");
boolean wasFirst = true;
Iterator<T> it = iterator();
while (it.hasNext()) {
T e = it.next();
if (wasFirst) {
sb.append(e);
wasFirst = false;
} else {
sb.append(", ").append(e);
}
}
sb.append("]");
return sb.toString();
| 43
| 131
| 174
|
<no_super_class>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/seq/ArraySequence.java
|
ArraySequence
|
iterator
|
class ArraySequence extends AbstractSequence<Object> {
private final Object a;
private final int len;
@Override
public int hintSize() {
return this.len;
}
@Override
public Collector newCollector(final int size) {
if (size <= 0) {
return new ListCollector(true);
} else {
return new ArrayCollector(size);
}
}
public ArraySequence(final Object a) {
super();
this.a = a;
this.len = ArrayUtils.getLength(a);
}
@Override
public Iterator<Object> iterator() {<FILL_FUNCTION_BODY>}
}
|
return new Iterator<Object>() {
int i = 0;
@Override
public boolean hasNext() {
return this.i < ArraySequence.this.len;
}
@Override
public Object next() {
return ArrayUtils.get(ArraySequence.this.a, this.i++);
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
| 188
| 114
| 302
|
<methods>public non-sealed void <init>() ,public java.lang.String toString() <variables>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/seq/CharSeqSequence.java
|
CharSeqSequence
|
iterator
|
class CharSeqSequence extends AbstractSequence<String> {
private final CharSequence cs;
public CharSeqSequence(final CharSequence cs) {
super();
this.cs = cs;
}
@Override
public int hintSize() {
return this.cs.length();
}
@Override
public Collector newCollector(final int size) {
return new ListCollector(size, false);
}
@Override
public Iterator<String> iterator() {<FILL_FUNCTION_BODY>}
}
|
return new Iterator<String>() {
int i = 0;
@Override
public boolean hasNext() {
return this.i < CharSeqSequence.this.cs.length();
}
@Override
public String next() {
return String.valueOf(CharSeqSequence.this.cs.charAt(this.i++));
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
| 150
| 123
| 273
|
<methods>public non-sealed void <init>() ,public java.lang.String toString() <variables>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/seq/IterableSequence.java
|
IterableSequence
|
newCollector
|
class IterableSequence extends AbstractSequence<Object> {
private final Iterable<Object> iterable;
public IterableSequence(final Iterable<Object> iterable) {
super();
this.iterable = iterable;
}
@Override
public int hintSize() {
if (this.iterable instanceof Collection) {
return ((Collection) this.iterable).size();
}
return 10;
}
@SuppressWarnings("rawtypes")
@Override
public Collector newCollector(final int size) {<FILL_FUNCTION_BODY>}
@Override
public Iterator<Object> iterator() {
return this.iterable.iterator();
}
}
|
Collection coll;
try {
coll = (Collection) this.iterable.getClass().newInstance();
} catch (Throwable t) {
coll = new ArrayList(size > 0 ? size : 10);
}
final Collection container = coll;
return new Collector() {
@SuppressWarnings("unchecked")
@Override
public void add(final Object e) {
container.add(e);
}
@Override
public Object getRawContainer() {
return container;
}
};
| 188
| 141
| 329
|
<methods>public non-sealed void <init>() ,public java.lang.String toString() <variables>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/seq/LimitedSequence.java
|
LimitedSequence
|
next
|
class LimitedSequence<T> extends AbstractSequence<T> {
private final Sequence<T> seq;
private final int maxLoopCount;
public LimitedSequence(final Sequence<T> seq, final int maxLoopCount) {
super();
this.seq = seq;
this.maxLoopCount = maxLoopCount;
}
@Override
public Iterator<T> iterator() {
final Iterator<T> rawIt = this.seq.iterator();
return new Iterator<T>() {
int c = 0;
@Override
public boolean hasNext() {
return rawIt.hasNext();
}
@Override
public T next() {<FILL_FUNCTION_BODY>}
@Override
public void remove() {
rawIt.remove();
}
};
}
@Override
public Collector newCollector(final int size) {
return this.seq.newCollector(size);
}
@Override
public int hintSize() {
return this.seq.hintSize();
}
}
|
if (++this.c > LimitedSequence.this.maxLoopCount) {
throw new ExpressionRuntimeException(
"Overflow max loop count: " + LimitedSequence.this.maxLoopCount);
}
return rawIt.next();
| 283
| 62
| 345
|
<methods>public non-sealed void <init>() ,public java.lang.String toString() <variables>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/seq/ListCollector.java
|
ListCollector
|
getRawContainer
|
class ListCollector implements Collector {
private static final int INIT_CAP = 10;
@SuppressWarnings("rawtypes")
List list;
boolean returnArray;
public ListCollector() {
this(INIT_CAP, false);
}
public ListCollector(final boolean returnArray) {
this(INIT_CAP, returnArray);
}
public ListCollector(final int size, final boolean returnArray) {
this.list = new ArrayList<>(size > 0 ? size : INIT_CAP);
this.returnArray = returnArray;
}
@SuppressWarnings("unchecked")
@Override
public void add(final Object e) {
this.list.add(e);
}
@Override
public Object getRawContainer() {<FILL_FUNCTION_BODY>}
}
|
if (this.returnArray) {
return this.list.toArray();
} else {
return this.list;
}
| 219
| 38
| 257
|
<no_super_class>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/runtime/type/seq/MapSequence.java
|
MapSequence
|
newCollector
|
class MapSequence extends AbstractSequence<Map.Entry> {
private final Map map;
public MapSequence(final Map map) {
super();
this.map = map;
}
@Override
public int hintSize() {
return this.map.size();
}
@Override
public Collector newCollector(final int size) {<FILL_FUNCTION_BODY>}
@SuppressWarnings("unchecked")
@Override
public Iterator<Map.Entry> iterator() {
return this.map.entrySet().iterator();
}
}
|
if (size > 0) {
return new ListCollector(size, false);
} else {
Map coll;
try {
coll = this.map.getClass().newInstance();
} catch (Throwable t) {
coll = new HashMap();
}
final Map container = coll;
return new Collector() {
@SuppressWarnings("unchecked")
@Override
public void add(final Object e) {
Entry entry = (Entry) e;
container.put(entry.getKey(), entry.getValue());
}
@Override
public Object getRawContainer() {
return container;
}
};
}
| 152
| 174
| 326
|
<methods>public non-sealed void <init>() ,public java.lang.String toString() <variables>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/script/AviatorBindings.java
|
AviatorBindings
|
hashCode
|
class AviatorBindings implements Bindings {
private final Env env;
public AviatorBindings() {
super();
this.env = new Env();
}
public AviatorBindings(final Bindings parentEnv) {
super();
this.env = new Env(parentEnv);
}
public void setmOverrides(final Map<String, Object> mOverrides) {
this.env.setmOverrides(mOverrides);
}
public Map<String, Object> getDefaults() {
return this.env.getDefaults();
}
public AviatorEvaluatorInstance getInstance() {
return this.env.getInstance();
}
public void setInstance(final AviatorEvaluatorInstance instance) {
this.env.setInstance(instance);
}
public void setExpression(final Expression exp) {
this.env.setExpression(exp);
}
@Override
public void clear() {
this.env.clear();
}
@Override
public int hashCode() {<FILL_FUNCTION_BODY>}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
AviatorBindings other = (AviatorBindings) obj;
if (this.env == null) {
if (other.env != null) {
return false;
}
} else if (!this.env.equals(other.env)) {
return false;
}
return true;
}
@Override
public boolean containsKey(final Object key) {
return this.env.containsKey(key);
}
@Override
public boolean containsValue(final Object value) {
return this.env.containsValue(value);
}
@Override
public Set<Entry<String, Object>> entrySet() {
return this.env.entrySet();
}
@Override
public Object get(final Object key) {
return this.env.get(key);
}
@Override
public boolean isEmpty() {
return this.env.isEmpty();
}
@Override
public Set<String> keySet() {
return this.env.keySet();
}
public Object override(final String key, final Object value) {
return this.env.override(key, value);
}
@Override
public Object put(final String key, final Object value) {
return this.env.put(key, value);
}
@Override
public void putAll(final Map map) {
this.env.putAll(map);
}
@Override
public Object remove(final Object key) {
return this.env.remove(key);
}
public Object forgot(final Object key) {
return this.env.forgot(key);
}
@Override
public int size() {
return this.env.size();
}
@Override
public Collection<Object> values() {
return this.env.values();
}
@Override
public String toString() {
return this.env.toString();
}
}
|
final int prime = 31;
int result = 1;
result = prime * result + ((this.env == null) ? 0 : this.env.hashCode());
return result;
| 870
| 50
| 920
|
<no_super_class>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/script/AviatorScriptEngine.java
|
DynamicMethodInvocationHandler
|
getCachingKey
|
class DynamicMethodInvocationHandler implements InvocationHandler {
private final Object thiz;
public DynamicMethodInvocationHandler(final Object thiz) {
super();
this.thiz = thiz;
}
@Override
public Object invoke(final Object proxy, final Method method, final Object[] args)
throws Throwable {
String name = method.getName();
return invokeMethod(this.thiz, name, args);
}
}
@SuppressWarnings("unchecked")
@Override
public <T> T getInterface(final Object thiz, final Class<T> clasz) {
return (T) Proxy.newProxyInstance(clasz.getClassLoader(), new Class[] {clasz},
new DynamicMethodInvocationHandler(thiz));
}
public AviatorScriptEngine(final Bindings n) {
super(n);
this.factory = AviatorScriptEngineFactory.newInstance();
this.engine = AviatorEvaluator.newInstance();
}
public AviatorScriptEngine(final AviatorScriptEngineFactory factory) {
this.factory = factory;
this.engine = AviatorEvaluator.newInstance();
this.engine.setFunctionMissing(JavaMethodReflectionFunctionMissing.getInstance());
}
@Override
public CompiledScript compile(final String script) throws ScriptException {
return new CompiledAviatorScript(this,
this.engine.compile(getCachingKey(script), script, this.cached));
}
public String getCachingKey(final String script) {<FILL_FUNCTION_BODY>
|
if (script.length() < KEY_THRESHOLD) {
return script;
} else {
return Utils.md5sum(script);
}
| 421
| 45
| 466
|
<methods>public void <init>() ,public void <init>(javax.script.Bindings) ,public java.lang.Object eval(java.io.Reader) throws javax.script.ScriptException,public java.lang.Object eval(java.lang.String) throws javax.script.ScriptException,public java.lang.Object eval(java.io.Reader, javax.script.Bindings) throws javax.script.ScriptException,public java.lang.Object eval(java.lang.String, javax.script.Bindings) throws javax.script.ScriptException,public java.lang.Object get(java.lang.String) ,public javax.script.Bindings getBindings(int) ,public javax.script.ScriptContext getContext() ,public void put(java.lang.String, java.lang.Object) ,public void setBindings(javax.script.Bindings, int) ,public void setContext(javax.script.ScriptContext) <variables>protected javax.script.ScriptContext context
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/script/AviatorScriptEngineFactory.java
|
AviatorScriptEngineFactory
|
getMethodCallSyntax
|
class AviatorScriptEngineFactory implements ScriptEngineFactory {
private static final List<String> extensions =
Collections.unmodifiableList(Arrays.asList("av", "aviator"));
private static final List<String> mimeTypes =
Collections.unmodifiableList(Arrays.asList("text/aviator", "text/aviatorscript"));
private static final List<String> names = Collections
.unmodifiableList(Arrays.asList("Aviator", "aviator", "aviatorscript", "AviatorScript"));
private static final Map<String, String> PARAM_MAP = new HashMap<String, String>();
static {
PARAM_MAP.put(ScriptEngine.ENGINE, "Aviator");
PARAM_MAP.put(ScriptEngine.ENGINE_VERSION, AviatorEvaluator.VERSION);
PARAM_MAP.put(ScriptEngine.LANGUAGE, "AviatorScript");
PARAM_MAP.put(ScriptEngine.LANGUAGE_VERSION, AviatorEvaluator.VERSION);
}
public static final AviatorScriptEngineFactory newInstance() {
return new AviatorScriptEngineFactory();
}
@Override
public String getEngineName() {
return PARAM_MAP.get(ScriptEngine.ENGINE);
}
@Override
public String getEngineVersion() {
return PARAM_MAP.get(ScriptEngine.ENGINE_VERSION);
}
@Override
public List<String> getExtensions() {
return extensions;
}
@Override
public String getLanguageName() {
return PARAM_MAP.get(ScriptEngine.LANGUAGE);
}
@Override
public String getLanguageVersion() {
return PARAM_MAP.get(ScriptEngine.LANGUAGE_VERSION);
}
@Override
public String getMethodCallSyntax(final String obj, final String m, final String... args) {<FILL_FUNCTION_BODY>}
@Override
public List<String> getMimeTypes() {
return mimeTypes;
}
@Override
public List<String> getNames() {
return names;
}
@Override
public String getOutputStatement(final String toDisplay) {
return "print(+" + toDisplay + ")";
}
@Override
public Object getParameter(final String key) {
return PARAM_MAP.get(key);
}
@Override
public String getProgram(final String... statements) {
StringBuilder sb = new StringBuilder();
for (String stmt : statements) {
sb.append(stmt).append(";");
}
return sb.toString();
}
@Override
public ScriptEngine getScriptEngine() {
return new AviatorScriptEngine(this);
}
}
|
StringBuilder sb = new StringBuilder(m);
sb.append("(").append(obj);
if (args != null) {
for (String s : args) {
sb.append(",").append(s);
}
}
sb.append(")");
return sb.toString();
| 733
| 81
| 814
|
<no_super_class>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/script/CompiledAviatorScript.java
|
CompiledAviatorScript
|
eval
|
class CompiledAviatorScript extends CompiledScript {
private final AviatorScriptEngine engine;
private final Expression expression;
CompiledAviatorScript(final AviatorScriptEngine engine, final Expression expression) {
this.engine = engine;
this.expression = expression;
}
@Override
public Object eval(final ScriptContext context) throws ScriptException {<FILL_FUNCTION_BODY>}
@Override
public ScriptEngine getEngine() {
return this.engine;
}
}
|
try {
return this.expression.execute(context.getBindings(ScriptContext.ENGINE_SCOPE));
} catch (Exception e) {
throw new ScriptException(e);
}
| 139
| 54
| 193
|
<methods>public void <init>() ,public java.lang.Object eval() throws javax.script.ScriptException,public abstract java.lang.Object eval(javax.script.ScriptContext) throws javax.script.ScriptException,public java.lang.Object eval(javax.script.Bindings) throws javax.script.ScriptException,public abstract javax.script.ScriptEngine getEngine() <variables>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/serialize/AviatorObjectInputStream.java
|
AviatorObjectInputStream
|
resolveClass
|
class AviatorObjectInputStream extends ObjectInputStream {
private AviatorClassLoader classLoader;
private AviatorEvaluatorInstance instance;
private Map<String, byte[]> classBytesCache = new HashMap<String, byte[]>();
public AviatorObjectInputStream(InputStream in, AviatorEvaluatorInstance instance)
throws IOException {
super(in);
this.classLoader = instance.getAviatorClassLoader(true);
this.instance = instance;
this.enableResolveObject(true);
}
@Override
protected Object resolveObject(Object obj) throws IOException {
Object object = super.resolveObject(obj);
if (object instanceof BaseExpression) {
BaseExpression exp = (BaseExpression) object;
configureExpression(exp);
}
if (object instanceof Env) {
((Env) object).setInstance(this.instance);
}
// Processing some internal constants.
if (object instanceof AviatorBoolean) {
AviatorBoolean bool = (AviatorBoolean) object;
if (bool.getBooleanValue()) {
object = AviatorBoolean.TRUE;
} else {
object = AviatorBoolean.FALSE;
}
}
if (object instanceof AviatorNil) {
object = AviatorNil.NIL;
}
if (object instanceof Range) {
if (((Range) object).isLoop()) {
object = Range.LOOP;
}
}
if (object instanceof Variable) {
object = SymbolTable.tryReserveKeyword((Variable) object);
}
return object;
}
private void configureExpression(BaseExpression exp) {
exp.setInstance(this.instance);
if (exp instanceof ClassExpression) {
((ClassExpression) exp).setClassBytes(this.classBytesCache.get(exp.getClass().getName()));
}
}
@Override
protected Class<?> resolveClass(ObjectStreamClass desc)
throws IOException, ClassNotFoundException {<FILL_FUNCTION_BODY>}
}
|
Class<?> clazz = null;
try {
clazz = super.resolveClass(desc);
} catch (ClassNotFoundException e) {
}
if (clazz == null && desc.getName().startsWith("AviatorScript_")) {
int len = this.readInt();
byte[] classBytes = new byte[len];
int readed = 0;
while (readed < classBytes.length) {
int n = this.read(classBytes, readed, classBytes.length - readed);
if (n < 0) {
break;
}
readed += n;
}
String name = desc.getName();
this.classBytesCache.put(name, classBytes);
try {
// already in class loader
clazz = Class.forName(name, false, this.classLoader);
} catch (ClassNotFoundException ex) {
}
if (clazz == null) {
// still not found, try to define it.
try {
clazz = ClassDefiner.defineClass(desc.getName(), Expression.class, classBytes,
this.classLoader, true);
} catch (Throwable t) {
throw Reflector.sneakyThrow(t);
}
}
}
if (clazz == null) {
throw new ClassNotFoundException("Class not found:" + desc.getName());
}
return clazz;
| 520
| 361
| 881
|
<methods>public void <init>(java.io.InputStream) throws java.io.IOException,public int available() throws java.io.IOException,public void close() throws java.io.IOException,public void defaultReadObject() throws java.io.IOException, java.lang.ClassNotFoundException,public final java.io.ObjectInputFilter getObjectInputFilter() ,public int read() throws java.io.IOException,public int read(byte[], int, int) throws java.io.IOException,public boolean readBoolean() throws java.io.IOException,public byte readByte() throws java.io.IOException,public char readChar() throws java.io.IOException,public double readDouble() throws java.io.IOException,public java.io.ObjectInputStream.GetField readFields() throws java.io.IOException, java.lang.ClassNotFoundException,public float readFloat() throws java.io.IOException,public void readFully(byte[]) throws java.io.IOException,public void readFully(byte[], int, int) throws java.io.IOException,public int readInt() throws java.io.IOException,public java.lang.String readLine() throws java.io.IOException,public long readLong() throws java.io.IOException,public final java.lang.Object readObject() throws java.io.IOException, java.lang.ClassNotFoundException,public short readShort() throws java.io.IOException,public java.lang.String readUTF() throws java.io.IOException,public java.lang.Object readUnshared() throws java.io.IOException, java.lang.ClassNotFoundException,public int readUnsignedByte() throws java.io.IOException,public int readUnsignedShort() throws java.io.IOException,public void registerValidation(java.io.ObjectInputValidation, int) throws java.io.NotActiveException, java.io.InvalidObjectException,public final void setObjectInputFilter(java.io.ObjectInputFilter) ,public int skipBytes(int) throws java.io.IOException<variables>static final boolean $assertionsDisabled,private static final int NULL_HANDLE,private static final jdk.internal.misc.Unsafe UNSAFE,private final java.io.ObjectInputStream.BlockDataInputStream bin,private boolean closed,private java.io.SerialCallbackContext curContext,private boolean defaultDataEnd,private long depth,private final boolean enableOverride,private boolean enableResolve,private final java.io.ObjectInputStream.HandleTable handles,private int passHandle,private static final Map<java.lang.String,Class<?>> primClasses,private java.io.ObjectInputFilter serialFilter,private boolean streamFilterSet,private long totalObjectRefs,private static final java.lang.Object unsharedMarker,private final java.io.ObjectInputStream.ValidationList vlist
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/serialize/AviatorObjectOutputStream.java
|
AviatorObjectOutputStream
|
annotateClass
|
class AviatorObjectOutputStream extends ObjectOutputStream {
private Map<String, byte[]> classBytesCache = new HashMap<String, byte[]>();
public AviatorObjectOutputStream(OutputStream out) throws IOException {
super(out);
this.enableReplaceObject(true);
}
@Override
protected Object replaceObject(Object obj) throws IOException {
if (obj instanceof ClassExpression) {
this.classBytesCache.put(obj.getClass().getName(), ((ClassExpression) obj).getClassBytes());
}
return super.replaceObject(obj);
}
@Override
protected void annotateClass(Class<?> cl) throws IOException {<FILL_FUNCTION_BODY>}
}
|
if (ClassExpression.class.isAssignableFrom(cl) && cl != ClassExpression.class) {
byte[] classBytes = this.classBytesCache.get(cl.getName());
if (classBytes == null) {
throw new IllegalArgumentException("Class bytes not found: " + cl.getName()
+ ", forgot to enable Options.SERIALIZABLE before compiling the script?");
}
this.writeInt(classBytes.length);
this.write(classBytes);
}
| 181
| 125
| 306
|
<methods>public void <init>(java.io.OutputStream) throws java.io.IOException,public void close() throws java.io.IOException,public void defaultWriteObject() throws java.io.IOException,public void flush() throws java.io.IOException,public java.io.ObjectOutputStream.PutField putFields() throws java.io.IOException,public void reset() throws java.io.IOException,public void useProtocolVersion(int) throws java.io.IOException,public void write(int) throws java.io.IOException,public void write(byte[]) throws java.io.IOException,public void write(byte[], int, int) throws java.io.IOException,public void writeBoolean(boolean) throws java.io.IOException,public void writeByte(int) throws java.io.IOException,public void writeBytes(java.lang.String) throws java.io.IOException,public void writeChar(int) throws java.io.IOException,public void writeChars(java.lang.String) throws java.io.IOException,public void writeDouble(double) throws java.io.IOException,public void writeFields() throws java.io.IOException,public void writeFloat(float) throws java.io.IOException,public void writeInt(int) throws java.io.IOException,public void writeLong(long) throws java.io.IOException,public final void writeObject(java.lang.Object) throws java.io.IOException,public void writeShort(int) throws java.io.IOException,public void writeUTF(java.lang.String) throws java.io.IOException,public void writeUnshared(java.lang.Object) throws java.io.IOException<variables>static final boolean $assertionsDisabled,private final java.io.ObjectOutputStream.BlockDataOutputStream bout,private java.io.SerialCallbackContext curContext,private java.io.ObjectOutputStream.PutFieldImpl curPut,private final java.io.ObjectOutputStream.DebugTraceInfoStack debugInfoStack,private int depth,private final boolean enableOverride,private boolean enableReplace,private static final boolean extendedDebugInfo,private final java.io.ObjectOutputStream.HandleTable handles,private byte[] primVals,private int protocol,private final java.io.ObjectOutputStream.ReplaceTable subs
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/spring/SpringContextFunctionLoader.java
|
SpringContextFunctionLoader
|
onFunctionNotFound
|
class SpringContextFunctionLoader implements FunctionLoader, ApplicationContextAware {
private ApplicationContext applicationContext;
public SpringContextFunctionLoader() {
super();
}
public SpringContextFunctionLoader(final ApplicationContext applicationContext) {
super();
this.applicationContext = applicationContext;
}
public ApplicationContext getApplicationContext() {
return this.applicationContext;
}
@Override
public void setApplicationContext(final ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
@Override
public AviatorFunction onFunctionNotFound(final String name) {<FILL_FUNCTION_BODY>}
}
|
try {
return (AviatorFunction) this.applicationContext.getBean(name);
} catch (NoSuchBeanDefinitionException e) {
return null;
}
| 170
| 47
| 217
|
<no_super_class>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/utils/ArrayHashMap.java
|
MapEntry
|
remove
|
class MapEntry<K, V> implements Map.Entry<K, V>, Serializable {
private static final long serialVersionUID = 1759214536880718767L;
K key;
V value;
int hash;
boolean deleted;
public MapEntry(final K key, final V value, final int hash) {
super();
this.key = key;
this.value = value;
this.hash = hash;
}
@Override
public K getKey() {
return this.key;
}
@Override
public V getValue() {
return this.value;
}
@Override
public V setValue(final V value) {
V old = this.value;
this.value = value;
return old;
}
}
private MapEntry<K, V>[] entries;
private int size;
private int loadThreshold;
static final int hash(final Object key) {
int h;
return (key == null) ? 0 : (h = key.hashCode()) ^ (h >>> 16);
}
public ArrayHashMap() {
this.clear();
}
@SuppressWarnings({"unchecked", "rawtypes"})
private void setEntries(final MapEntry[] entries) {
this.entries = entries;
this.loadThreshold = Math.round(this.entries.length * LOAD_FACTOR);
}
@Override
public int size() {
return this.size;
}
@Override
public boolean containsKey(final Object key) {
MapEntry<K, V>[] table = this.entries;
if (this.size == 0) {
return false;
}
int hash = hash(key);
int index = hash & (table.length - 1);
for (int i = index; i < table.length; i++) {
MapEntry<K, V> entry = table[i];
if (entry == null) {
return false;
}
if (entry.deleted) {
if (entry.hash == hash && entry.key.equals(key)) {
return false;
}
} else if (entry.hash == hash && entry.key.equals(key)) {
return true;
}
}
return false;
}
@Override
public V get(final Object key) {
MapEntry<K, V>[] table = this.entries;
int hash = hash(key);
int index = hash & (table.length - 1);
for (int i = index; i < table.length; i++) {
MapEntry<K, V> entry = table[i];
if (entry == null) {
return null;
}
if (entry.deleted) {
if (entry.hash == hash && entry.key.equals(key)) {
return null;
}
} else if (entry.hash == hash && entry.key.equals(key)) {
return entry.value;
}
}
return null;
}
@Override
public void clear() {
this.size = 0;
setEntries(new MapEntry[8]);
}
@Override
public V put(final K key, final V value) {
int hash = hash(key);
MapEntry<K, V>[] table = this.entries;
while (true) {
int index = hash & (table.length - 1);
MapEntry<K, V> tombstone = null;
for (int i = index; i < table.length; i++) {
MapEntry<K, V> entry = table[i];
if (entry != null && !entry.deleted) {
if (entry.hash == hash && entry.key.equals(key)) {
return entry.setValue(value);
}
} else if (entry != null && entry.deleted) {
if (tombstone == null) {
tombstone = entry;
}
} else if (tombstone != null) {
this.size++;
tombstone.key = key;
tombstone.hash = hash;
tombstone.deleted = false;
resizeIfLoadHigh(table);
return tombstone.setValue(value);
} else {
entry = new MapEntry<K, V>(key, value, hash);
table[i] = entry;
this.size++;
resizeIfLoadHigh(table);
return null;
}
}
table = resize(table);
setEntries(table);
}
}
private void resizeIfLoadHigh(final MapEntry<K, V>[] table) {
if (this.size >= this.loadThreshold) {
setEntries(this.resize(table));
}
}
@SuppressWarnings("unchecked")
private MapEntry<K, V>[] resize(final MapEntry<K, V>[] table) {
MapEntry<K, V>[] newTable = new MapEntry[table.length * 2];
for (int i = 0; i < table.length; i++) {
MapEntry<K, V> entry = table[i];
if (entry != null && !entry.deleted) {
int hash = entry.hash;
int index = hash & (newTable.length - 1);
boolean success = false;
for (int j = index; j < newTable.length; j++) {
if (newTable[j] == null) {
newTable[j] = entry;
success = true;
break;
}
}
assert (success);
}
}
return newTable;
}
@Override
public V remove(final Object key) {<FILL_FUNCTION_BODY>
|
MapEntry<K, V>[] table = this.entries;
int hash = hash(key);
int index = hash & (table.length - 1);
for (int i = index; i < table.length; i++) {
MapEntry<K, V> entry = table[i];
if (entry == null) {
return null;
}
if (entry.deleted) {
if (entry.hash == hash && entry.key.equals(key)) {
return null;
}
}
if (entry.hash == hash && entry.key.equals(key)) {
entry.deleted = true;
entry.hash = 0;
this.size--;
return entry.setValue(null);
}
}
return null;
| 1,507
| 202
| 1,709
|
<methods>public void clear() ,public boolean containsKey(java.lang.Object) ,public boolean containsValue(java.lang.Object) ,public abstract Set<Entry<K,V>> entrySet() ,public boolean equals(java.lang.Object) ,public V get(java.lang.Object) ,public int hashCode() ,public boolean isEmpty() ,public Set<K> keySet() ,public V put(K, V) ,public void putAll(Map<? extends K,? extends V>) ,public V remove(java.lang.Object) ,public int size() ,public java.lang.String toString() ,public Collection<V> values() <variables>transient Set<K> keySet,transient Collection<V> values
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/utils/ArrayUtils.java
|
ArrayUtils
|
get
|
class ArrayUtils {
private ArrayUtils() {}
public static int getLength(final Object a) {
if (a instanceof byte[]) {
return ((byte[]) a).length;
} else if (a instanceof short[]) {
return ((short[]) a).length;
} else if (a instanceof int[]) {
return ((int[]) a).length;
} else if (a instanceof long[]) {
return ((long[]) a).length;
} else if (a instanceof float[]) {
return ((float[]) a).length;
} else if (a instanceof double[]) {
return ((double[]) a).length;
} else if (a instanceof String[]) {
return ((String[]) a).length;
} else if (a instanceof BigDecimal[]) {
return ((BigDecimal[]) a).length;
} else if (a instanceof BigInteger[]) {
return ((BigInteger[]) a).length;
} else if (a instanceof Object[]) {
return ((Object[]) a).length;
}
return Array.getLength(a);
}
public static Object get(final Object a, final int index) {<FILL_FUNCTION_BODY>}
public static void set(final Object a, final int index, final Object val) {
if (a instanceof byte[]) {
((byte[]) a)[index] = (byte) val;
} else if (a instanceof short[]) {
((short[]) a)[index] = (short) val;
} else if (a instanceof int[]) {
((int[]) a)[index] = (int) val;
} else if (a instanceof long[]) {
((long[]) a)[index] = (long) val;
} else if (a instanceof float[]) {
((float[]) a)[index] = (float) val;
} else if (a instanceof double[]) {
((double[]) a)[index] = (double) val;
} else if (a instanceof String[]) {
((String[]) a)[index] = (String) val;
} else if (a instanceof BigDecimal[]) {
((BigDecimal[]) a)[index] = (BigDecimal) val;
} else if (a instanceof BigInteger[]) {
((BigInteger[]) a)[index] = (BigInteger) val;
} else if (a instanceof Object[]) {
((Object[]) a)[index] = val;
} else {
Array.set(a, index, val);
}
}
}
|
if (a instanceof byte[]) {
return ((byte[]) a)[index];
} else if (a instanceof short[]) {
return ((short[]) a)[index];
} else if (a instanceof int[]) {
return ((int[]) a)[index];
} else if (a instanceof long[]) {
return ((long[]) a)[index];
} else if (a instanceof float[]) {
return ((float[]) a)[index];
} else if (a instanceof double[]) {
return ((double[]) a)[index];
} else if (a instanceof String[]) {
return ((String[]) a)[index];
} else if (a instanceof BigDecimal[]) {
return ((BigDecimal[]) a)[index];
} else if (a instanceof BigInteger[]) {
return ((BigInteger[]) a)[index];
} else if (a instanceof Object[]) {
return ((Object[]) a)[index];
}
return Array.get(a, index);
| 636
| 252
| 888
|
<no_super_class>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/utils/Reflector.java
|
PropertyFoundResult
|
retrieveGetterHandle
|
class PropertyFoundResult {
MethodHandle handle;
boolean isBooleanType;
ClassMethodFunction func;
public PropertyFoundResult(final ClassMethodFunction func) {
super();
this.func = func;
}
public PropertyFoundResult(final MethodHandle handle, final boolean isBooleanType) {
super();
this.isBooleanType = isBooleanType;
this.handle = handle;
}
@Override
public String toString() {
return "MethodHandleResult [handle=" + this.handle + ", isBooleanType=" + this.isBooleanType
+ ", func=" + this.func + "]";
}
}
/**
* static and instance fields property caching
*/
public static ConcurrentHashMap<Class<?>, Reference<Map<String, PropertyFoundResult>>> cachedProperties =
new ConcurrentHashMap<Class<?>, Reference<Map<String, PropertyFoundResult>>>();
/**
* instance fields setter caching.
*/
public static ConcurrentHashMap<Class<?>, Reference<Map<String, PropertyFoundResult>>> cachedSettters =
new ConcurrentHashMap<Class<?>, Reference<Map<String, PropertyFoundResult>>>();
private static final ReferenceQueue<Map<String, PropertyFoundResult>> cachedSetterRq =
new ReferenceQueue<>();
private static final ReferenceQueue<Map<String, PropertyFoundResult>> cachePropertyRq =
new ReferenceQueue<>();
/**
* static method caching
*/
public static ConcurrentHashMap<Class<?>, Reference<Map<String, PropertyFoundResult>>> cachedMethods =
new ConcurrentHashMap<Class<?>, Reference<Map<String, PropertyFoundResult>>>();
private static final ReferenceQueue<Map<String, PropertyFoundResult>> cacheMethodRq =
new ReferenceQueue<>();
private static String genGetterName(final String prefix, final String name) {
StringBuilder sb = new StringBuilder(prefix);
capitalize(sb, name);
return sb.toString();
}
public static enum PropertyType {
Getter, StaticField, StaticMethod;
boolean isStaticProperty() {
return this == StaticField || this == StaticMethod;
}
}
public static Object fastGetProperty(final Object obj, final String name,
final PropertyType type) {
final Class<?> clazz = type.isStaticProperty() ? (Class<?>) obj : obj.getClass();
Map<String, PropertyFoundResult> results = null;
if (type == PropertyType.StaticMethod) {
results = getClassPropertyResults(cachedMethods, cacheMethodRq, clazz);
} else {
results = getClassPropertyResults(cachedProperties, cachePropertyRq, clazz);
}
try {
PropertyFoundResult result = results.get(name);
if (result == null) {
switch (type) {
case StaticField:
result = retrieveStaticFieldHandle(results, clazz, name);
break;
case Getter:
result = retrieveGetterHandle(results, clazz, name);
break;
case StaticMethod:
result = retrieveStaticFunction(results, clazz, name);
break;
}
}
if (type == PropertyType.StaticMethod) {
return result.func;
}
if (result.handle != null) {
Object ret =
type == PropertyType.StaticField ? result.handle.invoke() : result.handle.invoke(obj);
if (result.isBooleanType && !(ret instanceof Boolean)) {
putDummyHandle(name, results);
return throwNoSuchPropertyException(
"Property `" + name + "` not found in java bean: " + obj);
}
return ret;
} else {
if (type == PropertyType.StaticMethod) {
return null;
}
return throwNoSuchPropertyException(
"Property `" + name + "` not found in java bean: " + obj);
}
} catch (Throwable t) {
if (!results.containsKey(name)) {
putDummyHandle(name, results);
}
throw sneakyThrow(t);
}
}
public static Object throwNoSuchPropertyException(final String msg) {
throw new NoSuchPropertyException(msg);
}
private static PropertyFoundResult retrieveStaticFieldHandle(
final Map<String, PropertyFoundResult> results, final Class<?> clazz, final String name)
throws IllegalAccessException, NoSuchFieldException {
PropertyFoundResult result;
Field field = null;
try {
field = clazz.getDeclaredField(name);
} catch (NoSuchFieldException e) {
}
if (field != null && Modifier.isStatic(field.getModifiers())) {
field.setAccessible(true);
MethodHandle handle = MethodHandles.lookup().unreflectGetter(field);
result = new PropertyFoundResult(handle, false);
} else {
result = new PropertyFoundResult(null, false);
}
results.put(name, result);
return result;
}
private static PropertyFoundResult retrieveStaticFunction(
final Map<String, PropertyFoundResult> results, final Class<?> clazz, final String name)
throws IllegalAccessException, NoSuchMethodException {
PropertyFoundResult result;
List<Method> methods = getStaticMethods(clazz, name);
if (methods != null && !methods.isEmpty()) {
// cast the methods into a function.
ClassMethodFunction func = new ClassMethodFunction(clazz, true, name, name, methods);
result = new PropertyFoundResult(func);
} else {
result = new PropertyFoundResult(null);
}
results.put(name, result);
return result;
}
private static PropertyFoundResult retrieveGetterHandle(
final Map<String, PropertyFoundResult> results, final Class<?> clazz, final String name)
throws IllegalAccessException {<FILL_FUNCTION_BODY>
|
PropertyFoundResult result;
List<Method> methods = getInstanceMethods(clazz, genGetterName("get", name));
boolean isBooleanType = false;
if (methods == null || methods.isEmpty()) {
methods = getInstanceMethods(clazz, genGetterName("is", name));
isBooleanType = true;
}
if ((methods == null || methods.isEmpty()) && name.startsWith("is")) {
// Fix https://github.com/killme2008/aviatorscript/issues/517
methods = getInstanceMethods(clazz, name);
isBooleanType = true;
}
if (methods != null && !methods.isEmpty()) {
Method method = methods.get(0);
for (Method m : methods) {
if (m.getParameterTypes().length == 0) {
method = m;
break;
}
}
method.setAccessible(true);
MethodHandle handle = MethodHandles.lookup().unreflect(method);
result = new PropertyFoundResult(handle, isBooleanType);
} else {
result = new PropertyFoundResult(null, isBooleanType);
}
results.put(name, result);
return result;
| 1,517
| 310
| 1,827
|
<no_super_class>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/utils/TypeUtils.java
|
TypeUtils
|
ln
|
class TypeUtils {
public static final boolean isBigInt(final Object value) {
return value instanceof BigInteger;
}
public static final boolean isDecimal(final Object value) {
return value instanceof BigDecimal;
}
public static final boolean isLong(final Object value) {
return value instanceof Integer || value instanceof Long || value instanceof Byte
|| value instanceof Short;
}
public static final boolean isDouble(final Object value) {
return value instanceof Float || value instanceof Double;
}
public static final boolean isString(final Object value) {
return value instanceof String || value instanceof Character;
}
public static long NEWTON_METHOD_REPEATS = 10000;
public static int comapreLong(final long x, final long y) {
if (x > y) {
return 1;
} else if (x < y) {
return -1;
} else {
return 0;
}
}
/**
* newton method to get natural logarithm
*
* @param x
* @return
*/
public static BigDecimal ln(final Map<String, Object> env, BigDecimal x) {<FILL_FUNCTION_BODY>}
public static final Map<String, Class<?>> PRIMITIVE_TYPES = new HashMap<>();
static {
TypeUtils.PRIMITIVE_TYPES.put("int", Integer.TYPE);
TypeUtils.PRIMITIVE_TYPES.put("long", Long.TYPE);
TypeUtils.PRIMITIVE_TYPES.put("double", Double.TYPE);
TypeUtils.PRIMITIVE_TYPES.put("float", Float.TYPE);
TypeUtils.PRIMITIVE_TYPES.put("bool", Boolean.TYPE);
TypeUtils.PRIMITIVE_TYPES.put("char", Character.TYPE);
TypeUtils.PRIMITIVE_TYPES.put("byte", Byte.TYPE);
TypeUtils.PRIMITIVE_TYPES.put("void", Void.TYPE);
TypeUtils.PRIMITIVE_TYPES.put("short", Short.TYPE);
}
}
|
if (x.equals(BigDecimal.ONE)) {
return BigDecimal.ZERO;
}
x = x.subtract(BigDecimal.ONE);
BigDecimal ret = new BigDecimal(NEWTON_METHOD_REPEATS + 1);
MathContext mathContext = RuntimeUtils.getMathContext(env);
for (long i = NEWTON_METHOD_REPEATS; i >= 0; i--) {
BigDecimal N = new BigDecimal(i / 2 + 1).pow(2);
N = N.multiply(x, mathContext);
ret = N.divide(ret, mathContext);
N = new BigDecimal(i + 1);
ret = ret.add(N, mathContext);
}
ret = x.divide(ret, mathContext);
return ret;
| 555
| 217
| 772
|
<no_super_class>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/utils/Utils.java
|
Utils
|
bytesToHex
|
class Utils {
private static final String CURRENT_VERSION = "5.0.0";
private Utils() {
}
private static final ThreadLocal<MessageDigest> MESSAGE_DIGEST_LOCAL =
new ThreadLocal<MessageDigest>() {
@Override
protected MessageDigest initialValue() {
try {
return MessageDigest.getInstance("md5");
} catch (Exception e) {
throw Reflector.sneakyThrow(e);
}
}
};
private static final char[] HEX_ARRAY = "0123456789ABCDEF".toCharArray();
public static String bytesToHex(final byte[] bytes) {<FILL_FUNCTION_BODY>}
public static String md5sum(final String s) {
MessageDigest md = MESSAGE_DIGEST_LOCAL.get();
md.reset();
byte[] messageDigest = md.digest(s.getBytes());
return bytesToHex(messageDigest);
}
public static String readFully(final Reader reader) throws IOException {
final char[] arr = new char[16 * 1024];
final StringBuilder buf = new StringBuilder();
int numChars;
while ((numChars = reader.read(arr, 0, arr.length)) > 0) {
buf.append(arr, 0, numChars);
}
return buf.toString();
}
public static AviatorNumber exponent(final Number base, final Number exp,
final Map<String, Object> env) {
final int expInt = exp.intValue();
if (base instanceof BigInteger) {
return new AviatorBigInt(((BigInteger) base).pow(expInt));
} else if (base instanceof BigDecimal) {
return new AviatorDecimal(((BigDecimal) base).pow(expInt, RuntimeUtils.getMathContext(env)));
} else {
final double ret = Math.pow(base.doubleValue(), exp.doubleValue());
if (TypeUtils.isDouble(base) || TypeUtils.isDouble(exp) || exp.doubleValue() < 0) {
return new AviatorDouble(ret);
} else {
return AviatorLong.valueOf((long) ret);
}
}
}
public static String getAviatorScriptVersion() {
Properties prop = new Properties();
InputStream in = null;
try {
in = Utils.class
.getResourceAsStream("/META-INF/maven/com.googlecode.aviator/aviator/pom.properties");
prop.load(in);
return prop.getProperty("version", CURRENT_VERSION);
} catch (Throwable e) {
// ignore
} finally {
try {
in.close();
} catch (Exception ex) {
}
}
return CURRENT_VERSION;
}
public static boolean isAndroid() {
try {
Class.forName("android.os.Build");
return true;
} catch (ClassNotFoundException e) {
return false;
}
}
}
|
char[] hexChars = new char[bytes.length * 2];
for (int j = 0; j < bytes.length; j++) {
int v = bytes[j] & 0xFF;
hexChars[j * 2] = HEX_ARRAY[v >>> 4];
hexChars[j * 2 + 1] = HEX_ARRAY[v & 0x0F];
}
return new String(hexChars);
| 806
| 120
| 926
|
<no_super_class>
|
killme2008_aviatorscript
|
aviatorscript/src/main/java/com/googlecode/aviator/utils/VarNameGenerator.java
|
VarNameGenerator
|
getCharsFromLong
|
class VarNameGenerator {
private long number;
private static final String TEMP_VAR_PREFIX = "A_";
private static final int TEMP_LEN =
TEMP_VAR_PREFIX.length() + String.valueOf(Long.MAX_VALUE).length();
private final char[] chars;
private int count;
public VarNameGenerator() {
this(0);
}
public VarNameGenerator(final long n) {
this.number = n;
this.chars = new char[TEMP_LEN];
TEMP_VAR_PREFIX.getChars(0, TEMP_VAR_PREFIX.length(), this.chars, 0);
this.count = TEMP_VAR_PREFIX.length();
}
/**
* Generate a temporal variable name.
*
* @return
*/
public final String gen() {
long n = this.number++;
if (n < 0) {
this.number = 0;
n = this.number++;
}
append(n);
return new String(this.chars, 0, this.count);
}
// Moved from Long.stringSize
static int stringSize(final long x) {
long p = 10;
for (int i = 1; i < 19; i++) {
if (x < p) {
return i;
}
p = 10 * p;
}
return 19;
}
final static char[] DigitOnes = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2',
'3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1',
'2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8',
'9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',};
final static char[] digits =
{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h',
'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
final static char[] DigitTens = {'0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1',
'1', '1', '1', '1', '1', '1', '1', '2', '2', '2', '2', '2', '2', '2', '2', '2', '2', '3', '3',
'3', '3', '3', '3', '3', '3', '3', '3', '4', '4', '4', '4', '4', '4', '4', '4', '4', '4', '5',
'5', '5', '5', '5', '5', '5', '5', '5', '5', '6', '6', '6', '6', '6', '6', '6', '6', '6', '6',
'7', '7', '7', '7', '7', '7', '7', '7', '7', '7', '8', '8', '8', '8', '8', '8', '8', '8', '8',
'8', '9', '9', '9', '9', '9', '9', '9', '9', '9', '9',};
// moved from Long.getChars
static void getCharsFromLong(long i, final int index, final char[] buf) {<FILL_FUNCTION_BODY>}
private void append(final long l) {
int appendedLength = stringSize(l);
int spaceNeeded = TEMP_VAR_PREFIX.length() + appendedLength;
getCharsFromLong(l, spaceNeeded, this.chars);
this.count = spaceNeeded;
}
}
|
long q;
int r;
int charPos = index;
char sign = 0;
if (i < 0) {
sign = '-';
i = -i;
}
// Get 2 digits/iteration using longs until quotient fits into an int
while (i > Integer.MAX_VALUE) {
q = i / 100;
// really: r = i - (q * 100);
r = (int) (i - ((q << 6) + (q << 5) + (q << 2)));
i = q;
buf[--charPos] = DigitOnes[r];
buf[--charPos] = DigitTens[r];
}
// Get 2 digits/iteration using ints
int q2;
int i2 = (int) i;
while (i2 >= 65536) {
q2 = i2 / 100;
// really: r = i2 - (q * 100);
r = i2 - ((q2 << 6) + (q2 << 5) + (q2 << 2));
i2 = q2;
buf[--charPos] = DigitOnes[r];
buf[--charPos] = DigitTens[r];
}
// Fall thru to fast mode for smaller numbers
// assert(i2 <= 65536, i2);
for (;;) {
q2 = (i2 * 52429) >>> (16 + 3);
r = i2 - ((q2 << 3) + (q2 << 1)); // r = i2-(q2*10) ...
buf[--charPos] = digits[r];
i2 = q2;
if (i2 == 0) {
break;
}
}
if (sign != 0) {
buf[--charPos] = sign;
}
| 1,279
| 491
| 1,770
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/ioc/DynamicContext.java
|
DynamicContext
|
isJarPackage
|
class DynamicContext {
private static final ClassReader classpathReader = new ClassPathClassReader();
private static final ClassReader jarReader = new JarReaderImpl();
private static final String SUFFIX_JAR = ".jar";
private static boolean isJarContext = false;
public static void init(Class<?> clazz) {
String rs = clazz.getResource("").toString();
if (rs.contains(SUFFIX_JAR)) {
isJarContext = true;
}
}
public static Stream<ClassInfo> recursionFindClasses(String packageName) {
Scanner scanner = Scanner.builder().packageName(packageName).recursive(true).build();
Set<ClassInfo> classInfos = getClassReader(packageName).readClasses(scanner);
return classInfos.stream();
}
public static ClassReader getClassReader(String packageName) {
if (isJarPackage(packageName)) {
return jarReader;
}
return classpathReader;
}
public static boolean isJarPackage(String packageName) {<FILL_FUNCTION_BODY>}
public static boolean isJarContext() {
return isJarContext;
}
}
|
if (StringKit.isBlank(packageName)) {
return false;
}
try {
packageName = packageName.replace(".", "/");
Enumeration<URL> dirs = DynamicContext.class.getClassLoader().getResources(packageName);
if (dirs.hasMoreElements()) {
String url = dirs.nextElement().toString();
return url.indexOf(".jar!") != -1 || url.indexOf(".zip!") != -1;
}
} catch (Exception e) {
log.error("", e);
}
return false;
| 318
| 151
| 469
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/ioc/SimpleIoc.java
|
SimpleIoc
|
put
|
class SimpleIoc implements Ioc {
private final Map<String, BeanDefine> pool = new ConcurrentHashMap<>(32);
/**
* Add user-defined objects
*/
@Override
public void addBean(Object bean) {
addBean(bean.getClass().getName(), bean);
}
/**
* Add user-defined objects
*/
@Override
public void addBean(String name, Object bean) {
BeanDefine beanDefine = new BeanDefine(bean);
put(name, beanDefine);
// add interface、put to pool
Class<?>[] interfaces = beanDefine.getType().getInterfaces();
if (interfaces.length > 0) {
for (Class<?> interfaceClazz : interfaces) {
this.put(interfaceClazz.getName(), beanDefine);
}
}
}
/**
* Update BeanDefine
*/
@Override
public void setBean(Class<?> type, Object proxyBean) {
BeanDefine beanDefine = pool.get(type.getName());
if (beanDefine != null) {
beanDefine.setBean(proxyBean);
} else {
beanDefine = new BeanDefine(proxyBean, type);
}
pool.put(type.getName(), beanDefine);
}
/**
* Register @Bean marked objects
*/
@Override
public <T> T addBean(Class<T> type) {
Object bean = put(type, true);
return type.cast(bean);
}
@Override
public Object createBean(Class<?> type) {
BeanDefine beanDefine = createBeanDefine(type, true);
IocKit.initInjection(this, Objects.requireNonNull(beanDefine));
IocKit.injectionValue(WebContext.blade().environment(), beanDefine);
return beanDefine.getBean();
}
@Override
public <T> T getBean(Class<T> type) {
Object bean = this.getBean(type.getName());
try {
return type.cast(bean);
} catch (Exception e) {
log.error("get bean error", e);
}
return null;
}
@Override
public Object getBean(String name) {
BeanDefine beanDefine = pool.get(name);
if (beanDefine == null) {
return null;
}
return beanDefine.getBean();
}
@Override
public List<BeanDefine> getBeanDefines() {
return new ArrayList<>(pool.values());
}
@Override
public BeanDefine getBeanDefine(Class<?> type) {
return pool.get(type.getName());
}
@Override
public List<Object> getBeans() {
Set<String> beanNames = this.getBeanNames();
List<Object> beans = new ArrayList<>(beanNames.size());
for (String beanName : beanNames) {
Object bean = this.getBean(beanName);
if (null != bean) {
beans.add(bean);
}
}
return beans;
}
@Override
public Set<String> getBeanNames() {
return pool.keySet();
}
@Override
public void remove(String beanName) {
pool.remove(beanName);
}
@Override
public void remove(Class<?> type) {
pool.remove(type.getSimpleName());
}
@Override
public void clearAll() {
pool.clear();
}
/**
* Add user-defined objects
*/
private void put(String name, BeanDefine beanDefine) {
if (pool.put(name, beanDefine) != null) {
log.warn("Duplicated Bean: {}", name);
}
}
/**
* Register @Bean marked objects
*/
private Object put(Class<?> type, boolean isSingleton) {
return put(type.getName(), type, isSingleton);
}
/**
* Register @Bean marked objects
*/
private Object put(String name, Class<?> beanClass, boolean isSingleton) {<FILL_FUNCTION_BODY>}
private BeanDefine createBeanDefine(Class<?> beanClass, boolean isSingleton) {
try {
Object object = beanClass.newInstance();
return new BeanDefine(object, beanClass, isSingleton);
} catch (InstantiationException | IllegalAccessException e) {
log.error("get BeanDefine error", e);
}
return null;
}
}
|
BeanDefine beanDefine = this.createBeanDefine(beanClass, isSingleton);
if (pool.put(name, beanDefine) != null) {
log.warn("Duplicated Bean: {}", name);
}
// add interface、put to pool
Class<?>[] interfaces = beanClass.getInterfaces();
if (interfaces.length > 0) {
for (Class<?> interfaceClazz : interfaces) {
if (null != this.getBean(interfaceClazz)) {
break;
}
this.put(interfaceClazz.getName(), beanDefine);
}
}
return Objects.requireNonNull(beanDefine).getBean();
| 1,213
| 183
| 1,396
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/ioc/bean/ClassInfo.java
|
ClassInfo
|
newInstance
|
class ClassInfo {
private String className;
private Class<?> clazz;
public ClassInfo(String className) {
this.className = className;
}
public ClassInfo(Class<?> clazz) {
this.clazz = clazz;
this.className = clazz.getName();
}
public ClassInfo(String className, Class<?> clazz) {
this.clazz = clazz;
this.className = className;
}
public String getClassName() {
return className;
}
public Class<?> getClazz() {
return clazz;
}
public Object newInstance() {<FILL_FUNCTION_BODY>}
@Override
public String toString() {
return clazz.toString();
}
}
|
try {
return clazz.newInstance();
} catch (Exception e) {
throw new RuntimeException(e);
}
| 209
| 37
| 246
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/ioc/bean/FieldInjector.java
|
FieldInjector
|
injection
|
class FieldInjector implements Injector {
private Ioc ioc;
private Field field;
public FieldInjector(Ioc ioc, Field field) {
this.ioc = ioc;
this.field = field;
}
public Class<?> getType() {
return field.getType();
}
public boolean isSingleton() {
return IocKit.isSingleton(field.getType());
}
@Override
public void injection(Object bean) {<FILL_FUNCTION_BODY>}
@Override
public void injection(Object bean, Object value) {
try {
field.setAccessible(true);
field.set(bean, value);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
public boolean hasInjectFields() {
return field.getType().getDeclaredFields().length > 0;
}
}
|
try {
Class<?> fieldType = field.getType();
Object value = ioc.getBean(fieldType);
if (value == null) {
throw new IllegalStateException("Can't inject bean: " + fieldType.getName() + " for field: " + field);
}
injection(bean, value);
} catch (Exception e) {
throw new RuntimeException(e);
}
| 245
| 108
| 353
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/ioc/bean/OrderComparator.java
|
OrderComparator
|
compare
|
class OrderComparator<T> implements Serializable, Comparator<T> {
@Override
public int compare(T e1, T e2) {<FILL_FUNCTION_BODY>}
}
|
Order o1 = e1.getClass().getAnnotation(Order.class);
Order o2 = e2.getClass().getAnnotation(Order.class);
Integer order1 = null != o1 ? o1.value() : Integer.MAX_VALUE;
Integer order2 = null != o2 ? o2.value() : Integer.MAX_VALUE;
return order1.compareTo(order2);
| 55
| 101
| 156
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/ioc/bean/ValueInjector.java
|
ValueInjector
|
injection
|
class ValueInjector implements Injector {
private Environment environment;
private Field target;
private String key;
public ValueInjector(Environment environment, Field target, String key) {
this.environment = environment;
this.target = target;
this.key = key;
}
@Override
public void injection(Object bean) {<FILL_FUNCTION_BODY>}
@Override
public void injection(Object bean, Object value) {
// TODO
}
}
|
try {
if (!key.isEmpty()) {
Class<?> clazz = target.getType();
target.setAccessible(true);
Optional<String> fieldValue = environment.get(key);
if (!fieldValue.isPresent()) {
log.warn("config is absent,so can't be injected:target is {}", bean.getClass().getName());
return;
}
if (fieldValue.get().isEmpty()) {
log.warn("config is empty,so can't be injected:target is {}", bean.getClass().getName());
return;
}
Object value = null;
//target field type is Basic Type
if (ReflectKit.isBasicType(clazz)) {
if (fieldValue.isPresent() && StringKit.isNotBlank(fieldValue.get())) {
value = ReflectKit.convert(clazz, fieldValue.get());
}
if (null != value) {
ReflectKit.setFieldValue(target, bean, value);
}
}
//List and Map support,just support String element
String split = environment.get("value.split", ",");
String mapSplit = environment.get("value.map.split", ":");
if (clazz.isAssignableFrom(List.class)) {
target.set(bean, Arrays.asList(fieldValue.get().split(split)));
return;
}
Map<String, String> map = new HashMap<>(16);
if (clazz.isAssignableFrom(Map.class)) {
Arrays.stream(fieldValue.get().split(split))
.filter(d -> d.contains(mapSplit))
.map(d -> d.split(mapSplit))
.forEach(keyValue -> map.put(keyValue[0], keyValue[1]));
target.set(bean, map);
return;
}
} else {
log.warn("key is empty,so can't be injected:target is {}", bean.getClass().getName());
}
} catch (IllegalAccessException e) {
log.error("inject config error! key is {},bean is {}", key, bean.getClass().getSimpleName(), e);
}
| 130
| 565
| 695
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/ioc/reader/AbstractClassReader.java
|
AbstractClassReader
|
findClassByPackage
|
class AbstractClassReader implements ClassReader {
@Override
public Set<ClassInfo> readClasses(Scanner scanner) {
return this.getClassByAnnotation(scanner.getPackageName(), scanner.getParent(), scanner.getAnnotation(), scanner.isRecursive());
}
/**
* Get class by condition
*
* @param packageName
* @param packagePath
* @param parent
* @param annotation
* @param recursive
* @return
*/
private Set<ClassInfo> findClassByPackage(final String packageName, final String packagePath,
final Class<?> parent, final Class<? extends Annotation> annotation,
final boolean recursive, Set<ClassInfo> classes) throws ClassNotFoundException {<FILL_FUNCTION_BODY>}
/**
* Filter the file rules
*
* @param file
* @param recursive
* @return
*/
private File[] accept(File file, final boolean recursive) {
// Custom filtering rules If you can loop (include subdirectories) or is the end of the file. Class (compiled java class file)
return file.listFiles(file1 -> (recursive && file1.isDirectory()) || (file1.getName().endsWith(".class")));
}
public Set<ClassInfo> getClassByAnnotation(String packageName, Class<?> parent, Class<? extends Annotation> annotation, boolean recursive) {
Set<ClassInfo> classes = new HashSet<>();
// Get the name of the package and replace it
String packageDirName = packageName.replace('.', '/');
// Defines an enumerated collection and loops to process the URL in this directory
Enumeration<URL> dirs;
try {
dirs = this.getClass().getClassLoader().getResources(packageDirName);
// Loop iterations down
while (dirs.hasMoreElements()) {
URL url = dirs.nextElement();
String filePath = new URI(url.getFile()).getPath();
Set<ClassInfo> subClasses = findClassByPackage(packageName, filePath, parent, annotation, recursive, classes);
if (BladeKit.isNotEmpty(subClasses)) {
classes.addAll(subClasses);
}
}
} catch (IOException | URISyntaxException e) {
log.error(e.getMessage(), e);
} catch (ClassNotFoundException e) {
log.error("Add user custom view class error Can't find such Class files.");
}
return classes;
}
}
|
// Get the directory of this package to create a File
File dir = new File(packagePath);
// If not exist or is not a direct return to the directory
if ((!dir.exists()) || (!dir.isDirectory())) {
log.warn("The package [{}] not found.", packageName);
}
// If present, get all the files under the package include the directory
File[] dirFiles = accept(dir, recursive);
// Loop all files
if (null != dirFiles && dirFiles.length > 0) {
for (File file : dirFiles) {
// If it is a directory, continue scanning
if (file.isDirectory()) {
findClassByPackage(packageName + '.' + file.getName(), file.getAbsolutePath(), parent, annotation, recursive, classes);
} else {
// If the java class file is removed later. Class only leave the class name
String className = file.getName().substring(0, file.getName().length() - 6);
Class<?> clazz = Class.forName(packageName + '.' + className);
if (null != parent && null != annotation) {
if (null != clazz.getSuperclass() && clazz.getSuperclass().equals(parent) &&
null != clazz.getAnnotation(annotation)) {
classes.add(new ClassInfo(clazz));
}
continue;
}
if (null != parent) {
if (null != clazz.getSuperclass() && clazz.getSuperclass().equals(parent)) {
classes.add(new ClassInfo(clazz));
} else {
if (null != clazz.getInterfaces() && clazz.getInterfaces().length > 0 && clazz.getInterfaces()[0].equals(parent)) {
classes.add(new ClassInfo(clazz));
}
}
continue;
}
if (null != annotation) {
if (null != clazz.getAnnotation(annotation)) {
classes.add(new ClassInfo(clazz));
}
continue;
}
classes.add(new ClassInfo(clazz));
}
}
}
return classes;
| 640
| 548
| 1,188
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/ioc/reader/JarReaderImpl.java
|
JarReaderImpl
|
getClasses
|
class JarReaderImpl extends AbstractClassReader implements ClassReader {
private static final String JAR_FILE = "jar:file:";
private static final String WSJAR_FILE = "wsjar:file:";
@Override
public Set<ClassInfo> getClassByAnnotation(String packageName, Class<?> parent, Class<? extends Annotation> annotation, boolean recursive) {
Set<ClassInfo> classes = new HashSet<>();
// Get the name of the package and replace it
String packageDirName = packageName.replace('.', '/');
// Defines an enumerated collection and loops to process the URL in this directory
Enumeration<URL> dirs;
try {
dirs = this.getClass().getClassLoader().getResources(packageDirName);
while (dirs.hasMoreElements()) {
// Next
URL url = dirs.nextElement();
Set<ClassInfo> subClasses = this.getClasses(url, packageDirName, packageName, parent, annotation, recursive, classes);
if (subClasses.size() > 0) {
classes.addAll(subClasses);
}
}
} catch (IOException e) {
log.error(e.getMessage(), e);
}
return classes;
}
private Set<ClassInfo> getClasses(final URL url, final String packageDirName, String packageName, final Class<?> parent,
final Class<? extends Annotation> annotation, final boolean recursive, Set<ClassInfo> classes) {<FILL_FUNCTION_BODY>}
}
|
try {
if (url.toString().startsWith(JAR_FILE) || url.toString().startsWith(WSJAR_FILE)) {
// Get jar file
JarFile jarFile = ((JarURLConnection) url.openConnection()).getJarFile();
// From the jar package to get an enumeration class
Enumeration<JarEntry> eje = jarFile.entries();
while (eje.hasMoreElements()) {
// Get an entity in jar can be a directory and some other documents in the jar package
// such as META-INF and other documents
JarEntry entry = eje.nextElement();
String name = entry.getName();
// if start with '/'
if (name.charAt(0) == '/') {
name = name.substring(1);
}
// If the first half is the same as the defined package name
if (!name.startsWith(packageDirName)) {
continue;
}
int idx = name.lastIndexOf('/');
// If the end of "/" is a package
if (idx != -1) {
// Get the package name and replace "/" with "."
packageName = name.substring(0, idx).replace('/', '.');
}
// If it can be iterated and is a package
if (idx == -1 && !recursive) {
continue;
}
// If it is a .class file and not a directory
if (!name.endsWith(".class") || entry.isDirectory()) {
continue;
}
// Remove the following ".class" to get the real class name
String className = name.substring(packageName.length() + 1, name.length() - 6);
// Add to classes
Class<?> clazz = Class.forName(packageName + '.' + className);
if (null != parent && null != annotation) {
if (null != clazz.getSuperclass() &&
clazz.getSuperclass().equals(parent) && null != clazz.getAnnotation(annotation)) {
classes.add(new ClassInfo(clazz));
}
continue;
}
if (null != parent) {
if (null != clazz.getSuperclass() && clazz.getSuperclass().equals(parent)) {
classes.add(new ClassInfo(clazz));
}
continue;
}
if (null != annotation) {
if (null != clazz.getAnnotation(annotation)) {
classes.add(new ClassInfo(clazz));
}
continue;
}
classes.add(new ClassInfo(clazz));
}
}
} catch (IOException e) {
log.error("The scan error when the user to define the view from a jar package file.", e);
} catch (ClassNotFoundException e) {
log.error("", e);
}
return classes;
| 385
| 726
| 1,111
|
<methods>public non-sealed void <init>() ,public Set<com.hellokaton.blade.ioc.bean.ClassInfo> getClassByAnnotation(java.lang.String, Class<?>, Class<? extends java.lang.annotation.Annotation>, boolean) ,public Set<com.hellokaton.blade.ioc.bean.ClassInfo> readClasses(com.hellokaton.blade.ioc.bean.Scanner) <variables>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/kit/BladeCache.java
|
BladeCache
|
getLambdaFieldName
|
class BladeCache {
private static final Map<SerializedLambda, String> CACHE_LAMBDA_NAME = new HashMap<>(8);
private static final Map<Class, MethodAccess> CLASS_METHOD_ACCESS_MAP = new HashMap<>(8);
private static final Map<String, String> PADDING_METHOD_STR = new HashMap<>(6);
static {
PADDING_METHOD_STR.put("GET", StringKit.padRight("GET", 6));
PADDING_METHOD_STR.put("POST", StringKit.padRight("POST", 6));
PADDING_METHOD_STR.put("DELETE", StringKit.padRight("DELETE", 6));
PADDING_METHOD_STR.put("PUT", StringKit.padRight("PUT", 6));
PADDING_METHOD_STR.put("OPTIONS", StringKit.padRight("OPTIONS", 6));
PADDING_METHOD_STR.put("HEAD", StringKit.padRight("HEAD", 6));
}
public static String getPaddingMethod(String method) {
return PADDING_METHOD_STR.get(method);
}
public static final MethodAccess getMethodAccess(Class clazz) {
return CLASS_METHOD_ACCESS_MAP.computeIfAbsent(clazz, MethodAccess::get);
}
public static String getLambdaFieldName(SerializedLambda serializedLambda) {<FILL_FUNCTION_BODY>}
}
|
String name = CACHE_LAMBDA_NAME.get(serializedLambda);
if (null != name) {
return name;
}
String className = serializedLambda.getImplClass().replace("/", ".");
String methodName = serializedLambda.getImplMethodName();
String fieldName = methodToFieldName(methodName);
try {
Field field = Class.forName(className).getDeclaredField(fieldName);
name = field.getName();
CACHE_LAMBDA_NAME.put(serializedLambda, name);
return name;
} catch (NoSuchFieldException | ClassNotFoundException e) {
throw new RuntimeException(e);
}
| 366
| 176
| 542
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/kit/IocKit.java
|
IocKit
|
initInjection
|
class IocKit {
/**
* Get @Inject Annotated field
*
* @param ioc ioc container
* @param classDefine classDefine
* @return return FieldInjector
*/
private static List<FieldInjector> getInjectFields(Ioc ioc, ClassDefine classDefine) {
List<FieldInjector> injectors = new ArrayList<>();
for (Field field : classDefine.getDeclaredFields()) {
if (null != field.getAnnotation(InjectWith.class) || null != field.getAnnotation(Inject.class)) {
injectors.add(new FieldInjector(ioc, field));
}
}
if (injectors.size() == 0) {
return new ArrayList<>();
}
return injectors;
}
/**
* Get @Value Annotated field
*
* @param environment
* @param classDefine
* @return
*/
private static List<ValueInjector> getValueInjectFields(Environment environment, ClassDefine classDefine) {
List<ValueInjector> valueInjectors = new ArrayList<>(8);
//handle class annotation
if (null != classDefine.getType().getAnnotation(Value.class)) {
String suffix = classDefine.getType().getAnnotation(Value.class).name();
Arrays.stream(classDefine.getDeclaredFields()).forEach(field -> valueInjectors.add(
new ValueInjector(environment, field, suffix + "." + field.getName())
));
} else {
Arrays.stream(classDefine.getDeclaredFields()).
filter(field -> null != field.getAnnotation(Value.class)).
map(field -> new ValueInjector(
environment, field, field.getAnnotation(Value.class).name())
).forEach(valueInjectors::add);
}
return valueInjectors;
}
public static void injection(Ioc ioc, BeanDefine beanDefine) {
ClassDefine classDefine = ClassDefine.create(beanDefine.getType());
List<FieldInjector> fieldInjectors = getInjectFields(ioc, classDefine);
Object bean = beanDefine.getBean();
fieldInjectors.forEach(fieldInjector -> {
Object fieldInstance = ReflectKit.newInstance(fieldInjector.getType());
if (fieldInjector.hasInjectFields()) {
injection(ioc, new BeanDefine(fieldInstance));
}
fieldInjector.injection(bean, fieldInstance);
});
}
public static void initInjection(Ioc ioc, BeanDefine beanDefine) {<FILL_FUNCTION_BODY>}
public static void injectionValue(Environment environment, BeanDefine beanDefine) {
ClassDefine classDefine = ClassDefine.create(beanDefine.getType());
List<ValueInjector> valueFields = getValueInjectFields(environment, classDefine);
Object bean = beanDefine.getBean();
valueFields.forEach(fieldInjector -> fieldInjector.injection(bean));
}
public static boolean isSingleton(Class<?> type) {
return true;
}
}
|
ClassDefine classDefine = ClassDefine.create(beanDefine.getType());
List<FieldInjector> fieldInjectors = getInjectFields(ioc, classDefine);
Object bean = beanDefine.getBean();
AtomicBoolean hasPrototypeField = new AtomicBoolean(false);
fieldInjectors.forEach(fieldInjector -> {
if (fieldInjector.isSingleton()) {
fieldInjector.injection(bean);
} else {
hasPrototypeField.set(true);
}
});
beanDefine.setFieldHasPrototype(hasPrototypeField.get());
| 844
| 168
| 1,012
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/kit/MimeTypeKit.java
|
MimeTypeKit
|
parse
|
class MimeTypeKit {
public static String parse(String fileName) {<FILL_FUNCTION_BODY>}
public static String fileExt(String fname) {
if (StringKit.isBlank(fname) || fname.indexOf('.') == -1) {
return null;
}
return fname.substring(fname.lastIndexOf('.') + 1);
}
}
|
try {
String mimeType = URLConnection.guessContentTypeFromName(fileName);
if (StringKit.isNotEmpty(mimeType)) {
return mimeType;
}
String ext = fileExt(fileName);
if (null == ext) {
return null;
}
return MimeType.get(ext);
} catch (Exception e) {
return null;
}
| 107
| 109
| 216
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/kit/WebKit.java
|
WebKit
|
ipAddress
|
class WebKit {
public static final String UNKNOWN_MAGIC = "unknown";
/**
* Get the client IP address by request
*
* @param request Request instance
* @return return ip address
*/
public static String ipAddress(Request request) {<FILL_FUNCTION_BODY>}
}
|
String ipAddress = request.header("x-forwarded-for");
if (StringKit.isBlank(ipAddress) || UNKNOWN_MAGIC.equalsIgnoreCase(ipAddress)) {
ipAddress = request.header("Proxy-Client-IP");
}
if (StringKit.isBlank(ipAddress) || UNKNOWN_MAGIC.equalsIgnoreCase(ipAddress)) {
ipAddress = request.header("WL-Proxy-Client-IP");
}
if (StringKit.isBlank(ipAddress) || UNKNOWN_MAGIC.equalsIgnoreCase(ipAddress)) {
ipAddress = request.header("X-Real-IP");
}
if (StringKit.isBlank(ipAddress) || UNKNOWN_MAGIC.equalsIgnoreCase(ipAddress)) {
ipAddress = request.header("HTTP_CLIENT_IP");
}
if (StringKit.isBlank(ipAddress) || UNKNOWN_MAGIC.equalsIgnoreCase(ipAddress)) {
ipAddress = request.header("HTTP_X_FORWARDED_FOR");
}
return ipAddress;
| 87
| 285
| 372
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/kit/reload/FileChangeDetector.java
|
FileChangeDetector
|
getDestPath
|
class FileChangeDetector {
private final WatchService watcher;
private final Map<WatchKey, Path> pathMap = new HashMap<>();
public FileChangeDetector(String dirPath) throws IOException {
watcher = FileSystems.getDefault().newWatchService();
registerAll(Paths.get(dirPath));
}
private void register(Path dir) throws IOException {
WatchKey key = dir.register(watcher, StandardWatchEventKinds.ENTRY_MODIFY);
pathMap.put(key, dir);
}
private void registerAll(Path dir) throws IOException {
Files.walkFileTree(dir, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
register(dir);
return FileVisitResult.CONTINUE;
}
});
}
public void processEvent(BiConsumer<WatchEvent.Kind<Path>, Path> processor) {
for (; ; ) {
WatchKey key;
try {
key = watcher.take();
} catch (InterruptedException e) {
return;
}
Path dir = pathMap.get(key);
for (WatchEvent<?> event : key.pollEvents()) {
WatchEvent.Kind kind = event.kind();
Path filePath = dir.resolve(((WatchEvent<Path>) event).context());
if (Files.isDirectory(filePath)) continue;
log.info("File {} changes detected!", filePath.toString());
//copy updated files to target
processor.accept(kind, filePath);
}
key.reset();
}
}
public static Path getDestPath(Path src, Environment env, StaticOptions staticOptions) {<FILL_FUNCTION_BODY>}
}
|
String templateDir = env.get(BladeConst.ENV_KEY_TEMPLATE_PATH, "/templates");
List<String> templateOrStaticDirKeyword = new ArrayList<>();
templateOrStaticDirKeyword.add(templateDir);
templateOrStaticDirKeyword.addAll(staticOptions.getPaths());
List<String> result = templateOrStaticDirKeyword.stream().filter(dir -> src.toString().contains(dir)).collect(Collectors.toList());
if (result.size() != 1) {
log.info("Cannot get dest dir");
return null;
}
String key = result.get(0);
log.info(BladeConst.CLASSPATH + src.toString().substring(src.toString().indexOf(key)));
return Paths.get(BladeConst.CLASSPATH + src.toString().substring(src.toString().indexOf(key)));
| 457
| 222
| 679
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/WebContext.java
|
WebContext
|
response
|
class WebContext {
/**
* Blade instance, when the project is initialized when it will permanently reside in memory
*/
private static Blade blade;
/**
* ContextPath, default is "/"
*/
private static String contextPath;
/**
* Http Request instance of current thread context
*/
private Request request;
/**
* Http Response instance of current thread context
*/
private Response response;
private Route route;
private ChannelHandlerContext channelHandlerContext;
public WebContext(Request request, Response response,
ChannelHandlerContext channelHandlerContext) {
this.request = request;
this.response = response;
this.channelHandlerContext = channelHandlerContext;
}
public Request getRequest() {
return request;
}
public Response getResponse() {
return response;
}
public Environment environment() {
return blade.environment();
}
/**
* Get application environment information.
*
* @param key environment key
* @return environment optional value
*/
public Optional<String> getEnv(String key) {
return blade().getEnv(key);
}
/**
* Get application environment information.
*
* @param key environment key
* @param defaultValue default value, if value is null
* @return environment optional value
*/
public String getEnv(String key, String defaultValue) {
return blade().getEnv(key, defaultValue);
}
public ChannelHandlerContext getChannelHandlerContext() {
return channelHandlerContext;
}
public ChannelHandlerContext getHandlerContext() {
return channelHandlerContext;
}
public Route getRoute() {
return route;
}
public void setRoute(Route route) {
this.route = route;
}
/**
* Initializes the project when it starts
*
* @param blade Blade instance
* @param contextPath context path
*/
public static void init(Blade blade, String contextPath) {
WebContext.blade = blade;
WebContext.contextPath = contextPath;
}
/**
* Get current thread context WebContext instance
*
* @return WebContext instance
*/
public static WebContext get() {
return WEB_CONTEXT_THREAD_LOCAL.get();
}
/**
* Get current thread context Request instance
*
* @return Request instance
*/
public static Request request() {
var webContext = get();
return null != webContext ? webContext.request : null;
}
/**
* Get current thread context Response instance
*
* @return Response instance
*/
public static Response response() {<FILL_FUNCTION_BODY>}
public static WebContext create(Request request, Response response, ChannelHandlerContext ctx) {
WebContext webContext = new WebContext();
webContext.request = request;
webContext.response = response;
webContext.channelHandlerContext = ctx;
WEB_CONTEXT_THREAD_LOCAL.set(webContext);
return webContext;
}
public static void set(WebContext webContext) {
WEB_CONTEXT_THREAD_LOCAL.set(webContext);
}
public static void remove() {
WEB_CONTEXT_THREAD_LOCAL.remove();
}
/**
* Get blade instance
*
* @return return Blade
*/
public static Blade blade() {
return blade;
}
/**
* Get context path
*
* @return return context path string, e.g: /
*/
public static String contextPath() {
return contextPath;
}
public static void clean() {
WEB_CONTEXT_THREAD_LOCAL.remove();
blade = null;
}
}
|
var webContext = get();
return null != webContext ? webContext.response : null;
| 985
| 27
| 1,012
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/handler/DefaultExceptionHandler.java
|
DefaultExceptionHandler
|
handle
|
class DefaultExceptionHandler implements ExceptionHandler {
@Override
public void handle(Exception e) {<FILL_FUNCTION_BODY>}
protected void handleValidators(ValidatorException validatorException, Request request, Response response) {
var code = Optional.ofNullable(validatorException.getCode()).orElse(500);
if (request.isAjax() || request.contentType().toLowerCase().contains("json")) {
response.json(RestResponse.fail(code, validatorException.getMessage()));
} else {
this.handleException(validatorException, request, response);
}
}
protected void handleException(Exception e, Request request, Response response) {
log.error("", e);
if (null == response) {
return;
}
response.status(500);
request.attribute("title", "500 Internal Server Error");
request.attribute("message", e.getMessage());
request.attribute("stackTrace", getStackTrace(e));
this.render500(request, response);
}
protected void handleBladeException(BladeException e, Request request, Response response) {
var blade = WebContext.blade();
response.status(e.getStatus());
var modelAndView = new ModelAndView();
modelAndView.add("title", e.getStatus() + " " + e.getName());
modelAndView.add("message", e.getMessage());
if (null != e.getCause()) {
request.attribute(VARIABLE_STACKTRACE, getStackTrace(e));
}
if (e.getStatus() == InternalErrorException.STATUS) {
log.error("", e);
this.render500(request, response);
}
String paddingMethod = BladeCache.getPaddingMethod(request.method());
if (e.getStatus() == NotFoundException.STATUS) {
log404(log, paddingMethod, request.uri());
if (request.isJsonRequest()) {
response.json(RestResponse.fail(NotFoundException.STATUS, "Not Found [" + request.uri() + "]"));
} else {
var page404 = Optional.ofNullable(blade.environment().get(ENV_KEY_PAGE_404, null));
if (page404.isPresent()) {
modelAndView.setView(page404.get());
renderPage(response, modelAndView);
response.render(page404.get());
} else {
HtmlCreator htmlCreator = new HtmlCreator();
htmlCreator.center("<h1>404 Not Found - " + request.uri() + "</h1>");
htmlCreator.hr();
response.html(htmlCreator.html());
}
}
}
if (e.getStatus() == MethodNotAllowedException.STATUS) {
log405(log, paddingMethod, request.uri());
if (request.isJsonRequest()) {
response.json(RestResponse.fail(MethodNotAllowedException.STATUS, e.getMessage()));
} else {
response.text(e.getMessage());
}
}
}
protected void render500(Request request, Response response) {
var blade = WebContext.blade();
var page500 = Optional.ofNullable(blade.environment().get(ENV_KEY_PAGE_500, null));
if (page500.isPresent()) {
this.renderPage(response, new ModelAndView(page500.get()));
} else {
if (blade.devMode()) {
var htmlCreator = new HtmlCreator();
htmlCreator.center("<h1>" + request.attribute("title") + "</h1>");
htmlCreator.startP("message-header");
htmlCreator.add("Request URI: " + request.uri());
htmlCreator.startP("message-header");
htmlCreator.add("Error Message: " + request.attribute("message"));
htmlCreator.endP();
if (null != request.attribute(VARIABLE_STACKTRACE)) {
htmlCreator.startP("message-body");
htmlCreator.add(request.attribute(VARIABLE_STACKTRACE).toString().replace("\n", "<br/>"));
htmlCreator.endP();
}
response.html(htmlCreator.html());
} else {
response.html(INTERNAL_SERVER_ERROR_HTML);
}
}
}
protected void renderPage(Response response, ModelAndView modelAndView) {
var sw = new StringWriter();
try {
WebContext.blade().templateEngine().render(modelAndView, sw);
ByteBuf buffer = Unpooled.wrappedBuffer(sw.toString().getBytes(StandardCharsets.UTF_8));
FullHttpResponse fullHttpResponse = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.valueOf(response.statusCode()), buffer);
response.body(new RawBody(fullHttpResponse));
} catch (Exception e) {
log.error("Render view error", e);
}
}
protected String getStackTrace(Throwable exception) {
var errors = new StringWriter();
exception.printStackTrace(new PrintWriter(errors));
return errors.toString();
}
}
|
if (!ExceptionHandler.isResetByPeer(e)) {
var response = WebContext.response();
var request = WebContext.request();
if (e instanceof BladeException) {
this.handleBladeException((BladeException) e, request, response);
} else if (e instanceof ValidatorException) {
this.handleValidators(ValidatorException.class.cast(e), request, response);
} else {
this.handleException(e, request, response);
}
}
| 1,359
| 128
| 1,487
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/handler/SessionHandler.java
|
SessionHandler
|
getSession
|
class SessionHandler {
private final Class<? extends Session> sessionType;
private final SessionManager sessionManager;
private int timeout;
private String sessionKey;
public SessionHandler(Blade blade) {
this.sessionType = blade.httpOptions().getSessionType();
this.sessionManager = blade.sessionManager();
this.initOptions(blade.httpOptions(), blade.environment());
}
public Session createSession(Request request) {
Session session = getSession(request);
long now = Instant.now().getEpochSecond();
if (null == session) {
long expired = now + timeout;
session = ReflectKit.newInstance(sessionType);
if (null == session) {
throw new InternalErrorException("Unable to create session object :(");
}
session.id(UUID.UU32());
session.created(now);
session.expired(expired);
sessionManager.createSession(session);
return session;
} else {
if (session.expired() < now) {
sessionManager.destroySession(session);
} else {
// renewal
long expired = now + timeout;
session.expired(expired);
}
}
return session;
}
private Session getSession(Request request) {<FILL_FUNCTION_BODY>}
private void initOptions(HttpOptions httpOptions, Environment environment) {
this.timeout = httpOptions.getSessionTimeout();
this.sessionKey = httpOptions.getSessionKey();
if (this.timeout != HttpOptions.DEFAULT_SESSION_TIMEOUT) {
environment.set(ENV_KEY_SESSION_TIMEOUT, this.timeout);
} else {
this.timeout = environment.getInt(ENV_KEY_SESSION_TIMEOUT, HttpOptions.DEFAULT_SESSION_TIMEOUT);
httpOptions.setSessionTimeout(this.timeout);
}
if (!HttpOptions.DEFAULT_SESSION_KEY.equals(this.sessionKey)) {
environment.set(ENV_KEY_SESSION_KEY, this.sessionKey);
} else {
this.sessionKey = environment.get(ENV_KEY_SESSION_KEY, HttpOptions.DEFAULT_SESSION_KEY);
httpOptions.setSessionKey(this.sessionKey);
}
}
}
|
String cookieHeader = request.cookie(this.sessionKey);
if (StringKit.isEmpty(cookieHeader)) {
return null;
}
return sessionManager.getSession(cookieHeader);
| 575
| 54
| 629
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/http/ChannelBody.java
|
ChannelBody
|
of
|
class ChannelBody implements Body {
private final String fileName;
private final FileChannel content;
public ChannelBody(final String fileName, final FileChannel content) {
this.fileName = fileName;
this.content = content;
}
public static ChannelBody of(File file) throws IOException {<FILL_FUNCTION_BODY>}
public static ChannelBody of(FileChannel channel) throws IOException {
return new ChannelBody(null, channel);
}
@Override
public HttpResponse write(BodyWriter writer) {
return writer.onFileChannel(fileName, content);
}
}
|
FileChannel fileChannel = FileChannel.open(file.toPath(), StandardOpenOption.READ);
return new ChannelBody(file.getName(), fileChannel);
| 157
| 40
| 197
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/http/HttpResponse.java
|
HttpResponse
|
cookie
|
class HttpResponse implements Response {
private final Map<String, String> headers = new HashMap<>();
private final Set<Cookie> cookies = new HashSet<>();
private int statusCode = 200;
private Body body;
@Override
public int statusCode() {
return this.statusCode;
}
@Override
public Response status(int status) {
this.statusCode = status;
return this;
}
@Override
public Response contentType(@NonNull String contentType) {
this.headers.put("Content-Type", contentType);
return this;
}
@Override
public String contentType() {
return this.headers.get("Content-Type");
}
@Override
public Map<String, String> headers() {
return this.headers;
}
@Override
public Response header(String name, String value) {
this.headers.put(name, value);
return this;
}
@Override
public Response cookie(@NonNull com.hellokaton.blade.mvc.http.Cookie cookie) {
Cookie nettyCookie = new io.netty.handler.codec.http.cookie.DefaultCookie(cookie.name(), cookie.value());
if (cookie.domain() != null) {
nettyCookie.setDomain(cookie.domain());
}
if (cookie.maxAge() > 0) {
nettyCookie.setMaxAge(cookie.maxAge());
}
nettyCookie.setPath(cookie.path());
nettyCookie.setHttpOnly(cookie.httpOnly());
nettyCookie.setSecure(cookie.secure());
this.cookies.add(nettyCookie);
return this;
}
@Override
public Response cookie(String name, String value) {
this.cookies.add(new io.netty.handler.codec.http.cookie.DefaultCookie(name, value));
return this;
}
@Override
public Response cookie(@NonNull String name, @NonNull String value, int maxAge) {<FILL_FUNCTION_BODY>}
@Override
public Response cookie(@NonNull String name, @NonNull String value, int maxAge, boolean secured) {
Cookie nettyCookie = new io.netty.handler.codec.http.cookie.DefaultCookie(name, value);
nettyCookie.setPath("/");
nettyCookie.setMaxAge(maxAge);
nettyCookie.setSecure(secured);
this.cookies.add(nettyCookie);
return this;
}
@Override
public Response cookie(@NonNull String path, @NonNull String name, @NonNull String value, int maxAge, boolean secured) {
Cookie nettyCookie = new io.netty.handler.codec.http.cookie.DefaultCookie(name, value);
nettyCookie.setMaxAge(maxAge);
nettyCookie.setSecure(secured);
nettyCookie.setPath(path);
this.cookies.add(nettyCookie);
return this;
}
@Override
public Response removeCookie(@NonNull String name) {
Optional<Cookie> cookieOpt = this.cookies.stream().filter(cookie -> cookie.name().equals(name)).findFirst();
cookieOpt.ifPresent(cookie -> {
cookie.setValue("");
cookie.setMaxAge(-1);
});
Cookie nettyCookie = new io.netty.handler.codec.http.cookie.DefaultCookie(name, "");
nettyCookie.setMaxAge(-1);
this.cookies.add(nettyCookie);
return this;
}
@Override
public Map<String, String> cookies() {
Map<String, String> map = new HashMap<>(8);
this.cookies.forEach(cookie -> map.put(cookie.name(), cookie.value()));
return map;
}
@Override
public Set<Cookie> cookiesRaw() {
return this.cookies;
}
@Override
public void render(@NonNull ModelAndView modelAndView) {
this.body = new ViewBody(modelAndView);
}
@Override
public void toStatic(StaticFileBody body) {
this.body = body;
}
@Override
public void redirect(@NonNull String newUri) {
headers.put(HttpConst.HEADER_LOCATION, newUri);
this.status(302);
}
@Override
public void write(File file) throws IOException {
this.body = ChannelBody.of(file);
}
@Override
public void write(String fileName, File file) throws IOException {
FileChannel fileChannel = FileChannel.open(file.toPath(), StandardOpenOption.READ);
headers.put("Content-Disposition", "attachment; filename=" + new String(fileName.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1));
this.body = new ChannelBody(null, fileChannel);
}
@Override
public ModelAndView modelAndView() {
if (this.body instanceof ViewBody) {
return ((ViewBody) this.body).modelAndView();
}
return null;
}
public HttpResponse(Response response) {
this.statusCode = response.statusCode();
if (null != response.headers()) {
response.headers().forEach(this.headers::put);
}
if (null != response.cookies()) {
response.cookies().forEach((k, v) -> this.cookies.add(new DefaultCookie(k, v)));
}
}
public HttpResponse() {
}
@Override
public Body body() {
if (null == this.body) {
return EmptyBody.empty();
}
return this.body;
}
@Override
public Response body(Body body) {
this.body = body;
return this;
}
}
|
Cookie nettyCookie = new io.netty.handler.codec.http.cookie.DefaultCookie(name, value);
nettyCookie.setPath("/");
nettyCookie.setMaxAge(maxAge);
this.cookies.add(nettyCookie);
return this;
| 1,575
| 81
| 1,656
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/http/HttpSession.java
|
HttpSession
|
attribute
|
class HttpSession implements Session {
private Map<String, Object> attributes = new HashMap<>();
@Setter
private String id = null;
@Setter
private String ip = null;
@Setter
private long created = -1;
@Setter
private long expired = -1;
@Override
public String id() {
return id;
}
@Override
public void id(String id) {
this.id = id;
}
@Override
public String ip() {
return this.ip;
}
@Override
public void ip(String ip) {
this.ip = ip;
}
@Override
public <T> T attribute(String name) {<FILL_FUNCTION_BODY>}
@Override
public void attribute(String name, Object value) {
this.attributes.put(name, value);
}
@Override
public Map<String, Object> attributes() {
return attributes;
}
@Override
public void removeAttribute(String name) {
this.attributes.remove(name);
}
@Override
public long created() {
return this.created;
}
@Override
public void created(long created) {
this.created = created;
}
@Override
public long expired() {
return this.expired;
}
@Override
public void expired(long expired) {
this.expired = expired;
}
}
|
Object object = this.attributes.get(name);
return null != object ? (T) object : null;
| 399
| 31
| 430
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/http/session/SessionCleaner.java
|
SessionCleaner
|
run
|
class SessionCleaner implements Runnable {
private SessionManager sessionManager;
public SessionCleaner(SessionManager sessionManager) {
this.sessionManager = sessionManager;
}
@Override
public void run() {<FILL_FUNCTION_BODY>}
private boolean expires(Session session) {
long now = Instant.now().getEpochSecond();
return session.expired() < now;
}
}
|
try {
Collection<Session> sessions = sessionManager.sessionMap().values();
sessions.parallelStream().filter(this::expires).forEach(sessionManager::destroySession);
} catch (Exception e) {
log.error("Session clean error", e);
}
| 114
| 69
| 183
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/http/session/SessionManager.java
|
SessionManager
|
destroySession
|
class SessionManager {
private final EventManager eventManager;
/**
* Store all Session instances
*/
private final Map<String, Session> sessionMap;
/**
* Create SessionManager
*/
public SessionManager(EventManager eventManager) {
this.sessionMap = new ConcurrentHashMap<>(16);
this.eventManager = eventManager;
}
/**
* Get a Session instance based on the Session id
*
* @param id session id
* @return Session instance
*/
public Session getSession(String id) {
return sessionMap.get(id);
}
/**
* Add a session instance to sessionMap
*
* @param session session instance
*/
public void createSession(Session session) {
sessionMap.put(session.id(), session);
Event event = new Event();
event.attribute("session", session);
eventManager.fireEvent(EventType.SESSION_CREATED, event);
}
/**
* Clean all session instances
*/
public void clear() {
sessionMap.clear();
}
/**
* Remove a session
*
* @param session session instance
*/
public void destroySession(Session session) {<FILL_FUNCTION_BODY>}
public Map<String, Session> sessionMap() {
return sessionMap;
}
}
|
session.attributes().clear();
sessionMap.remove(session.id());
Event event = new Event();
event.attribute("session", session);
eventManager.fireEvent(EventType.SESSION_DESTROY, event);
| 354
| 62
| 416
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/multipart/FileItem.java
|
FileItem
|
byteArray
|
class FileItem {
/**
* Upload file field, e.g: "file", "img"
*/
private String name;
/**
* Upload file name, e.g: "hello.png"
*/
private String fileName;
/**
* File temp path
*/
private String path;
/**
* File Content Type
*/
private String contentType;
/**
* File size, unit: byte
*/
private long length;
/**
* Netty upload File mode,
* If the file size is less than 16kb, the memory mode is used.
* <p>
* In this mode, the file exists as a byte array and the file object is null.
*/
private boolean inMemory;
private transient File file;
private transient byte[] data;
public String extName() {
return fileName.substring(fileName.lastIndexOf("."));
}
@Override
public String toString() {
long kb = length / 1024;
return "FileItem(" +
"name='" + name + '\'' +
", fileName='" + fileName + '\'' +
", path='" + path + '\'' +
", contentType='" + contentType + '\'' +
", size=" + (kb < 1 ? 1 : kb) + "KB)";
}
public void moveTo(File newFile) throws IOException {
this.moveTo(Paths.get(newFile.getPath()));
}
public void moveTo(Path newFile) throws IOException {
if (null != file) {
Path tmpPath = Paths.get(file.getPath());
Files.move(tmpPath, newFile, StandardCopyOption.REPLACE_EXISTING);
} else {
Files.write(newFile, this.getData());
}
}
public byte[] byteArray() throws IOException {<FILL_FUNCTION_BODY>}
}
|
if (null != this.data) {
return this.data;
}
if (null == this.file) {
return null;
}
Path tmpPath = Paths.get(file.getPath());
try {
this.data = Files.readAllBytes(file.toPath());
return this.data;
} finally {
Files.delete(tmpPath);
}
| 511
| 105
| 616
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/route/PathRegexBuilder.java
|
PathRegexBuilder
|
rowToPath
|
class PathRegexBuilder {
private final static String PATH_VARIABLE_REPLACE = "([^/]+)";
private final static String DEFAULT_SEPARATOR = "/";
private final static String DEFAULT_START = "(/";
private final static String DEFAULT_END = ")|";
private final StringBuilder pathBuilder;
private final String separator;
public PathRegexBuilder() {
this.pathBuilder = new StringBuilder(DEFAULT_START);
this.separator = DEFAULT_SEPARATOR;
}
private void join(PathBuilderMeta row) {
if (row.getType() == PathBuilderMeta.PathTypeEnum.COMMON) {
pathBuilder.append(row.getName()).append(separator);
} else {
pathBuilder.append(row.getRegex()).append(separator);
}
}
public String build(boolean isSuffix) {
if (isSuffix) {
pathBuilder.append(DEFAULT_END);
}
return pathBuilder.toString();
}
public String parsePath(String path) {
if (StringKit.isBlank(path)) return path;
String[] pathModule = path.split("/");
Arrays.stream(pathModule)
.filter(row -> !row.isEmpty())
.map(this::rowToPath)
.forEach(this::join);
pathBuilder.deleteCharAt(pathBuilder.length() - 1);
return build(true);
}
private PathBuilderMeta rowToPath(String row) {<FILL_FUNCTION_BODY>}
}
|
if (!row.contains(":")) {
return PathBuilderMeta.builder()
.name(row)
.type(PathBuilderMeta.PathTypeEnum.COMMON)
.build();
}
String[] itemPath = row.split(":");
if (StringKit.isBlank(itemPath[0])) {
return PathBuilderMeta.builder()
.name(itemPath[1])
.regex(PATH_VARIABLE_REPLACE)
.type(PathBuilderMeta.PathTypeEnum.PARAM)
.build();
} else {
return PathBuilderMeta.builder()
.name(itemPath[0])
.regex("(" + itemPath[1] + ")")
.type(PathBuilderMeta.PathTypeEnum.REGEX)
.build();
}
| 406
| 201
| 607
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/route/RouteBuilder.java
|
RouteBuilder
|
parseRoute
|
class RouteBuilder {
private final RouteMatcher routeMatcher;
public RouteBuilder(RouteMatcher routeMatcher) {
this.routeMatcher = routeMatcher;
}
public void addWebHook(final Class<?> webHook, String pattern) {
Method before = ReflectKit.getMethod(webHook, HttpMethod.BEFORE.name().toLowerCase(), RouteContext.class);
Method after = ReflectKit.getMethod(webHook, HttpMethod.AFTER.name().toLowerCase(), RouteContext.class);
routeMatcher.addRoute(Route.builder()
.targetType(webHook)
.action(before)
.path(pattern)
.httpMethod(HttpMethod.BEFORE)
.build());
routeMatcher.addRoute(Route.builder()
.targetType(webHook)
.action(after)
.path(pattern)
.httpMethod(HttpMethod.AFTER)
.build());
}
/**
* Parse all routing in a controller
*
* @param routeType resolve the routing class,
* e.g RouteHandler.class or some controller class
*/
public void addRouter(final Class<?> routeType, Object controller) {
Method[] methods = routeType.getDeclaredMethods();
if (BladeKit.isEmpty(methods)) {
return;
}
String nameSpace = null, suffix = null;
if (null != routeType.getAnnotation(Path.class)) {
nameSpace = routeType.getAnnotation(Path.class).value();
suffix = routeType.getAnnotation(Path.class).suffix();
}
if (null == nameSpace) {
log.warn("Route [{}] not path annotation", routeType.getName());
return;
}
for (Method method : methods) {
ANY any = method.getAnnotation(ANY.class);
GET get = method.getAnnotation(GET.class);
POST post = method.getAnnotation(POST.class);
PUT put = method.getAnnotation(PUT.class);
DELETE delete = method.getAnnotation(DELETE.class);
this.parseRoute(RouteStruct.builder().any(any)
.get(get).post(post)
.put(put).delete(delete)
.nameSpace(nameSpace)
.suffix(suffix).routeType(routeType)
.controller(controller).method(method)
.build());
}
}
private void parseRoute(RouteStruct routeStruct) {<FILL_FUNCTION_BODY>}
private String getRoutePath(String value, String nameSpace, String suffix) {
String path = value.startsWith("/") ? value : "/" + value;
nameSpace = nameSpace.startsWith("/") ? nameSpace : "/" + nameSpace;
path = nameSpace + path;
path = path.replaceAll("[/]+", "/");
path = path.length() > 1 && path.endsWith("/") ? path.substring(0, path.length() - 1) : path;
path = path + suffix;
return path;
}
}
|
// build multiple route
HttpMethod methodType = routeStruct.getMethod();
ResponseType responseType = routeStruct.getResponseType();
String[] paths = routeStruct.getPaths();
if (paths.length <= 0) {
return;
}
for (String path : paths) {
String pathV = getRoutePath(path, routeStruct.nameSpace, routeStruct.suffix);
routeMatcher.addRoute(Route.builder()
.target(routeStruct.controller)
.targetType(routeStruct.routeType)
.action(routeStruct.method)
.path(pathV)
.httpMethod(methodType)
.responseType(responseType)
.build());
}
| 791
| 181
| 972
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/route/RouteStruct.java
|
RouteStruct
|
getPaths
|
class RouteStruct {
ANY any;
GET get;
POST post;
PUT put;
DELETE delete;
String nameSpace;
String suffix;
Class<?> routeType;
Object controller;
Method method;
private static final String[] DEFAULT_PATHS = new String[]{};
public HttpMethod getMethod() {
if (null != any) {
return any.method();
}
if (null != get) {
return HttpMethod.GET;
}
if (null != post) {
return HttpMethod.POST;
}
if (null != put) {
return HttpMethod.PUT;
}
if (null != delete) {
return HttpMethod.DELETE;
}
return HttpMethod.ALL;
}
public String[] getPaths() {<FILL_FUNCTION_BODY>}
public ResponseType getResponseType() {
if (null != any) {
return any.responseType();
}
if (null != get) {
return get.responseType();
}
if (null != post) {
return post.responseType();
}
if (null != put) {
return put.responseType();
}
if (null != delete) {
return delete.responseType();
}
return ResponseType.EMPTY;
}
}
|
if (null != any) {
return any.value();
}
if (null != get) {
return get.value();
}
if (null != post) {
return post.value();
}
if (null != put) {
return put.value();
}
if (null != delete) {
return delete.value();
}
return DEFAULT_PATHS;
| 361
| 111
| 472
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/route/mapping/StaticMapping.java
|
StaticMapping
|
addRoute
|
class StaticMapping {
private Map<String, Map<String, Route>> mapping = new HashMap<>(32);
public void addRoute(String path, HttpMethod httpMethod, Route route) {<FILL_FUNCTION_BODY>}
public Route findRoute(String path, String httpMethod) {
if (!mapping.containsKey(path)) {
return null;
}
return mapping.get(path).get(httpMethod);
}
public boolean hasPath(String path) {
return mapping.containsKey(path);
}
public void clear() {
mapping.clear();
}
}
|
if (!mapping.containsKey(path)) {
Map<String, Route> map = CollectionKit.newMap(8);
map.put(httpMethod.name(), route);
mapping.put(path, map);
} else {
mapping.get(path).put(httpMethod.name(), route);
}
| 160
| 81
| 241
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/route/mapping/dynamic/RegexMapping.java
|
RegexMapping
|
findRoute
|
class RegexMapping implements DynamicMapping {
private Map<HttpMethod, Map<Integer, FastRouteMappingInfo>> regexRoutes = new HashMap<>();
private Map<HttpMethod, Pattern> regexRoutePatterns = new HashMap<>();
private Map<HttpMethod, Integer> indexes = new HashMap<>();
private Map<HttpMethod, StringBuilder> patternBuilders = new HashMap<>();
@Override
public void addRoute(HttpMethod httpMethod, Route route, List<String> uriVariableNames) {
String path = route.getPath();
if (regexRoutes.get(httpMethod) == null) {
regexRoutes.put(httpMethod, new HashMap<>());
patternBuilders.put(httpMethod, new StringBuilder("^"));
indexes.put(httpMethod, 1);
}
int i = indexes.get(httpMethod);
regexRoutes.get(httpMethod).put(i, new FastRouteMappingInfo(route, uriVariableNames));
indexes.put(httpMethod, i + uriVariableNames.size() + 1);
patternBuilders.get(httpMethod).append(new PathRegexBuilder().parsePath(path));
}
@Override
public void register() {
patternBuilders.keySet().stream()
.filter(this::notIsWebHook)
.forEach(this::registerRoutePatterns);
}
@Override
public Route findRoute(String httpMethod, String path) {<FILL_FUNCTION_BODY>}
@Override
public void clear() {
regexRoutes.clear();
regexRoutePatterns.clear();
indexes.clear();
patternBuilders.clear();
}
private FastRouteMappingInfo findMappingInfo(HttpMethod httpMethod, int index) {
return regexRoutes.get(httpMethod).get(index);
}
private void registerRoutePatterns(HttpMethod httpMethod) {
StringBuilder patternBuilder = patternBuilders.get(httpMethod);
if (patternBuilder.length() > 1) {
patternBuilder.setCharAt(patternBuilder.length() - 1, '$');
}
log.debug("Fast Route Method: {}, regex: {}", httpMethod, patternBuilder);
regexRoutePatterns.put(httpMethod, Pattern.compile(patternBuilder.toString()));
}
private String cleanPathVariable(String pathVariable) {
if (pathVariable.contains(".")) {
return pathVariable.substring(0, pathVariable.indexOf('.'));
}
return pathVariable;
}
private Pattern findPattern(HttpMethod requestMethod) {
return regexRoutePatterns.get(requestMethod);
}
private boolean notIsWebHook(HttpMethod httpMethod) {
return !isWebHook(httpMethod);
}
}
|
Map<String, String> uriVariables = new LinkedHashMap<>();
HttpMethod requestMethod = HttpMethod.valueOf(httpMethod);
try {
Pattern pattern = findPattern(requestMethod);
if (null == pattern) {
pattern = findPattern(HttpMethod.ALL);
if (null != pattern) {
requestMethod = HttpMethod.ALL;
}
}
if (null == pattern) {
return null;
}
Matcher matcher = null;
if (path != null) {
matcher = pattern.matcher(path);
}
boolean matched = false;
if (matcher != null) {
matched = matcher.matches();
}
if (!matched) {
requestMethod = HttpMethod.ALL;
pattern = findPattern(requestMethod);
if (null == pattern) {
return null;
}
if (path != null) {
matcher = pattern.matcher(path);
}
matched = matcher != null && matcher.matches();
}
Route route = null;
if (matched) {
int i;
for (i = 1; matcher.group(i) == null; i++) ;
FastRouteMappingInfo mappingInfo = findMappingInfo(requestMethod, i);
route = new Route(mappingInfo.getRoute());
// find path variable
String uriVariable;
int j = 0;
while (++i <= matcher.groupCount() && (uriVariable = matcher.group(i)) != null) {
String pathVariable = cleanPathVariable(mappingInfo.getVariableNames().get(j++));
uriVariables.put(pathVariable, uriVariable);
}
route.setPathParams(uriVariables);
log.trace("lookup path: " + path + " uri variables: " + uriVariables);
}
return route;
} catch (Exception e) {
throw e;
}
| 694
| 495
| 1,189
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/route/mapping/dynamic/TrieMapping.java
|
Node
|
partIter
|
class Node {
private String part;
private NodeType type;
/**
* support http method
*/
private final Map<HttpMethod, Route> routeMap = new LinkedHashMap<>(4);
/**
* in staticChildren and dynamicChild, only one is real children, according to ChildType
* when in dynamic ChildType, staticChildren is used to store static end node, which is last node
* with static text.
*/
private final Map<String, Node> staticChildren = new LinkedHashMap<>(8);
private Node dynamicChild;
private Node anyStaticChild() {
for (Node value : staticChildren.values()) {
return value;
}
return null;
}
public Node putChildIfAbsent(Node child, boolean isEnd) {
switch (childType()) {
case NONCHILD:
if (child.getType() == NodeType.NORMAL) {
staticChildren.put(child.getPart(), child);
} else {
dynamicChild = child;
}
return child;
case STATIC:
if (child.getType() != NodeType.NORMAL) {
boolean canDynamic = staticChildren.values()
.stream()
.allMatch(Node::isEnd);
if (!canDynamic) {
throw new IllegalStateException(
String.format("%s conflict with path %s", child.getPart(),
anyStaticChild().getPart())
);
}
// convert to Dynamic ChildType
dynamicChild = child;
return dynamicChild;
}
return staticChildren.computeIfAbsent(child.getPart(), ignore -> child);
case DYNAMIC:
if (Objects.equals(dynamicChild.getPart(), child.getPart())) {
return dynamicChild;
}
if (isEnd && child.getType() == NodeType.NORMAL) {
return staticChildren.computeIfAbsent(child.getPart(), ignore -> child);
}
throw new IllegalStateException(
String.format("%s conflict with path %s", child.getPart(),
dynamicChild.getPart())
);
}
throw new IllegalStateException();
}
/**
* is end of a url
*
* @return
*/
public boolean isEnd() {
return !routeMap.isEmpty();
}
public Route selectRoute(HttpMethod httpMethod) {
return routeMap.getOrDefault(
httpMethod,
routeMap.get(HttpMethod.ALL)
);
}
public ChildType childType() {
if (staticChildren.isEmpty() && dynamicChild == null) {
return ChildType.NONCHILD;
} else if (dynamicChild != null) {
return ChildType.DYNAMIC;
} else {
return ChildType.STATIC;
}
}
}
@Override
public void addRoute(HttpMethod httpMethod, Route route, List<String> uriVariableNames) {
String path = route.getPath();
Node prev = root;
String[] parts;
if ("/".equals(path)) {
parts = new String[]{"/"};
} else {
path = StringKit.strip(path, "/");
parts = path.split("/");
}
for (int i = 0; i < parts.length; i++) {
String part = parts[i];
if (StringKit.isBlank(part)) {
continue;
}
boolean isEnd = i == parts.length - 1;
Node nodeByPart = getNodeByPart(part);
if (NodeType.WILD.equals(nodeByPart.type)) {
route.setWildcard(true);
}
prev = prev.putChildIfAbsent(nodeByPart, isEnd);
if (isEnd) {
prev.getRouteMap().put(httpMethod, route);
}
}
}
private Node getNodeByPart(String part) {
NodeType type;
if (part.charAt(0) == ':') {
type = NodeType.PARAM;
} else {
if (part.startsWith("*")) {
type = NodeType.WILD;
} else {
type = NodeType.NORMAL;
}
}
return Node.builder()
.part(part)
.type(type)
.build();
}
@Override
public void register() {
}
@Override
public Route findRoute(String httpMethod, String path) {
HttpMethod requestMethod = HttpMethod.valueOf(httpMethod);
Map<String, String> uriVariables = null;
Iterator<String> partIter = partIter(path);
Node prev = root;
walk:
for (; partIter.hasNext(); ) {
String part = partIter.next();
if (StringKit.isBlank(part)) continue;
boolean isEnd = !partIter.hasNext();
switch (prev.childType()) {
case STATIC:
Node child = prev.getStaticChildren().get(part);
if (child == null) {
return null;
}
prev = child;
break;
case DYNAMIC:
if (isEnd) {
Node staticEnd = prev.getStaticChildren().get(part);
if (staticEnd != null) {
prev = staticEnd;
break;
}
}
prev = prev.getDynamicChild();
if (prev.getType() == NodeType.PARAM) {
if (null == uriVariables) {
uriVariables = new LinkedHashMap<>(2);
}
uriVariables.put(prev.getPart().substring(1), part);
}
break;
default:
// leaf node
break walk;
}
}
if (prev.isEnd() &&
(!partIter.hasNext() || prev.getType() == NodeType.WILD)) {
Route selectedRoute = prev.selectRoute(requestMethod);
if (selectedRoute == null) {
return null;
}
Route route = new Route(selectedRoute);
if (null != uriVariables) {
route.setPathParams(uriVariables);
}
return route;
}
return null;
}
protected Iterator<String> partIter(String path) {<FILL_FUNCTION_BODY>
|
return new Iterator<String>() {
private int start = 1;
private int end = start + 1;
@Override
public boolean hasNext() {
if (this.start == 1 && "/".equals(path)) {
// return true;
this.start = 0;
this.end = 1;
}
return end <= path.length();
}
@Override
public String next() {
while (end < path.length() && path.charAt(end) != '/') {
end++;
}
String part = path.substring(start, end);
start = end + 1;
end = start + 1;
return part;
}
};
| 1,623
| 183
| 1,806
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/ui/HtmlCreator.java
|
HtmlCreator
|
styleTables
|
class HtmlCreator {
private static final String HTML_FOOTER = "<br/><p><center>Copyright © <a href='https://github.com/lets-blade/blade' target='_blank'>Blade-" + BladeConst.VERSION + "</a></center></p><br/>";
private final StringBuilder html = new StringBuilder();
public HtmlCreator() {
html.append("<!DOCTYPE html>");
html.append("<head>");
html.append("<meta charset=\"utf-8\">");
html.append("<style type='text/css'>.version{padding:10px;text-decoration-line: none;}.message-header{" +
"background-color: #900C3F;\n" +
"color: #fff;\n" +
"font-weight: bold;" +
"-webkit-box-align: center;\n" +
"-ms-flex-align: center;\n" +
"align-items: center;\n" +
"color: #fff;\n" +
"display: -webkit-box;\n" +
"display: -ms-flexbox;\n" +
"display: flex;\n" +
"-webkit-box-pack: justify;\n" +
"-ms-flex-pack: justify;\n" +
"justify-content: space-between;\n" +
"line-height: 1.25;\n" +
"padding: 0.5em 0.75em;\n" +
"position: relative;" +
"}" +
".message-body{" +
"background-color: #fff5f7;" +
"font-size:1rem;" +
"border-color: #ff3860;\n" +
"color: #900C3F;\n" +
"border-top-left-radius: 0;\n" +
"border-top-right-radius: 0;\n" +
"border-top: none;\n" +
"border: 1px solid #dbdbdb;\n" +
"border-radius: 3px;\n" +
"padding: 1em 1.25em;" +
"}</style>");
}
public HtmlCreator title(String title) {
html.append("<title>").append(title).append("</title>");
return this;
}
public HtmlCreator h1(String heading) {
html.append("</head>");
html.append("<body>");
html.append("<h1>").append(heading).append("</h1>");
return this;
}
public HtmlCreator h2(String heading) {
html.append("<h2>").append(heading).append("</h2>");
return this;
}
public HtmlCreator paragraph(String paragraph) {
html.append("<p>").append(paragraph).append("</p>");
return this;
}
public HtmlCreator startP() {
html.append("<p>");
return this;
}
public HtmlCreator startP(String className) {
html.append("<p class='" + className + "'>");
return this;
}
public HtmlCreator addBold(String text) {
html.append("<b>").append(text).append("</b>");
return this;
}
public HtmlCreator endP() {
html.append("</p>");
return this;
}
public HtmlCreator hr() {
html.append("<hr/>");
return this;
}
public HtmlCreator br() {
html.append("<br/>");
return this;
}
public HtmlCreator addTableWithHeaders(List<String> headers) {
html.append("<table>");
html.append("<tr>");
headers.forEach((h) -> html.append("<th>").append(h).append("</th>"));
html.append("</tr>");
return this;
}
public HtmlCreator addRowToTable(List<String> rowElements) {
html.append("<tr>");
rowElements.forEach((re) -> html.append("<td>").append(re).append("</td>"));
html.append("</tr>");
return this;
}
public HtmlCreator endTable() {
html.append("</table>");
return this;
}
public HtmlCreator startStyle() {
html.append("<style type='text/css'>");
return this;
}
public HtmlCreator endStyle() {
html.append("</style>");
return this;
}
public HtmlCreator centerHeadings() {
html.append("h1, h2 { text-align: center; }");
return this;
}
public HtmlCreator add(String text) {
html.append(text);
return this;
}
public HtmlCreator styleTables() {<FILL_FUNCTION_BODY>}
public HtmlCreator center(String text) {
html.append("<center>").append(text).append("</center>");
return this;
}
@Override
public String toString() {
return html.toString();
}
public String html() {
html.append(HTML_FOOTER);
html.append("</body>");
return html.toString();
}
}
|
html.append("table, th, td { margin: 0 auto; border: 1px solid black; border-collapse: collapse; text-align: center; }");
return this;
| 1,452
| 48
| 1,500
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/ui/ModelAndView.java
|
ModelAndView
|
toString
|
class ModelAndView {
/**
* Data object, the object is placed in the attribute request
*/
private Map<String, Object> model = new HashMap<>(4);
/**
* View Page
*/
private String view;
public ModelAndView() {
}
/**
* Create an empty view
*
* @param view view page
*/
public ModelAndView(String view) {
super();
this.model = new HashMap<>();
this.view = view;
}
/**
* Create a model view object with data
*
* @param model model data
* @param view view page
*/
public ModelAndView(Map<String, Object> model, String view) {
super();
this.model = model;
this.view = view;
}
/**
* Add data to model
*
* @param key key
* @param value value
*/
public void add(String key, Object value) {
this.model.put(key, value);
}
/**
* Remove model data
*
* @param key key
*/
public void remove(String key) {
this.model.remove(key);
}
/**
* @return Return view page
*/
public String getView() {
return view;
}
/**
* Setting view page
*
* @param view view page
*/
public void setView(String view) {
this.view = view;
}
/**
* @return Return model map
*/
public Map<String, Object> getModel() {
return model;
}
/**
* Setting model
*
* @param model Storage data map
*/
public void setModel(Map<String, Object> model) {
this.model = model;
}
/**
* Add attributes to model
*
* @param attributes current request attributes
*/
public void addAll(Map<String, Object> attributes) {
this.model.putAll(attributes);
}
@Override
public String toString() {<FILL_FUNCTION_BODY>}
}
|
return "view = " + view + ", model = " + model;
| 570
| 20
| 590
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/ui/template/DefaultEngine.java
|
DefaultEngine
|
render
|
class DefaultEngine implements TemplateEngine {
public static String TEMPLATE_PATH = "templates";
private static final String PATH_SEPARATOR = "/";
@Override
public void render(ModelAndView modelAndView, Writer writer) throws TemplateException {<FILL_FUNCTION_BODY>}
}
|
String view = modelAndView.getView();
String body;
String viewPath;
if (BladeConst.CLASSPATH.endsWith(PATH_SEPARATOR)) {
viewPath = BladeConst.CLASSPATH + TEMPLATE_PATH + PATH_SEPARATOR + view;
} else {
viewPath = BladeConst.CLASSPATH + PATH_SEPARATOR + TEMPLATE_PATH + PATH_SEPARATOR + view;
}
try {
if (view.startsWith("jar:")) {
String jarPath = view.substring(4);
InputStream input = DefaultEngine.class.getResourceAsStream(jarPath);
BufferedReader reader = new BufferedReader(new InputStreamReader(input));
body = IOKit.readToString(reader);
} else {
if (BladeKit.runtimeIsJAR()) {
viewPath = PATH_SEPARATOR + TEMPLATE_PATH + PATH_SEPARATOR + view;
InputStream in = getClass().getResourceAsStream(viewPath);
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
body = IOKit.readToString(reader);
} else {
body = IOKit.readToString(viewPath);
}
}
Request request = WebContext.request();
Map<String, Object> attributes = new HashMap<>();
Map<String, Object> reqAttrs = request.attributes();
attributes.putAll(reqAttrs);
attributes.putAll(modelAndView.getModel());
Session session = request.session();
if (null != session) {
attributes.putAll(session.attributes());
}
String result = BladeTemplate.template(body, attributes).fmt();
writer.write(result);
} catch (Exception e) {
log.warn("View path is: {}", viewPath);
throw new TemplateException(e);
} finally {
IOKit.closeQuietly(writer);
}
| 82
| 505
| 587
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/mvc/ui/template/UncheckedTemplateException.java
|
UncheckedTemplateException
|
invalidStateException
|
class UncheckedTemplateException extends RuntimeException {
private static final String INVALID_NUMBER_OF_ARGUMENTS = "Invalid number of arguments: ${argsNum}. Every argument needs to have a pair.";
private static final String ARGUMENT_ALREADY_DEFINED = "Argument '${arg}' is already defined in the arguments list.";
private static final String INVALID_CHARACTER_IN_PARAM_NAME = "Invalid character '${char}' used in param name (affected index: ${idx}).";
private static final String IO_EXCEPTION_READING_FROM_FILE = "Error accessing ${strPath}. Exception:";
private static final String INVALID_ARGUMENT_NAME_NULL_OR_EMPTY = "Invalid argument name: '${arg}'. Argument should not be null or empty";
private static final String INVALID_STATE_EXCEPTION = "Invalid state: '${state}'. No code coverage for this new state.";
public UncheckedTemplateException(String message) {
super(message);
}
public UncheckedTemplateException(String message, Throwable cause) {
super(message, cause);
}
public UncheckedTemplateException(Throwable cause) {
super(cause);
}
public static UncheckedTemplateException invalidNumberOfArguments(int argsNum) {
String msg = BladeTemplate.template(INVALID_NUMBER_OF_ARGUMENTS).arg("argsNum", argsNum).fmt();
return new UncheckedTemplateException(msg);
}
public static UncheckedTemplateException argumentAlreadyExist(String arg) {
String msg = BladeTemplate.template(ARGUMENT_ALREADY_DEFINED).arg("arg", arg).fmt();
return new UncheckedTemplateException(msg);
}
public static UncheckedTemplateException invalidCharacterInParam(char c, int idx) {
String msg = BladeTemplate.template(INVALID_CHARACTER_IN_PARAM_NAME).args("char", c, "idx", idx).fmt();
return new UncheckedTemplateException(msg);
}
public static UncheckedTemplateException ioExceptionReadingFromFile(String strPath, Throwable t) {
String msg = BladeTemplate.template(IO_EXCEPTION_READING_FROM_FILE).arg("strPath", strPath).fmt();
return new UncheckedTemplateException(msg, t);
}
public static UncheckedTemplateException invalidArgumentName(Object argName) {
String msg = BladeTemplate.template(INVALID_ARGUMENT_NAME_NULL_OR_EMPTY, "arg", argName).fmt();
return new UncheckedTemplateException(msg);
}
public static UncheckedTemplateException invalidStateException(BladeTemplate.State state) {<FILL_FUNCTION_BODY>}
}
|
String msg = BladeTemplate.template(INVALID_STATE_EXCEPTION, "state", state).fmt();
return new UncheckedTemplateException(msg);
| 712
| 43
| 755
|
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.Throwable) ,public void <init>(java.lang.String, java.lang.Throwable) <variables>static final long serialVersionUID
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/options/CorsOptions.java
|
CorsOptions
|
allowedHeaders
|
class CorsOptions {
private Set<String> origins;
private boolean disable;
private Set<String> exposeHeaders;
private boolean allowCredentials;
private long maxAge;
private Set<HttpMethod> allowedMethods;
private Set<String> allowedHeaders;
private boolean allowNullOrigin;
private boolean anyOrigin;
/**
* Creates a new Builder instance allowing any origin, "*" which is the
* wildcard origin.
*/
CorsOptions() {
this.anyOrigin = true;
this.origins = Collections.emptySet();
}
/**
* Creates a Builder instance with it's origin set to '*'.
*
* @return Builder to support method chaining.
*/
public static CorsOptions forAnyOrigin() {
return new CorsOptions();
}
public static CorsOptions create(final String... origins) {
if (null != origins && origins.length > 0) {
CorsOptions options = new CorsOptions();
options.origins = new LinkedHashSet<>(Arrays.asList(origins));
return options;
} else {
return forAnyOrigin();
}
}
public CorsOptions allowedOrigins(final String... origins) {
if (null != this.origins) {
this.origins.addAll(new LinkedHashSet<>(Arrays.asList(origins)));
} else {
this.origins = new LinkedHashSet<>(Arrays.asList(origins));
}
return this;
}
/**
* Web browsers may set the 'Origin' request header to 'null' if a resource is loaded
* from the local file system. Calling this method will enable a successful CORS response
* with a {@code "null"} value for the CORS response header 'Access-Control-Allow-Origin'.
*
* @return {@link CorsOptions} to support method chaining.
*/
public CorsOptions allowNullOrigin() {
this.allowNullOrigin = true;
return this;
}
/**
* Disables CORS support.
*
* @return {@link CorsOptions} to support method chaining.
*/
public CorsOptions disable() {
this.disable = true;
return this;
}
/**
* Specifies the headers to be exposed to calling clients.
* <p>
* During a simple CORS request, only certain response headers are made available by the
* browser, for example using:
* <pre>
* xhr.getResponseHeader("Content-Type");
* </pre>
* <p>
* The headers that are available by default are:
* <ul>
* <li>Cache-Control</li>
* <li>Content-Language</li>
* <li>Content-Type</li>
* <li>Expires</li>
* <li>Last-Modified</li>
* <li>Pragma</li>
* </ul>
* <p>
* To expose other headers they need to be specified which is what this method enables by
* adding the headers to the CORS 'Access-Control-Expose-Headers' response header.
*
* @param headers the values to be added to the 'Access-Control-Expose-Headers' response header
* @return {@link CorsOptions} to support method chaining.
*/
public CorsOptions exposeHeaders(final String... headers) {
if (null != this.exposeHeaders) {
this.exposeHeaders.addAll(Arrays.asList(headers));
} else {
this.exposeHeaders = new LinkedHashSet<>(Arrays.asList(headers));
}
return this;
}
/**
* By default cookies are not included in CORS requests, but this method will enable cookies to
* be added to CORS requests. Calling this method will set the CORS 'Access-Control-Allow-Credentials'
* response header to true.
* <p>
* Please note, that cookie support needs to be enabled on the client side as well.
* The client needs to opt-in to send cookies by calling:
* <pre>
* xhr.withCredentials = true;
* </pre>
* The default value for 'withCredentials' is false in which case no cookies are sent.
* Setting this to true will included cookies in cross origin requests.
*
* @return {@link CorsOptions} to support method chaining.
*/
public CorsOptions allowCredentials() {
allowCredentials = true;
return this;
}
/**
* When making a preflight request the client has to perform two request with can be inefficient.
* This setting will set the CORS 'Access-Control-Max-Age' response header and enables the
* caching of the preflight response for the specified time. During this time no preflight
* request will be made.
*
* @param max the maximum time, in seconds, that the preflight response may be cached.
* @return {@link CorsOptions} to support method chaining.
*/
public CorsOptions maxAge(final long max) {
maxAge = max;
return this;
}
/**
* Specifies the allowed set of HTTP Request Methods that should be returned in the
* CORS 'Access-Control-Request-Method' response header.
*
* @param methods the {@link HttpMethod}s that should be allowed.
* @return {@link CorsOptions} to support method chaining.
*/
public CorsOptions allowedMethods(final HttpMethod... methods) {
if (null != this.allowedMethods) {
this.allowedMethods.addAll(Arrays.asList(methods));
} else {
this.allowedMethods = new LinkedHashSet<>(Arrays.asList(methods));
}
return this;
}
/**
* Specifies the if headers that should be returned in the CORS 'Access-Control-Allow-Headers'
* response header.
* <p>
* If a client specifies headers on the request, for example by calling:
* <pre>
* xhr.setRequestHeader('My-Custom-Header', "SomeValue");
* </pre>
* the server will receive the above header name in the 'Access-Control-Request-Headers' of the
* preflight request. The server will then decide if it allows this header to be sent for the
* real request (remember that a preflight is not the real request but a request asking the server
* if it allow a request).
*
* @param headers the headers to be added to the preflight 'Access-Control-Allow-Headers' response header.
* @return {@link CorsConfigBuilder} to support method chaining.
*/
public CorsOptions allowedHeaders(final String... headers) {<FILL_FUNCTION_BODY>}
}
|
if (null != this.allowedHeaders) {
this.allowedHeaders.addAll(Arrays.asList(headers));
} else {
this.allowedHeaders = new LinkedHashSet<>(Arrays.asList(headers));
}
return this;
| 1,738
| 68
| 1,806
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/options/HttpOptions.java
|
HttpOptions
|
enableSession
|
class HttpOptions {
public static final int DEFAULT_MAX_CONTENT_SIZE = 20971520; // 20MB
public static final int DEFAULT_SESSION_TIMEOUT = 7200; // 2 hour
public static final String DEFAULT_SESSION_KEY = "SESSION";
/**
* Maximum length of the requested content.
* If the length exceeds this value, a 413 status code is returned
*/
private int maxContentSize = DEFAULT_MAX_CONTENT_SIZE;
private boolean enableGzip;
private boolean enableSession;
private boolean enableRequestCost;
private String sessionKey = DEFAULT_SESSION_KEY;
private Integer sessionTimeout = DEFAULT_SESSION_TIMEOUT;
private Integer cacheTimeout;
/**
* Session implementation type, the default is HttpSession.
* <p>
* When you need to be able to achieve similar RedisSession
*/
private Class<? extends Session> sessionType = HttpSession.class;
public static HttpOptions create() {
return new HttpOptions();
}
public HttpOptions enableGzip() {
this.enableGzip = true;
return this;
}
public HttpOptions enableSession() {
this.enableSession = true;
return enableSession(DEFAULT_SESSION_KEY);
}
public HttpOptions enableSession(String sessionKey) {
return enableSession(sessionKey, DEFAULT_SESSION_TIMEOUT);
}
public HttpOptions enableSession(String sessionKey, int sessionTimeout) {<FILL_FUNCTION_BODY>}
}
|
this.enableSession = true;
this.sessionKey = sessionKey;
this.sessionTimeout = sessionTimeout;
return this;
| 392
| 37
| 429
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/server/EpollKit.java
|
EpollKit
|
group
|
class EpollKit {
static NettyServerGroup group(int threadCount, int workers) {<FILL_FUNCTION_BODY>}
}
|
var bossGroup = new EpollEventLoopGroup(threadCount, new NamedThreadFactory("epoll-boss@"));
var workerGroup = new EpollEventLoopGroup(workers, new NamedThreadFactory("epoll-worker@"));
return NettyServerGroup.builder().boosGroup(bossGroup).workerGroup(workerGroup).socketChannel(EpollServerSocketChannel.class).build();
| 39
| 95
| 134
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/server/HttpServerHandler.java
|
HttpServerHandler
|
exceptionCaught
|
class HttpServerHandler extends SimpleChannelInboundHandler<HttpRequest> {
public static final FastThreadLocal<WebContext> WEB_CONTEXT_THREAD_LOCAL = new FastThreadLocal<>();
static final StaticFileHandler staticFileHandler = new StaticFileHandler(WebContext.blade());
static final RouteMatcher routeMatcher = WebContext.blade().routeMatcher();
private final RouteMethodHandler routeHandler = new RouteMethodHandler();
private final Set<String> notStaticUri = new LRUSet<>(128);
private boolean recordRequestLog() {
return WebContext.blade().environment()
.getBoolean(ENV_KEY_REQUEST_LOG, true);
}
private boolean enablePerformance() {
return WebContext.blade().environment()
.getBoolean(ENV_KEY_PERFORMANCE, false);
}
@Override
public void channelReadComplete(ChannelHandlerContext ctx) {
ctx.flush();
}
@Override
protected void channelRead0(ChannelHandlerContext ctx, HttpRequest httpRequest) {
CompletableFuture<HttpRequest> future = CompletableFuture.completedFuture(httpRequest);
Executor executor = ctx.executor();
future.thenApplyAsync(req -> buildWebContext(ctx, req), executor)
.thenApplyAsync(this::executeLogic, executor)
.thenApplyAsync(this::buildResponse, executor)
.exceptionally(this::handleException)
.thenAcceptAsync(msg -> writeResponse(ctx, future, msg), ctx.channel().eventLoop());
}
private WebContext buildWebContext(ChannelHandlerContext ctx,
HttpRequest req) {
return WebContext.create(req, new HttpResponse(), ctx);
}
private void writeResponse(ChannelHandlerContext ctx, CompletableFuture<HttpRequest> future, io.netty.handler.codec.http.HttpResponse msg) {
ctx.writeAndFlush(msg);
future.complete(null);
}
private io.netty.handler.codec.http.HttpResponse handleException(Throwable e) {
Request request = WebContext.request();
String method = request.method();
String uri = request.uri();
Exception srcException = (Exception) e.getCause().getCause();
if (srcException instanceof BladeException) {
} else {
log500(log, method, uri);
}
if (null != WebContext.blade().exceptionHandler()) {
WebContext.blade().exceptionHandler().handle(srcException);
} else {
log.error("", srcException);
}
return routeHandler.handleResponse(WebContext.get());
}
private io.netty.handler.codec.http.HttpResponse buildResponse(WebContext webContext) {
WebContext.set(webContext);
return routeHandler.handleResponse(webContext);
}
private WebContext executeLogic(WebContext webContext) {
try {
WebContext.set(webContext);
Request request = webContext.getRequest();
HttpMethod method = request.httpMethod();
String uri = request.uri();
Instant start = Instant.now();
if (isStaticFile(method, uri)) {
staticFileHandler.handle(webContext);
return webContext;
}
Route route = routeMatcher.lookupRoute(method.name(), uri);
if (null != route) {
webContext.setRoute(route);
} else {
throw new NotFoundException(uri);
}
routeHandler.handle(webContext);
if (enablePerformance()) {
return webContext;
}
if (recordRequestLog()) {
long cost = log200AndCost(log, start, BladeCache.getPaddingMethod(method.name()), uri);
request.attribute(REQUEST_COST_TIME_ATTR, cost);
}
return webContext;
} catch (Exception e) {
throw BladeException.wrapper(e);
}
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {<FILL_FUNCTION_BODY>}
private boolean isStaticFile(HttpMethod method, String uri) {
if (!HttpMethod.GET.equals(method) || notStaticUri.contains(uri)) {
return false;
}
if (FAVICON_PATH.equals(uri)) {
return true;
}
Set<String> paths = WebContext.blade().staticOptions().getPaths();
if (paths.stream().noneMatch(s -> s.equals(uri) || uri.startsWith(s))) {
notStaticUri.add(uri);
return false;
}
return true;
}
}
|
if (!ExceptionHandler.isResetByPeer(cause)) {
log.error(cause.getMessage(), cause);
io.netty.handler.codec.http.HttpResponse response = new DefaultHttpResponse(HTTP_1_1, HttpResponseStatus.INTERNAL_SERVER_ERROR);
ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);
}
| 1,197
| 96
| 1,293
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/server/HttpServerInitializer.java
|
HttpServerInitializer
|
mergeCorsConfig
|
class HttpServerInitializer extends ChannelInitializer<SocketChannel> {
private final HttpServerHandler httpServerHandler;
private final SslContext sslCtx;
private CorsConfig corsConfig;
private int maxContentSize;
private boolean enableGzip;
public static volatile String date = DateKit.gmtDate(LocalDateTime.now());
public HttpServerInitializer(SslContext sslCtx, Blade blade, ScheduledExecutorService service) {
this.sslCtx = sslCtx;
this.httpServerHandler = new HttpServerHandler();
this.mergeCorsConfig(blade.corsOptions());
this.mergeStaticOptions(blade.staticOptions(), blade.environment());
this.mergeHttpOptions(blade.httpOptions(), blade.environment());
service.scheduleWithFixedDelay(() -> date = DateKit.gmtDate(LocalDateTime.now()), 1000, 1000, TimeUnit.MILLISECONDS);
}
@Override
protected void initChannel(SocketChannel ch) {
ChannelPipeline pipeline = ch.pipeline();
try {
if (sslCtx != null) {
pipeline.addLast(sslCtx.newHandler(ch.alloc()));
}
pipeline.addLast(new HttpServerCodec());
pipeline.addLast(new HttpObjectAggregatorDecode(maxContentSize));
pipeline.addLast(new HttpServerExpectContinueHandler());
if (enableGzip) {
pipeline.addLast(new HttpContentCompressor());
}
if (null != corsConfig) {
pipeline.addLast(new CorsHandler(corsConfig));
}
pipeline.addLast(new FullHttpRequestDecode());
pipeline.addLast(new ChunkedWriteHandler());
pipeline.addLast(httpServerHandler);
} catch (Exception e) {
log.error("Add channel pipeline error", e);
}
}
private void mergeCorsConfig(CorsOptions corsOptions) {<FILL_FUNCTION_BODY>}
private void mergeStaticOptions(StaticOptions staticOptions, Environment environment) {
int cacheSeconds = staticOptions.getCacheSeconds();
if (cacheSeconds > 0 && StaticOptions.DEFAULT_CACHE_SECONDS != cacheSeconds) {
environment.set(ENV_KEY_STATIC_CACHE_SECONDS, cacheSeconds);
} else {
cacheSeconds = environment.getInt(ENV_KEY_STATIC_CACHE_SECONDS, StaticOptions.DEFAULT_CACHE_SECONDS);
staticOptions.setCacheSeconds(cacheSeconds);
}
boolean showList = staticOptions.isShowList();
if (showList) {
environment.set(ENV_KEY_STATIC_LIST, true);
} else {
showList = environment.getBoolean(ENV_KEY_STATIC_LIST, Boolean.FALSE);
staticOptions.setShowList(showList);
}
}
private void mergeHttpOptions(HttpOptions httpOptions, Environment environment) {
this.maxContentSize = httpOptions.getMaxContentSize();
this.enableGzip = httpOptions.isEnableGzip();
if (this.maxContentSize != HttpOptions.DEFAULT_MAX_CONTENT_SIZE) {
environment.set(ENV_KEY_HTTP_MAX_CONTENT, this.maxContentSize);
} else {
this.maxContentSize = environment.getInt(ENV_KEY_HTTP_MAX_CONTENT, HttpOptions.DEFAULT_MAX_CONTENT_SIZE);
httpOptions.setMaxContentSize(maxContentSize);
}
if (this.enableGzip) {
environment.set(ENV_KEY_GZIP_ENABLE, true);
} else {
this.enableGzip = environment.getBoolean(ENV_KEY_GZIP_ENABLE, false);
httpOptions.setEnableGzip(enableGzip);
}
boolean requestCost = httpOptions.isEnableRequestCost();
if (requestCost) {
environment.set(ENV_KEY_HTTP_REQUEST_COST, true);
} else {
requestCost = environment.getBoolean(ENV_KEY_HTTP_REQUEST_COST, false);
httpOptions.setEnableRequestCost(requestCost);
}
boolean enableSession = httpOptions.isEnableSession();
if (enableSession) {
environment.set(ENV_KEY_SESSION_ENABLED, true);
} else {
enableSession = environment.getBoolean(ENV_KEY_SESSION_ENABLED, false);
httpOptions.setEnableSession(enableSession);
}
}
}
|
if (null == corsOptions) {
return;
}
CorsConfigBuilder corsConfigBuilder = null;
if (corsOptions.isAnyOrigin()) {
corsConfigBuilder = CorsConfigBuilder.forAnyOrigin();
}
if (null != corsOptions.getOrigins() && !corsOptions.getOrigins().isEmpty()) {
corsConfigBuilder = CorsConfigBuilder.forOrigins(corsOptions.getOrigins().toArray(new String[0]));
}
if (null == corsConfigBuilder) {
return;
}
if (corsOptions.isAllowNullOrigin()) {
corsConfigBuilder.allowNullOrigin();
}
if (corsOptions.isAllowCredentials()) {
corsConfigBuilder.allowCredentials();
}
if (corsOptions.isDisable()) {
corsConfigBuilder.disable();
}
corsConfigBuilder.maxAge(corsOptions.getMaxAge());
if (null != corsOptions.getExposeHeaders() && !corsOptions.getExposeHeaders().isEmpty()) {
corsConfigBuilder.exposeHeaders(corsOptions.getExposeHeaders().toArray(new String[0]));
}
if (null != corsOptions.getAllowedMethods() && !corsOptions.getAllowedMethods().isEmpty()) {
corsConfigBuilder.allowedRequestMethods(corsOptions.getAllowedMethods().stream()
.map(item -> HttpMethod.valueOf(item.name()))
.toArray(HttpMethod[]::new));
}
if (null != corsOptions.getAllowedHeaders() && !corsOptions.getAllowedHeaders().isEmpty()) {
corsConfigBuilder.allowedRequestHeaders(corsOptions.getAllowedHeaders().toArray(new String[0]));
}
this.corsConfig = corsConfigBuilder.build();
| 1,154
| 475
| 1,629
|
<no_super_class>
|
lets-blade_blade
|
blade/blade-core/src/main/java/com/hellokaton/blade/server/ProgressiveFutureListener.java
|
ProgressiveFutureListener
|
operationProgressed
|
class ProgressiveFutureListener implements ChannelProgressiveFutureListener {
private final String fileName;
private final FileChannel channel;
private boolean showProgress = true;
public ProgressiveFutureListener(String fileName, FileChannel channel) {
this.fileName = fileName;
this.channel = channel;
}
@Override
public void operationProgressed(ChannelProgressiveFuture future, long progress, long total) {<FILL_FUNCTION_BODY>}
@Override
public void operationComplete(ChannelProgressiveFuture future) {
try {
channel.close();
if (showProgress) {
log.debug("File {} transfer complete.", fileName);
}
} catch (Exception e) {
log.error("File {} channel close error.", fileName, e);
}
}
public ProgressiveFutureListener hideProgress() {
this.showProgress = false;
return this;
}
public static ProgressiveFutureListener create(String fileName, FileChannel channel) {
return new ProgressiveFutureListener(fileName, channel);
}
}
|
if (total < 0) { // total unknown
log.warn("File {} transfer progress: {}", fileName, progress);
} else {
if (showProgress) {
log.debug("File {} transfer progress: {}/{}", fileName, progress, total);
}
}
| 272
| 74
| 346
|
<no_super_class>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.