java.lang.Object | +--org.erights.e.elib.base.MethodNode | +--org.erights.e.elib.prim.JavaMemberNode
Untamed: Abstract superclass of all the CRAPI-based wrappers of java.lang.reflect.Members for installing them in VTables as MethodNodes.
private static Object
trySpecialCoercion(Object self,
String aVerb,
Object[] args,
Throwable problem)
final java.lang.reflect.Member myMember
private final CallCounter myCallCounter
JavaMemberNode(java.lang.reflect.Member member)
public MessageDesc makeMessageType(String verb)
makeMessageType in class MethodNodepublic String getVerb()
getVerb in class MethodNodepublic String getOptTypedVerb()
getOptTypedVerb in class MethodNodepublic int getArity()
getArity in class MethodNodepublic void addJavaMemberNodesToMap(FlexMap map)
addJavaMemberNodesToMap in class MethodNodeObject[] optCoerceArgs(Object[] args)
private Object[] coerceArgs(Object[] args, OneArgFunc optEjector)
private static Object trySpecialCoercion(Object self, String aVerb, Object[] args, Throwable problem)
The one such special case currently defined, and hopefully the only one we will define, is to have '3 + 4.5' and such coerce to '3.0 + 4.5'.
If we aren't in one of our special cases, then we should simply rethrow the problem.
public Script shorten(Object optSelf, String aVerb, Object[] args)
optSelf - If present, then a script could shorten using
instance-specific data.aVerb - Must be internedargs - Typically, only its arity is used. But OverloaderNode uses
the types of the arguments to select among Java overloads.
abstract Object innerExecute(Object self, Object[] args) throws InstantiationException, IllegalAccessException, IllegalArgumentException, java.lang.reflect.InvocationTargetException
IllegalArgumentException - if the number of actual and formal
parameters differ, or if an unwrapping or method
invocation conversion fails.
InstantiationException
IllegalAccessException
java.lang.reflect.InvocationTargetExceptionpublic Object execute(Object self, String aVerb, Object[] args)
protected java.lang.reflect.Member member()
public abstract Class[] parameterTypes()
public abstract Class returnType()
protected abstract Class receiverType()
abstract String explain(String args)
public void subPrintOn(TextWriter out, int priority) throws IOException
public String toString()
public void traceOn(TextWriter out) throws IOException
traceOn in interface EStackItem