public final class ObjectCreationExpr extends Expression
new Object()
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE
Constructor and Description |
---|
ObjectCreationExpr() |
ObjectCreationExpr(Expression scope,
ClassOrInterfaceType type,
List<Expression> args)
Defines a call to a constructor.
|
ObjectCreationExpr(Range range,
Expression scope,
ClassOrInterfaceType type,
List<Type> typeArgs,
List<Expression> args,
List<BodyDeclaration<?>> anonymousBody) |
Modifier and Type | Method and Description |
---|---|
<R,A> R |
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support.
|
<A> void |
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support.
|
List<BodyDeclaration<?>> |
getAnonymousClassBody()
This can be null, to indicate there is no body
|
List<Expression> |
getArgs() |
Expression |
getScope() |
ClassOrInterfaceType |
getType() |
List<Type> |
getTypeArgs() |
void |
setAnonymousClassBody(List<BodyDeclaration<?>> anonymousClassBody) |
void |
setArgs(List<Expression> args) |
void |
setScope(Expression scope) |
void |
setType(ClassOrInterfaceType type) |
void |
setTypeArgs(List<Type> typeArgs) |
addOrphanComment, clone, contains, equals, getAllContainedComments, getBegin, getChildrenNodes, getComment, getData, getEnd, getNodesByType, getOrphanComments, getParentNode, getParentNodeOfType, getRange, hasComment, hashCode, isPositionedAfter, isPositionedBefore, setAsParentNodeOf, setAsParentNodeOf, setBegin, setBlockComment, setComment, setData, setEnd, setLineComment, setParentNode, setRange, toString, toStringWithoutComments, tryAddImportToParentCompilationUnit
public ObjectCreationExpr()
public ObjectCreationExpr(Expression scope, ClassOrInterfaceType type, List<Expression> args)
scope
- may be nulltype
- this is the class that the constructor is being called for.args
- Any arguments to pass to the constructorpublic ObjectCreationExpr(Range range, Expression scope, ClassOrInterfaceType type, List<Type> typeArgs, List<Expression> args, List<BodyDeclaration<?>> anonymousBody)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Node
public <A> void accept(VoidVisitor<A> v, A arg)
Node
public List<BodyDeclaration<?>> getAnonymousClassBody()
public List<Expression> getArgs()
public Expression getScope()
public ClassOrInterfaceType getType()
public void setAnonymousClassBody(List<BodyDeclaration<?>> anonymousClassBody)
public void setArgs(List<Expression> args)
public void setScope(Expression scope)
public void setType(ClassOrInterfaceType type)
Copyright © 2007–2016. All rights reserved.