edu.mit.ai.psg.jevaES
Class JNEInstanceCreationExpression
java.lang.Object
|
+--edu.mit.ai.psg.jevaES.SimpleNode
|
+--edu.mit.ai.psg.jevaES.JevaNode
|
+--edu.mit.ai.psg.jevaES.ExpressionNode
|
+--edu.mit.ai.psg.jevaES.JNEInstanceCreationExpression
- public class JNEInstanceCreationExpression
- extends ExpressionNode
Jeva parse Node for instance creation expressions: "new" Type(args...).
[JavaLangSpec1.0 sec15.8 Class Instance Creation Expressions]
TODO: "new" superType(Arguments) { classbody }
For arrays ("new" Type[arraydim]) see JNEArrayCreationExpression.
- See Also:
JNEArrayCreationExpression
|
Method Summary |
boolean |
computeIsConstant(IEnv env)
Compute whether this expression is a constant (nodes should not call
this method directly). |
Class |
computeType(IEnv env)
Compute the static type of the expression (nodes should not call
this method directly). |
Object |
eval(IEnv env)
Evaluate this expression (nodes should not call this method
directly). |
protected void |
initConstructor(IEnv env)
|
| Methods inherited from class edu.mit.ai.psg.jevaES.JevaNode |
getBeginToken,
getEndToken,
notVerified,
print,
print,
printToken,
printToString,
printToString,
setBeginToken,
setEndToken,
shouldNotHappen,
shouldNotHappen,
shouldNotHappen |
computeType
public Class computeType(IEnv env)
throws VerifyingException
- Description copied from class: ExpressionNode
- Compute the static type of the expression (nodes should not call
this method directly). Called by getType.
- Overrides:
- computeType in class ExpressionNode
- Tags copied from class: ExpressionNode
- Parameters:
env - environment of name bindings, etc.- Throws:
- VerifyingException - if expression is illegal
- See Also:
EvalMethods.getType(IExpressionNode, IEnv)
computeIsConstant
public boolean computeIsConstant(IEnv env)
- Description copied from class: ExpressionNode
- Compute whether this expression is a constant (nodes should not call
this method directly). Called by the isConstant method.
- Overrides:
- computeIsConstant in class ExpressionNode
- Tags copied from class: ExpressionNode
- Parameters:
env - environment of name bindings, etc.- Throws:
- VerifyingException - if expression is illegal.
- See Also:
ExpressionNode.isConstant(edu.mit.ai.psg.jevaES.IEnv),
EvalMethods.isConstant(IExpressionNode, IEnv)
eval
public Object eval(IEnv env)
throws ThrowException
- Description copied from class: ExpressionNode
- Evaluate this expression (nodes should not call this method
directly). Called by the getValue method.
- Overrides:
- eval in class ExpressionNode
- Tags copied from class: ExpressionNode
- Parameters:
env - environment of name bindings, etc.- Throws:
- ThrowException - if abruptly completed with an exception
- See Also:
ExpressionNode.getValue(edu.mit.ai.psg.jevaES.IEnv),
EvalMethods.eval(IExpressionNode, IEnv)
initConstructor
protected void initConstructor(IEnv env)
throws VerifyingException