|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Field Summary | |
private CallCounter |
myCallCounter
|
(package private) java.lang.reflect.Member |
myMember
|
Constructor Summary | |
(package private) |
JavaMemberNode(java.lang.reflect.Member member)
|
Method Summary | |
void |
addJavaMemberNodesToMap(FlexMap map)
Enabled: Add this JavaMemberNode to the map |
private Object[] |
coerceArgs(Object[] args,
OneArgFunc optEjector)
|
Object |
execute(Object self,
String aVerb,
Object[] args)
Enabled: |
(package private) abstract String |
explain(String args)
|
int |
getArity()
Enabled: |
String |
getOptTypedVerb()
Enabled: |
String |
getVerb()
Enabled: |
(package private) abstract Object |
innerExecute(Object self,
Object[] args)
|
MessageDesc |
makeMessageType(String verb)
Enabled: |
protected java.lang.reflect.Member |
member()
|
(package private) Object[] |
optCoerceArgs(Object[] args)
|
abstract Class[] |
parameterTypes()
Enabled: |
protected abstract Class |
receiverType()
|
abstract Class |
returnType()
Enabled: |
Script |
shorten(Object optSelf,
String aVerb,
Object[] args)
Enabled: Just returns this. |
void |
subPrintOn(TextWriter out,
int priority)
Enabled: |
String |
toString()
Suppressed: |
void |
traceOn(TextWriter out)
Enabled: |
private static Object |
trySpecialCoercion(Object self,
String aVerb,
Object[] args,
Throwable problem)
This is called only when 'self aVerb(args)' has failed due to a coercion-to-Java failure, in which case we try a special case outside our normal coercion theory. |
Methods inherited from class org.erights.e.elib.base.MethodNode |
getDocComment, protocol, respondsTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
final java.lang.reflect.Member myMember
private final CallCounter myCallCounter
Constructor Detail |
JavaMemberNode(java.lang.reflect.Member member)
Method Detail |
public MessageDesc makeMessageType(String verb)
makeMessageType
in class MethodNode
public String getVerb()
getVerb
in class MethodNode
public String getOptTypedVerb()
getOptTypedVerb
in class MethodNode
public int getArity()
getArity
in class MethodNode
public void addJavaMemberNodesToMap(FlexMap map)
addJavaMemberNodesToMap
in class MethodNode
Object[] 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)
shorten
in interface Script
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.InvocationTargetException
public Object execute(Object self, String aVerb, Object[] args)
execute
in interface Script
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
IOException
public String toString()
toString
in class Object
public void traceOn(TextWriter out) throws IOException
traceOn
in interface EStackItem
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |