anvil.core.reflect
Class ParameterTree

java.lang.Object
  |
  +--anvil.core.reflect.ParameterTree
All Implemented Interfaces:
CodecConstants, CompilableFunction, Function, ReflectedJava, Type
Direct Known Subclasses:
ConstructorTree, MethodTree

public abstract class ParameterTree
extends java.lang.Object
implements CompilableFunction, CodecConstants, ReflectedJava


Field Summary
protected  java.lang.String _name
           
protected  Reflection _parent
           
protected  ParameterNode[] _root
           
protected  int _type
           
 
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
 
Fields inherited from interface anvil.codec.CodecConstants
ACC_ABSTRACT, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_TRANSIENT, ACC_VOLATILE, ATTR_Code, ATTR_ConstantValue, ATTR_Deprecated, ATTR_Exceptions, ATTR_InnerClasses, ATTR_LineNumberTable, ATTR_LocalVariableTable, ATTR_SourceFile, ATTR_Synthetic, CLASS_MAGIC, CONSTANT_Class, CONSTANT_Double, CONSTANT_FieldRef, CONSTANT_Float, CONSTANT_Integer, CONSTANT_InterfaceMethodRef, CONSTANT_Long, CONSTANT_MethodRef, CONSTANT_NameAndType, CONSTANT_SourceFile, CONSTANT_String, CONSTANT_Utf8, MAJOR_VERSION, MINOR_VERSION, T_BOOLEAN, T_BYTE, T_CHAR, T_DOUBLE, T_FLOAT, T_INT, T_LONG, T_SHORT
 
Constructor Summary
ParameterTree(Reflection parent, java.lang.String name)
           
 
Method Summary
abstract  ParameterNode createNode()
           
 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)
           
 java.lang.String getCompiledName()
           
 FunctionDispatcher getDispatcher(Context context)
           
 Doc getDocument()
           
 int getMinimumParameterCount()
           
 java.lang.String getName()
           
 int getParameterCount()
           
 Any getParameterDefault(int index)
           
 Doc getParameterDoc(int index)
           
 java.lang.String getParameterName(int index)
           
 int getParameterType(int index)
           
 Scope getParent()
           
 Scope[] getParents()
           
 java.lang.String getQualifiedName()
           
 int getType()
           
 int getTypeRef(ConstantPool pool)
           
 void insert(java.lang.reflect.Member member, java.lang.Class[] paramtypes)
           
 Any invoke(Context context, java.lang.Object instance, Any[] parameters)
           
 boolean isInnerFunction()
           
 boolean isPrivate()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_parent

protected Reflection _parent

_name

protected java.lang.String _name

_root

protected ParameterNode[] _root

_type

protected int _type
Constructor Detail

ParameterTree

public ParameterTree(Reflection parent,
                     java.lang.String name)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

createNode

public abstract ParameterNode createNode()

insert

public void insert(java.lang.reflect.Member member,
                   java.lang.Class[] paramtypes)

invoke

public Any invoke(Context context,
                  java.lang.Object instance,
                  Any[] parameters)

getName

public java.lang.String getName()
Specified by:
getName in interface Type

isPrivate

public boolean isPrivate()
Specified by:
isPrivate in interface Type

getQualifiedName

public java.lang.String getQualifiedName()
Specified by:
getQualifiedName in interface Type

getType

public int getType()
Specified by:
getType in interface Type

getParent

public Scope getParent()
Specified by:
getParent in interface Type

getParents

public Scope[] getParents()
Specified by:
getParents in interface Type

getDocument

public Doc getDocument()
Specified by:
getDocument in interface Type

getDispatcher

public FunctionDispatcher getDispatcher(Context context)
Specified by:
getDispatcher 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

getCompiledName

public java.lang.String getCompiledName()

getMinimumParameterCount

public int getMinimumParameterCount()
Specified by:
getMinimumParameterCount in interface CompilableFunction

getParameterCount

public int getParameterCount()
Specified by:
getParameterCount in interface CompilableFunction

getParameterType

public int getParameterType(int index)
Specified by:
getParameterType in interface CompilableFunction

getParameterName

public java.lang.String getParameterName(int index)
Specified by:
getParameterName 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

getAttribute

public Any getAttribute(java.lang.String name)
Specified by:
getAttribute in interface CompilableFunction

isInnerFunction

public boolean isInnerFunction()
Specified by:
isInnerFunction in interface CompilableFunction

getTypeRef

public int getTypeRef(ConstantPool pool)
Specified by:
getTypeRef in interface Type