Class ClassMethodFunction
java.lang.Object
com.googlecode.aviator.runtime.type.AviatorObject
com.googlecode.aviator.runtime.function.AbstractVariadicFunction
com.googlecode.aviator.runtime.function.ClassMethodFunction
- All Implemented Interfaces:
AviatorFunction
,Serializable
,Runnable
,Callable<AviatorObject>
An aviator function wraps a class's static method.
- Since:
- 4.2.2
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Class
<?> private MethodHandle
private boolean
private String
private String
private Class<?>[]
private static final long
Fields inherited from class com.googlecode.aviator.runtime.type.AviatorObject
metadata
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Get the function nameprivate void
private void
readObject
(ObjectInputStream input) variadicCall
(Map<String, Object> env, AviatorObject... args) Call with variadic arguments.The subclass must implement this method.private void
writeObject
(ObjectOutputStream output) 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
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
handle
-
pTypes
-
name
-
methodName
-
methods
-
clazz
-
isStatic
private boolean isStatic
-
-
Constructor Details
-
ClassMethodFunction
public ClassMethodFunction(Class<?> clazz, boolean isStatic, String name, String methodName, List<Method> methods) throws IllegalAccessException, NoSuchMethodException
-
-
Method Details
-
init
private void init(boolean isStatic, String methodName, List<Method> methods) throws IllegalAccessException, NoSuchMethodException -
readObject
- Throws:
ClassNotFoundException
IOException
-
writeObject
- Throws:
IOException
-
getName
Description copied from interface:AviatorFunction
Get the function name- Returns:
-
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:
-