anvil.script.compiler
Class FunctionBase
java.lang.Object
|
+--anvil.script.compiler.Compiled
|
+--anvil.script.compiler.FunctionBase
- All Implemented Interfaces:
- CompilableFunction, Function, Type
- Direct Known Subclasses:
- InterfaceMethodBase, MethodBase, NativeFunction
- public class FunctionBase
- extends Compiled
- implements CompilableFunction
class FunctionBase
| Fields inherited from interface anvil.script.CompilableFunction |
CLASSES, PARAMETER_ANY, PARAMETER_ANYLIST, PARAMETER_ARRAY, PARAMETER_BOOLEAN, PARAMETER_CONTEXT, PARAMETER_DOUBLE, PARAMETER_INT, PARAMETER_LIST, PARAMETER_LONG, PARAMETER_OBJECT, PARAMETER_REST, PARAMETER_STRING, SIGNATURES |
| Fields inherited from interface anvil.script.Type |
CLASS, CONSTANT_VARIABLE, CONSTRUCTOR, FUNCTION, FUNCTION_PARAMETER, GLOBAL_NAMESPACE, IMPORT, INTERFACE, INTERFACE_METHOD, LOCAL_VARIABLE, MEMBER_VARIABLE, METHOD, MODULE, NAMESPACE, SCOPE0, STATIC_VARIABLE, SYSTEM_NAMESPACE, TYPE_NAMES |
|
Constructor Summary |
FunctionBase(Scope parent,
java.lang.reflect.Method method,
java.lang.String name,
java.lang.Object[] parameters,
Doc document,
boolean privat)
|
|
Method Summary |
Any |
execute(Context context,
Any self)
|
Any |
execute(Context context,
Any[] parameters)
|
Any |
execute(Context context,
Any self,
Any param1)
|
Any |
execute(Context context,
Any self,
Any[] parameters)
|
Any |
execute(Context context,
Any self,
Any param1,
Any param2)
|
Any |
execute(Context context,
Any self,
Any param1,
Any param2,
Any param3)
|
Any |
execute(Context context,
Any self,
Any param1,
Any param2,
Any param3,
Any param4)
|
Any |
getAttribute(java.lang.String name)
|
FunctionDispatcher |
getDispatcher(Context context)
|
GeneratorDispatcher |
getGeneratorDispatcher(Context context)
|
int |
getMinimumParameterCount()
|
int |
getParameterCount()
|
Any |
getParameterDefault(int index)
|
Doc |
getParameterDoc(int index)
|
java.lang.String |
getParameterName(int index)
|
int |
getParameterType(int index)
|
int |
getType()
|
int |
getTypeRef(ConstantPool pool)
|
boolean |
isInnerFunction()
|
java.lang.String |
toString()
|
| Methods inherited from class anvil.script.compiler.Compiled |
findClass, findInterface, findMethod, findNamespace, getDocument, getfield, getName, getParent, getParents, getQualifiedName, getstatic, getstatic, isPrivate, putfield, putstatic, putstatic, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_functionname
protected java.lang.String _functionname
_method
protected java.lang.reflect.Method _method
_isinner
protected boolean _isinner
_signature
protected java.lang.String _signature
_dispatcher
protected FunctionDispatcher _dispatcher
_generatordispatcher
protected GeneratorDispatcher _generatordispatcher
_parameters
protected ParameterListDeclaration _parameters
_define
protected java.util.HashMap _define
FunctionBase
public FunctionBase(Scope parent,
java.lang.reflect.Method method,
java.lang.String name,
java.lang.Object[] parameters,
Doc document,
boolean privat)
toString
public java.lang.String toString()
- Overrides:
toString in class Compiled
getType
public int getType()
- Specified by:
getType in interface Type- Specified by:
getType in class Compiled
getMinimumParameterCount
public int getMinimumParameterCount()
- Specified by:
getMinimumParameterCount in interface CompilableFunction
getParameterCount
public int getParameterCount()
- Specified by:
getParameterCount in interface CompilableFunction
getParameterName
public java.lang.String getParameterName(int index)
- Specified by:
getParameterName in interface CompilableFunction
getParameterType
public int getParameterType(int index)
- Specified by:
getParameterType in interface CompilableFunction
getParameterDefault
public Any getParameterDefault(int index)
- Specified by:
getParameterDefault in interface CompilableFunction
getParameterDoc
public Doc getParameterDoc(int index)
- Specified by:
getParameterDoc in interface CompilableFunction
isInnerFunction
public boolean isInnerFunction()
- Specified by:
isInnerFunction in interface CompilableFunction
execute
public Any execute(Context context,
Any[] parameters)
- Specified by:
execute in interface Function
execute
public Any execute(Context context,
Any self,
Any[] parameters)
- Specified by:
execute in interface Function
execute
public Any execute(Context context,
Any self)
- Specified by:
execute in interface Function
execute
public Any execute(Context context,
Any self,
Any param1)
- Specified by:
execute in interface Function
execute
public Any execute(Context context,
Any self,
Any param1,
Any param2)
- Specified by:
execute in interface Function
execute
public Any execute(Context context,
Any self,
Any param1,
Any param2,
Any param3)
- Specified by:
execute in interface Function
execute
public Any execute(Context context,
Any self,
Any param1,
Any param2,
Any param3,
Any param4)
- Specified by:
execute in interface Function
getAttribute
public Any getAttribute(java.lang.String name)
- Specified by:
getAttribute in interface CompilableFunction
getTypeRef
public int getTypeRef(ConstantPool pool)
- Specified by:
getTypeRef in interface Type- Specified by:
getTypeRef in class Compiled
getDispatcher
public FunctionDispatcher getDispatcher(Context context)
- Specified by:
getDispatcher in interface CompilableFunction
getGeneratorDispatcher
public GeneratorDispatcher getGeneratorDispatcher(Context context)