Package gw.lang.reflect.features
Class MethodReference<R,T>
- java.lang.Object
-
- gw.lang.reflect.features.FeatureReference<R,T>
-
- gw.lang.reflect.features.MethodReference<R,T>
-
- All Implemented Interfaces:
IFeatureReference<R,T>,IInvokableFeatureReference<R,T>,IMethodReference<R,T>
public class MethodReference<R,T> extends FeatureReference<R,T> implements IMethodReference<R,T>
-
-
Constructor Summary
Constructors Constructor Description MethodReference(IType rootType, String funcName, IType[] params, Object[] boundValues)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodReferencecopyWithVoidReturn()booleanequals(Object o)Objectevaluate(Object... args)Evaluates reflectivelyprotected Objectevaluate(Iterator args)Object[]getBoundArgValues()Object[]getBoundValues()IFeatureInfogetFeatureInfo()List<IType>getFullArgTypes()TgetInvoke()Returns the method reference as a block in an invocation-friendly syntaxIMethodInfogetMethodInfo()Returns the method info for this referenceITypegetRootType()inthashCode()protected booleanhasReturn()TtoBlock()Returns the method reference as a block in a transformation-friendly syntax
-
-
-
Method Detail
-
copyWithVoidReturn
public MethodReference copyWithVoidReturn()
- Specified by:
copyWithVoidReturnin interfaceIMethodReference<R,T>
-
hasReturn
protected boolean hasReturn()
- Overrides:
hasReturnin classFeatureReference<R,T>
-
getMethodInfo
public IMethodInfo getMethodInfo()
Description copied from interface:IMethodReferenceReturns the method info for this reference- Specified by:
getMethodInfoin interfaceIMethodReference<R,T>
-
getInvoke
public T getInvoke()
Description copied from interface:IInvokableFeatureReferenceReturns the method reference as a block in an invocation-friendly syntax- Specified by:
getInvokein interfaceIInvokableFeatureReference<R,T>
-
toBlock
public T toBlock()
Description copied from interface:IInvokableFeatureReferenceReturns the method reference as a block in a transformation-friendly syntax- Specified by:
toBlockin interfaceIInvokableFeatureReference<R,T>
-
getBoundArgValues
public Object[] getBoundArgValues()
- Specified by:
getBoundArgValuesin interfaceIInvokableFeatureReference<R,T>- Returns:
- an array of bound values if the feature had them, and null otherwise
-
evaluate
public Object evaluate(Object... args)
Description copied from interface:IInvokableFeatureReferenceEvaluates reflectively- Specified by:
evaluatein interfaceIInvokableFeatureReference<R,T>
-
evaluate
protected Object evaluate(Iterator args)
- Specified by:
evaluatein classFeatureReference<R,T>
-
getFullArgTypes
public List<IType> getFullArgTypes()
- Specified by:
getFullArgTypesin classFeatureReference<R,T>
-
getFeatureInfo
public IFeatureInfo getFeatureInfo()
- Specified by:
getFeatureInfoin interfaceIFeatureReference<R,T>
-
getRootType
public IType getRootType()
- Specified by:
getRootTypein interfaceIFeatureReference<R,T>
-
getBoundValues
public Object[] getBoundValues()
-
-