|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.elib.prim.JavaMatcher
Untamed: Abstract superclass of all the CRAPI-based wrappers of java.lang.reflect.Methods representing matchers for installing them in VTables as matchers.
Field Summary | |
private CallCounter |
myCallCounter
|
(package private) java.lang.reflect.Method |
myMethod
|
Constructor Summary | |
(package private) |
JavaMatcher(java.lang.reflect.Method method)
|
Method Summary | |
Object |
execute(Object self,
String aVerb,
Object[] args)
Enabled: |
(package private) abstract String |
explain()
|
(package private) abstract Object |
innerExecute(Object self,
Object[] pair)
Do the part of execute(java.lang.Object, java.lang.String, java.lang.Object[]) that's specific to a particular kind of
JavaMatcher. |
(package private) static boolean |
isMatcher(java.lang.reflect.Method method,
int offset)
Is this method a plausible matcher method? |
void |
protocol(Object optSelf,
FlexList mTypes)
Enabled: |
boolean |
respondsTo(Object optSelf,
String verb,
int arity)
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: |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
final java.lang.reflect.Method myMethod
private final CallCounter myCallCounter
Constructor Detail |
JavaMatcher(java.lang.reflect.Method method)
Method Detail |
static boolean isMatcher(java.lang.reflect.Method method, int offset)
This isMatcher/2 only does part of the work, and should only be used from the isMatcher/1 methods in the concrete subclasses of this class.
method
- The method to be tested.offset
- How many parameter positions should be skipped?
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[] pair)
execute(java.lang.Object, java.lang.String, java.lang.Object[])
that's specific to a particular kind of
JavaMatcher.
self
- The object whose matcher is being invoked.pair
- A pair of a String and a ConstList, representing the
verb and args of the original message, respectively.public Object execute(Object self, String aVerb, Object[] args)
execute
in interface Script
public void protocol(Object optSelf, FlexList mTypes)
protocol
in interface Script
optSelf
- mTypes
- public boolean respondsTo(Object optSelf, String verb, int arity)
respondsTo
in interface Script
optSelf
- verb
- arity
-
abstract String explain()
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 |