|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Represents a new object creation expression. For example:
ArrayList list = new ArrayList(10);
| Method Summary | |
AstExpression[] |
getArguments()
Returns arguments to the constructor invocation. |
AstExpression |
getBase()
Returns the base expression if this object creation expression is qualified. |
AstType |
getClassBody()
Returns the anonymous class declaration. |
AstType |
getObjectType()
Returns the type of the object being created. |
AstDeclaration |
getReferencedElement()
Returns the constructor that is invoked by this expression. |
| Methods inherited from interface com.togethersoft.sca.ast.AstExpression |
getOperands, getRuntimeType, getType, isConstant |
| Methods inherited from interface com.togethersoft.sca.ast.AstObject |
addComment, getChildren, getComments, getCompilationUnit, getDeclaringMethod, getDeclaringType, getObjectKind, getPackage, getParent, getPosition, isDeleted, remove, replaceWith, replaceWith, setPosition, setPositionAfter, visitExpressions, visitStatements |
| Method Detail |
public AstExpression[] getArguments()
public AstExpression getBase()
null otherwise.
For the following example, getBase will return the expression
that corresponds to the selected fragment:
Inner inner = this.new Inner();
public AstType getClassBody()
null
if this expression does not declare an anonymous class.
For the following example, getClassBody will return
the class that corresponds to the selected fragment:
Observer o = new Observer() {
public void update(Observable o, Object arg) {}
};
public AstType getObjectType()
public AstDeclaration getReferencedElement()
null if the constructor is not found.getReferencedElement in interface AstReferenceAstMethod
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||