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

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

protected class JavaClass.JavaConstructor
extends Object
implements DJConstructor

Non-static in order to determine the outer type.


Field Summary
protected  Constructor<?> _k
           
protected  Type _outerType
           
 
Constructor Summary
JavaClass.JavaConstructor(Constructor<?> k)
           
 
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.
 DJConstructor declaredSignature()
          Get the original declared constructor (prior to any substitutions, etc).
 DJClass declaringClass()
          The class declaring this constructor.
 Object evaluate(Object outer, Iterable<Object> args, RuntimeBindings bindings, Options options)
          Invoke the constructor with the given parameters.
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

_k

protected final Constructor<?> _k

_outerType

protected final Type _outerType
Constructor Detail

JavaClass.JavaConstructor

public JavaClass.JavaConstructor(Constructor<?> k)
Method Detail

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: DJConstructor
The class declaring this constructor. May be null for certain special fields.

Specified by:
declaringClass in interface DJConstructor

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 DJConstructor

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 DJConstructor

makeParamThunk

protected Thunk<Iterable<LocalVariable>> makeParamThunk()

typeParameters

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

declaredSignature

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

Specified by:
declaredSignature in interface DJConstructor

parameters

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

returnType

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

thrownTypes

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

evaluate

public Object evaluate(Object outer,
                       Iterable<Object> args,
                       RuntimeBindings bindings,
                       Options options)
                throws EvaluatorException
Description copied from interface: DJConstructor
Invoke the constructor with the given parameters. outer may be null.

Specified by:
evaluate in interface DJConstructor
Throws:
EvaluatorException

toString

public String toString()
Overrides:
toString in class Object