public final class ObjectCreationExpr extends Expression implements NodeWithTypeArguments<ObjectCreationExpr>, NodeWithType<ObjectCreationExpr,ClassOrInterfaceType>, NodeWithArguments<ObjectCreationExpr>, NodeWithOptionalScope<ObjectCreationExpr>
new HashMap.Entry(15) {public String getKey() {return null;}};
HashMap is the scope, Entry is the type, String and Long are type arguments, 15 is an argument, and everything in { }
is the anonymous class body.Node.ObserverRegistrationModeABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration| Constructor and Description |
|---|
ObjectCreationExpr() |
ObjectCreationExpr(Expression scope,
ClassOrInterfaceType type,
NodeList<Expression> arguments)
Defines a call to a constructor.
|
ObjectCreationExpr(Expression scope,
ClassOrInterfaceType type,
NodeList<Type> typeArguments,
NodeList<Expression> arguments,
NodeList<BodyDeclaration<?>> anonymousClassBody) |
ObjectCreationExpr(Range range,
Expression scope,
ClassOrInterfaceType type,
NodeList<Type> typeArguments,
NodeList<Expression> arguments,
NodeList<BodyDeclaration<?>> anonymousClassBody) |
addOrphanComment, containsWithin, equals, getAllContainedComments, getBegin, getChildNodes, getComment, getData, getEnd, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getRange, hasComment, hashCode, isPositionedAfter, isPositionedBefore, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeOrphanComment, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setRange, toString, toString, tryAddImportToParentCompilationUnit, unregisterfinalize, getClass, notify, notifyAll, wait, wait, waitisUsingDiamondOperator, removeTypeArguments, setDiamondOperator, setTypeArgumentssetType, setType, tryAddImportToParentCompilationUnitaddArgument, addArgument, getArgument, setArgumentgetAncestorOfType, setAsParentNodeOf, setAsParentNodeOfpublic ObjectCreationExpr()
public ObjectCreationExpr(Expression scope, ClassOrInterfaceType type, NodeList<Expression> arguments)
scope - may be nulltype - this is the class that the constructor is being called for.arguments - Any arguments to pass to the constructorpublic ObjectCreationExpr(Expression scope, ClassOrInterfaceType type, NodeList<Type> typeArguments, NodeList<Expression> arguments, NodeList<BodyDeclaration<?>> anonymousClassBody)
public ObjectCreationExpr(Range range, Expression scope, ClassOrInterfaceType type, NodeList<Type> typeArguments, NodeList<Expression> arguments, NodeList<BodyDeclaration<?>> anonymousClassBody)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitableaccept in interface VisitableR - the type of the return value of the visitorA - the type the user argument passed to the visitorv - the visitor implementationarg - the argument passed to the visitor (of type A)public <A> void accept(VoidVisitor<A> v, A arg)
Visitablepublic Optional<NodeList<BodyDeclaration<?>>> getAnonymousClassBody()
public void addAnonymousClassBody(BodyDeclaration<?> body)
public NodeList<Expression> getArguments()
getArguments in interface NodeWithArguments<ObjectCreationExpr>public Optional<Expression> getScope()
getScope in interface NodeWithOptionalScope<ObjectCreationExpr>public ClassOrInterfaceType getType()
NodeWithTypegetType in interface NodeWithType<ObjectCreationExpr,ClassOrInterfaceType>public ObjectCreationExpr setAnonymousClassBody(NodeList<BodyDeclaration<?>> anonymousClassBody)
anonymousClassBody - the anonymousClassBody, can be null or emptypublic ObjectCreationExpr setArguments(NodeList<Expression> arguments)
setArguments in interface NodeWithArguments<ObjectCreationExpr>public ObjectCreationExpr setScope(Expression scope)
setScope in interface NodeWithOptionalScope<ObjectCreationExpr>scope - the scope, can be nullpublic ObjectCreationExpr setType(ClassOrInterfaceType type)
NodeWithTypesetType in interface NodeWithType<ObjectCreationExpr,ClassOrInterfaceType>type - the typepublic Optional<NodeList<Type>> getTypeArguments()
getTypeArguments in interface NodeWithTypeArguments<ObjectCreationExpr>public ObjectCreationExpr setTypeArguments(NodeList<Type> typeArguments)
setTypeArguments in interface NodeWithTypeArguments<ObjectCreationExpr>typeArguments - the typeArguments, can be nullpublic List<NodeList<?>> getNodeLists()
NodegetNodeLists in class Nodepublic boolean remove(Node node)
remove in class Expressionpublic ObjectCreationExpr removeScope()
NodeWithOptionalScopeNodeWithOptionalScope.setScope(com.github.javaparser.ast.expr.Expression) with null.removeScope in interface NodeWithOptionalScope<ObjectCreationExpr>public ObjectCreationExpr clone()
clone in class Expressionpublic ObjectCreationExprMetaModel getMetaModel()
getMetaModel in class ExpressionCopyright © 2007–2017. All rights reserved.