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.TreeTraversal
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, LINE_SEPARATOR_KEY, NODE_BY_BEGIN_POSITION, PHANTOM_KEY, prettyPrinterNoCommentsConfiguration, PRINTER_KEY, 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, asLocalRecordDeclarationStmt, asReturnStmt, asSwitchStmt, asSynchronizedStmt, asThrowStmt, asTryStmt, asUnparsableStmt, asWhileStmt, asYieldStmt, ifAssertStmt, ifBlockStmt, ifBreakStmt, ifContinueStmt, ifDoStmt, ifEmptyStmt, ifExpressionStmt, ifForEachStmt, ifForStmt, ifIfStmt, ifLabeledStmt, ifLocalClassDeclarationStmt, ifLocalRecordDeclarationStmt, ifReturnStmt, ifSwitchStmt, ifSynchronizedStmt, ifThrowStmt, ifTryStmt, ifUnparsableStmt, ifWhileStmt, ifYieldStmt, isAssertStmt, isBlockStmt, isBreakStmt, isContinueStmt, isDoStmt, isEmptyStmt, isExpressionStmt, isForEachStmt, isForStmt, isIfStmt, isLabeledStmt, isLocalClassDeclarationStmt, isLocalRecordDeclarationStmt, isReturnStmt, isSwitchStmt, isSynchronizedStmt, isThrowStmt, isTryStmt, isUnparsableStmt, isWhileStmt, isYieldStmt, toAssertStmt, toBlockStmt, toBreakStmt, toContinueStmt, toDoStmt, toEmptyStmt, toExpressionStmt, toForEachStmt, toForStmt, toIfStmt, toLabeledStmt, toLocalClassDeclarationStmt, toLocalRecordDeclarationStmt, toReturnStmt, toSwitchStmt, toSynchronizedStmt, toThrowStmt, toTryStmt, toUnparsableStmt, toWhileStmt, toYieldStmt
addOrphanComment, containsData, createDefaultPrinter, createDefaultPrinter, customInitialization, equals, findAll, findAll, findAll, findByRange, findCompilationUnit, findData, findFirst, findFirst, findFirst, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getDataKeys, getDefaultPrinterConfiguration, getLineEndingStyle, getLineEndingStyleOrDefault, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getPrinter, getPrinter, getRange, getSymbolResolver, getTokenRange, hashCode, hasScope, isAncestorOf, isPhantom, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeData, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, stream, stream, toString, toString, tryAddImportToParentCompilationUnit, unregister, walk, walk, walk
finalize, getClass, notify, notifyAll, wait, wait, wait
isUsingDiamondOperator, removeTypeArguments, setDiamondOperator, setTypeArguments
addArgument, addArgument, getArgument, getArgumentPosition, getArgumentPosition, setArgument
findAncestor, findAncestor, findAncestor, hasParentNode, isDescendantOf
containsWithin, containsWithinRange, getBegin, getEnd, hasRange
public 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)
Visitable
accept
in interface Visitable
R
- 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)
Visitable
public 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>
<String, Integer>
.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 Statement
public boolean isExplicitConstructorInvocationStmt()
isExplicitConstructorInvocationStmt
in class Statement
public ExplicitConstructorInvocationStmt asExplicitConstructorInvocationStmt()
asExplicitConstructorInvocationStmt
in class Statement
public void ifExplicitConstructorInvocationStmt(Consumer<ExplicitConstructorInvocationStmt> action)
ifExplicitConstructorInvocationStmt
in class Statement
public 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 Statement
Copyright © 2007–2024. All rights reserved.