edu.rice.cs.dynamicjava.symbol
Class JavaClass.JavaMethod

java.lang.Object
  extended by edu.rice.cs.dynamicjava.symbol.JavaClass.JavaMethod
All Implemented Interfaces:
Access.Limited, DJMethod, Function
Enclosing class:
JavaClass

protected class JavaClass.JavaMethod
extends Object
implements DJMethod


Field Summary
protected  Method _m
           
 
Constructor Summary
JavaClass.JavaMethod(Method m)
           
 
Method Summary
 Access accessibility()
          The symbol's access level.
 Access.Module accessModule()
          Get the module enclosing this symbol's declaration.
 String declaredName()
          The name used to access this symbol.
 DJMethod declaredSignature()
          Get the original declared method (prior to any substitutions, etc).
 DJClass declaringClass()
          The class declaring this method.
 Object evaluate(Object receiver, Iterable<Object> args, RuntimeBindings bindings, Options options)
          Invoke the method with the given parameters.
 boolean isAbstract()
           
 boolean isFinal()
           
 boolean isStatic()
           
protected  Thunk<Iterable<LocalVariable>> makeParamThunk()
           
 Iterable<LocalVariable> parameters()
           
 Type returnType()
           
 Iterable<Type> thrownTypes()
           
 String toString()
           
 Iterable<VariableType> typeParameters()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_m

protected final Method _m
Constructor Detail

JavaClass.JavaMethod

public JavaClass.JavaMethod(Method m)
Method Detail

makeParamThunk

protected Thunk<Iterable<LocalVariable>> makeParamThunk()

declaredName

public String declaredName()
Description copied from interface: Access.Limited
The name used to access this symbol.

Specified by:
declaredName in interface Access.Limited
Specified by:
declaredName in interface Function

declaringClass

public DJClass declaringClass()
Description copied from interface: DJMethod
The class declaring this method. May be null for certain special methods.

Specified by:
declaringClass in interface DJMethod

isStatic

public boolean isStatic()
Specified by:
isStatic in interface DJMethod

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in interface DJMethod

isFinal

public boolean isFinal()
Specified by:
isFinal in interface DJMethod

accessibility

public Access accessibility()
Description copied from interface: Access.Limited
The symbol's access level.

Specified by:
accessibility in interface Access.Limited
Specified by:
accessibility in interface DJMethod

accessModule

public Access.Module accessModule()
Description copied from interface: Access.Limited
Get the module enclosing this symbol's declaration.

Specified by:
accessModule in interface Access.Limited
Specified by:
accessModule in interface DJMethod

returnType

public Type returnType()
Specified by:
returnType in interface Function

typeParameters

public Iterable<VariableType> typeParameters()
Specified by:
typeParameters in interface Function

parameters

public Iterable<LocalVariable> parameters()
Specified by:
parameters in interface Function

thrownTypes

public Iterable<Type> thrownTypes()
Specified by:
thrownTypes in interface Function

declaredSignature

public DJMethod declaredSignature()
Description copied from interface: DJMethod
Get the original declared method (prior to any substitutions, etc).

Specified by:
declaredSignature in interface DJMethod

evaluate

public Object evaluate(Object receiver,
                       Iterable<Object> args,
                       RuntimeBindings bindings,
                       Options options)
                throws EvaluatorException
Description copied from interface: DJMethod
Invoke the method with the given parameters.

Specified by:
evaluate in interface DJMethod
Throws:
EvaluatorException

toString

public String toString()
Overrides:
toString in class Object