public class ExplicitConstructorInvocationStmt extends Statement implements NodeWithTypeArguments<ExplicitConstructorInvocationStmt>, NodeWithArguments<ExplicitConstructorInvocationStmt>, Resolvable<ResolvedConstructorDeclaration>
class X { X() { super(15); } }
class X { X() { this(1, 2); } }Node.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversalABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration, SYMBOL_RESOLVER_KEY| Constructor and Description |
|---|
ExplicitConstructorInvocationStmt() |
ExplicitConstructorInvocationStmt(boolean isThis,
Expression expression,
NodeList<Expression> arguments) |
ExplicitConstructorInvocationStmt(NodeList<Type> typeArguments,
boolean isThis,
Expression expression,
NodeList<Expression> arguments) |
ExplicitConstructorInvocationStmt(TokenRange tokenRange,
NodeList<Type> typeArguments,
boolean isThis,
Expression expression,
NodeList<Expression> arguments)
This constructor is used by the parser and is considered private.
|
asAssertStmt, asBlockStmt, asBreakStmt, asContinueStmt, asDoStmt, asEmptyStmt, asExpressionStmt, asForEachStmt, asForStmt, asIfStmt, asLabeledStmt, asLocalClassDeclarationStmt, asReturnStmt, asSwitchStmt, asSynchronizedStmt, asThrowStmt, asTryStmt, asUnparsableStmt, asWhileStmt, asYieldStmt, ifAssertStmt, ifBlockStmt, ifBreakStmt, ifContinueStmt, ifDoStmt, ifEmptyStmt, ifExpressionStmt, ifForEachStmt, ifForStmt, ifIfStmt, ifLabeledStmt, ifLocalClassDeclarationStmt, ifReturnStmt, ifSwitchStmt, ifSynchronizedStmt, ifThrowStmt, ifTryStmt, ifUnparsableStmt, ifWhileStmt, ifYieldStmt, isAssertStmt, isBlockStmt, isBreakStmt, isContinueStmt, isDoStmt, isEmptyStmt, isExpressionStmt, isForEachStmt, isForStmt, isIfStmt, isLabeledStmt, isLocalClassDeclarationStmt, isReturnStmt, isSwitchStmt, isSynchronizedStmt, isThrowStmt, isTryStmt, isUnparsableStmt, isWhileStmt, isYieldStmt, toAssertStmt, toBlockStmt, toBreakStmt, toContinueStmt, toDoStmt, toEmptyStmt, toExpressionStmt, toForEachStmt, toForStmt, toIfStmt, toLabeledStmt, toLocalClassDeclarationStmt, toReturnStmt, toSwitchStmt, toSynchronizedStmt, toThrowStmt, toTryStmt, toUnparsableStmt, toWhileStmt, toYieldStmtaddOrphanComment, containsData, customInitialization, equals, findAll, findAll, findCompilationUnit, findFirst, findFirst, findFirst, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getDataKeys, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getSymbolResolver, getTokenRange, getToStringPrettyPrinterConfiguration, hashCode, isAncestorOf, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeData, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, setToStringPrettyPrinterConfiguration, stream, stream, toString, toString, tryAddImportToParentCompilationUnit, unregister, walk, walk, walkfinalize, getClass, notify, notifyAll, wait, wait, waitisUsingDiamondOperator, removeTypeArguments, setDiamondOperator, setTypeArgumentsaddArgument, addArgument, getArgument, setArgumentfindAncestor, findAncestor, isDescendantOfcontainsWithin, containsWithinRange, getBegin, getEndpublic ExplicitConstructorInvocationStmt()
public ExplicitConstructorInvocationStmt(boolean isThis,
Expression expression,
NodeList<Expression> arguments)
public ExplicitConstructorInvocationStmt(NodeList<Type> typeArguments, boolean isThis, Expression expression, NodeList<Expression> arguments)
public ExplicitConstructorInvocationStmt(TokenRange tokenRange, NodeList<Type> typeArguments, boolean isThis, Expression expression, NodeList<Expression> arguments)
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 NodeList<Expression> getArguments()
getArguments in interface NodeWithArguments<ExplicitConstructorInvocationStmt>public Optional<Expression> getExpression()
public boolean isThis()
public ExplicitConstructorInvocationStmt setArguments(NodeList<Expression> arguments)
setArguments in interface NodeWithArguments<ExplicitConstructorInvocationStmt>public ExplicitConstructorInvocationStmt setExpression(Expression expression)
expression - the expression, can be nullpublic ExplicitConstructorInvocationStmt setThis(boolean isThis)
public Optional<NodeList<Type>> getTypeArguments()
getTypeArguments in interface NodeWithTypeArguments<ExplicitConstructorInvocationStmt>public ExplicitConstructorInvocationStmt setTypeArguments(NodeList<Type> typeArguments)
setTypeArguments in interface NodeWithTypeArguments<ExplicitConstructorInvocationStmt>typeArguments - the typeArguments, can be nullpublic ExplicitConstructorInvocationStmt removeExpression()
public ExplicitConstructorInvocationStmt clone()
public ExplicitConstructorInvocationStmtMetaModel getMetaModel()
getMetaModel in class Statementpublic boolean isExplicitConstructorInvocationStmt()
isExplicitConstructorInvocationStmt in class Statementpublic ExplicitConstructorInvocationStmt asExplicitConstructorInvocationStmt()
asExplicitConstructorInvocationStmt in class Statementpublic void ifExplicitConstructorInvocationStmt(Consumer<ExplicitConstructorInvocationStmt> action)
ifExplicitConstructorInvocationStmt in class Statementpublic ResolvedConstructorDeclaration resolve()
ResolvedConstructorDeclaration representing the declaration of the constructor invoked by this
ExplicitConstructorInvocationStmt is returned. Otherwise, an UnsolvedSymbolException is thrown.resolve in interface Resolvable<ResolvedConstructorDeclaration>ResolvedConstructorDeclaration representing the declaration of the invoked constructor.UnsolvedSymbolException - if the declaration corresponding to the explicit constructor invocation statement
could not be resolved.NameExpr.resolve(),
FieldAccessExpr.resolve(),
MethodCallExpr.resolve(),
ObjectCreationExpr.resolve()public Optional<ExplicitConstructorInvocationStmt> toExplicitConstructorInvocationStmt()
toExplicitConstructorInvocationStmt in class StatementCopyright © 2007–2019. All rights reserved.