edu.rice.cs.dynamicjava.symbol
Class SpecialMethod

java.lang.Object
  extended by edu.rice.cs.dynamicjava.symbol.SpecialMethod
All Implemented Interfaces:
Access.Limited, DJMethod, Function
Direct Known Subclasses:
ArrayCloneMethod, GetClassMethod

public abstract class SpecialMethod
extends Object
implements DJMethod

Abstract parent for special implicit methods. The evaluation details are handled here, allowing the implementation to be based on a method with a different signature.


Constructor Summary
SpecialMethod()
           
 
Method Summary
 DJMethod declaredSignature()
          Get the original declared method (prior to any substitutions, etc).
 Object evaluate(Object receiver, Iterable<Object> args, RuntimeBindings bindings, Options options)
          Invoke the method with the given parameters.
protected abstract  Method implementation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.rice.cs.dynamicjava.symbol.DJMethod
accessibility, accessModule, declaringClass, isAbstract, isFinal, isStatic
 
Methods inherited from interface edu.rice.cs.dynamicjava.symbol.Function
declaredName, parameters, returnType, thrownTypes, typeParameters
 
Methods inherited from interface edu.rice.cs.dynamicjava.symbol.Access.Limited
declaredName
 

Constructor Detail

SpecialMethod

public SpecialMethod()
Method Detail

implementation

protected abstract Method implementation()
                                  throws ClassNotFoundException,
                                         NoSuchMethodException
Throws:
ClassNotFoundException
NoSuchMethodException

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