edu.mit.ai.psg.jeva
Class JNSExplicitConstructorInvocation
java.lang.Object
|
+--edu.mit.ai.psg.jeva.SimpleNode
|
+--edu.mit.ai.psg.jeva.JevaNode
|
+--edu.mit.ai.psg.jeva.JNSExplicitConstructorInvocation
- public class JNSExplicitConstructorInvocation
- extends JevaNode
- implements IStatementNode, JevaParserConstants
Jeva parse node for this(...) or super(...) constructor invocations.
[JavaLangSpec1.0 sec8.6.5 Constructor Body]
- Author:
- CarlManning, caroma@ai.mit.edu
Copyright (c) 1997, 1998, 1999 Massachusetts Institute of Technology
| Methods inherited from class edu.mit.ai.psg.jeva.JevaNode |
checkInsertionPoint,
find2ndTokenBeforeEndBody,
findChildIndex,
findPrecedingToken,
findTokenBeforeChild,
findTokenBeforeChild,
findTokenBeforeEnd,
getBeginToken,
getEndToken,
insertChildTokens,
insertNewChildAfter,
insertNewChildAt,
insertNewChildBefore,
jnGetChild,
jnGetParent,
print,
print,
printToken,
printToString,
printToString,
removeChild,
removeChildTokens,
replaceChild,
replaceChild,
setBeginToken,
setEndToken,
updateEndTokens,
updateEndTokensPriorChild,
updateEndTokensPriorNode,
updateEndTokensPriorNode |
jjtAccept
public Object jjtAccept(IJevaVisitor visitor,
Object data)
- Overrides:
- jjtAccept in class JevaNode
getArgumentsNode
public JNEArguments getArgumentsNode()
verifyTypes
public IEnv verifyTypes(IEnv env)
throws VerifyingException
- Explicit Constructor invocations must appear as the first statement
of a constructor, and may not refer to fields of the class
(which are not initialized yet). Rely on constructor to provide
an appropriate environent with method parameters but no fields.
- Specified by:
- verifyTypes in interface IStatementNode
eval
public IEnv eval(IEnv env)
throws ThrowException
- Throws Error, as interpreter should never call this.
(See GenerateProxyClass to see how
ExplicitConstructorInvocations are implemented.)
- Specified by:
- eval in interface IStatementNode
evalArgumentAt
public Object evalArgumentAt(int index,
IEnv env)
throws ThrowException
initConstructorSignature
protected void initConstructorSignature(IEnv env)
throws VerifyingException
- [JavaLangSpec1.0 sec8.6.5 Constructor Body]
Constructor selection is similar to method selection.