edu.mit.ai.psg.jeva
Class JNDConstructorDeclaration
java.lang.Object
|
+--edu.mit.ai.psg.jeva.SimpleNode
|
+--edu.mit.ai.psg.jeva.JevaNode
|
+--edu.mit.ai.psg.jeva.JNDConstructorDeclaration
- public class JNDConstructorDeclaration
- extends JevaNode
- implements IClassBodyDeclaration, JevaParserConstants
JNDConstructorDeclaration: parse node for constructors.
Body is not a simple block, since first statement may be an
ExplicitConstructorInvocation which must be treated specially.
- 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
getConstructor
public InterpretedConstructor getConstructor()
throws IllegalStateException
getParametersNode
public JNFormalParameterList getParametersNode()
getNumStatementNodes
public int getNumStatementNodes()
getStatementNode
public IStatementNode getStatementNode(int i)
getFirstStatementIndex
public int getFirstStatementIndex()
- return index at which first statement can be inserted
computeConstructor
protected InterpretedConstructor computeConstructor(IEnv env)
throws VerifyingException
- Create constructor. Also initializes this node, adding
default explicit constructor invocation "super();" if missing.
verifyTypes
public IEnv verifyTypes(IEnv staticEnv,
IEnv objectEnv)
throws VerifyingException
evalExplicitConstructorCallParameter
public Object evalExplicitConstructorCallParameter(int paramIndex,
Object[] arguments,
IEnv classEnv)
throws ThrowException
evalConstructorBody
public void evalConstructorBody(Object target,
Object[] arguments,
IEnv classEnv)
throws ThrowException
- eval constructor body AFTER explicit constructor invocation