Class DispatchFunction
java.lang.Object
com.googlecode.aviator.runtime.type.AviatorObject
com.googlecode.aviator.runtime.function.AbstractVariadicFunction
com.googlecode.aviator.runtime.function.DispatchFunction
- All Implemented Interfaces:
AviatorFunction
,Serializable
,Runnable
,Callable<AviatorObject>
Dispatch function by argument arity.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Object[]
private final IdentityHashMap
<Integer, LambdaFunction> private final String
private static final long
private final TreeMap
<Integer, LambdaFunction> Fields inherited from class com.googlecode.aviator.runtime.type.AviatorObject
metadata
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Get the function namevoid
(package private) static AviatorObject[]
processVariadicArgs
(Map<String, Object> env, int arity, LambdaFunction fn, AviatorObject[] args) variadicCall
(Map<String, Object> env, AviatorObject... args) Call with variadic arguments.The subclass must implement this method.Methods inherited from class com.googlecode.aviator.runtime.function.AbstractVariadicFunction
call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, desc, getAviatorType, getValue, innerCompare, run
Methods inherited from class com.googlecode.aviator.runtime.type.AviatorObject
add, bitAnd, bitNot, bitOr, bitXor, booleanValue, compare, compareEq, defineValue, deref, div, exponent, getElement, getMetadata, isNull, match, meta, mod, mult, neg, not, numberValue, setValue, shiftLeft, shiftRight, stringValue, sub, toString, unsignedShiftRight, withMeta, withoutMeta
-
Field Details
-
EMPTY_VAR_ARGS
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
functions
-
variadicFunctions
-
name
-
-
Constructor Details
-
DispatchFunction
-
-
Method Details
-
getName
Description copied from interface:AviatorFunction
Get the function name- Returns:
-
install
-
variadicCall
Description copied from class:AbstractVariadicFunction
Call with variadic arguments.The subclass must implement this method.- Specified by:
variadicCall
in classAbstractVariadicFunction
- Parameters:
env
-args
-- Returns:
-
processVariadicArgs
static AviatorObject[] processVariadicArgs(Map<String, Object> env, int arity, LambdaFunction fn, AviatorObject[] args)
-