|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Untamed:
Method Summary | |
Object |
execute(Object self,
String verb,
Object[] args)
Enabled: verb must be an interned string |
void |
protocol(Object optSelf,
FlexList mTypes)
Enabled: Adds to 'mTypes' the mappings provided by this script. |
boolean |
respondsTo(Object optSelf,
String verb,
int arity)
Enabled: Does an object whose behavior is this script respond to verb/arity messages? |
Script |
shorten(Object optSelf,
String aVerb,
Object[] args)
Enabled: Returns a Script at least as good as this script for purposes of being execute()d with a message matching the following description. |
Method Detail |
public Script shorten(Object optSelf, String aVerb, Object[] args)
We intend to grow this mechanism into a call-site caching mechanism, but currently it's just to shorten the Java call stack needed for a given E call stack.
If the call won't actually resolve, then shorten may throw the relevant exception, or it may return a Script whose execute will throw that exception. The choice shouldn't matter.
This method represents a start on the mechanism needed for call-site cacheing, but the API will need to change to get their.
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.
public Object execute(Object self, String verb, Object[] args)
public void protocol(Object optSelf, FlexList mTypes)
optSelf
- If non-null, and if this script has a match clause, then
delegate an __allegedType query to optSelf via the match
clause so it can add further elements to mTypes.
Since 'null' is normally a valid value for a 'self', this use of 'null' depends on our knowledge that 'null''s script does not have its own match clause.
mTypes
- message descriptions.public boolean respondsTo(Object optSelf, String verb, int arity)
optSelf
- If non-null, and if this script has a match clause,
and if this script doesn't have a directly matching
method, then delegate the respondsTo question to
optSelf via the match clause to see if it responds.
Since 'null' is normally a valid value for a 'self', this use of 'null' depends on our knowledge that 'null''s script does not have its own match clause.
verb
- arity
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |