org.erights.e.elib.base
Class MethodNode
java.lang.Object
|
+--org.erights.e.elib.base.MethodNode
- All Implemented Interfaces:
- Script
- Direct Known Subclasses:
- EMethodNode, JavaMemberNode, OverloaderNode
- public abstract class MethodNode
- extends Object
- implements Script
Untamed: An element of a VTable
- Author:
- Mark S. Miller
- See Also:
org.erights.e.elib.prim.VTable
Constructor Summary
Method Summary
abstract void
addJavaMemberNodesToMap(FlexMap map)
Enabled: If this MethodNode is or consists of JavaMemberNodes, add these
JavaMemberNodes to map indexed by their optTypedVerb (their flat
signature).
abstract int
getArity()
Enabled: E Polymorphism is based on verb & arity alone.
abstract String
getOptTypedVerb()
Enabled: Returns null or an interned string containing the parameter type
signature in canonical "flat signature" form.
abstract String
getVerb()
Enabled: Returns a message selector string (not necessarily interned).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.erights.e.elib.base.Script
Constructor Detail
MethodNode
protected MethodNode()
Method Detail
getDocComment
public abstract String getDocComment()
- Enabled:
-
-
getVerb
public abstract String getVerb()
- Enabled: Returns a message selector string (not necessarily interned).
-
-
getOptTypedVerb
public abstract String getOptTypedVerb()
- Enabled: Returns null or an interned string containing the parameter type
signature in canonical "flat signature" form.
Used to allow the invocation of Java methods that are overloaded by
type.
-
-
getArity
public abstract int getArity()
- Enabled: E Polymorphism is based on verb & arity alone.
-
-
addJavaMemberNodesToMap
public abstract void addJavaMemberNodesToMap(FlexMap map)
- Enabled: If this MethodNode is or consists of JavaMemberNodes, add these
JavaMemberNodes to map indexed by their optTypedVerb (their flat
signature).
-
-
makeMessageType
public MessageDesc makeMessageType(String verb)
- Enabled: Returns a description of the message this method responds to.
Should be overridden by subclasses that can be more informative
-
-
protocol
public void protocol(Object optSelf,
FlexList mTypes)
- Enabled:
- Specified by:
protocol in interface Script
- Parameters:
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.
respondsTo
public boolean respondsTo(Object optSelf,
String aVerb,
int anArity)
- Enabled:
- Specified by:
respondsTo in interface Script
- Parameters:
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.
aVerb - anArity -
- Returns: