Package com.github.javaparser.ast.stmt
Class ExplicitConstructorInvocationStmt
- java.lang.Object
-
- com.github.javaparser.ast.Node
-
- com.github.javaparser.ast.stmt.Statement
-
- com.github.javaparser.ast.stmt.ExplicitConstructorInvocationStmt
-
- All Implemented Interfaces:
NodeWithRange<Node>
,NodeWithTokenRange<Node>
,NodeWithTypeArguments<ExplicitConstructorInvocationStmt>
,Observable
,Visitable
,HasParentNode<Node>
,Cloneable
public final class ExplicitConstructorInvocationStmt extends Statement implements NodeWithTypeArguments<ExplicitConstructorInvocationStmt>
A call to super or this in a constructor or initializer.class X { X() { super(15); } }
class X { X() { this(1, 2); } }
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.javaparser.ast.Node
Node.ObserverRegistrationMode, Node.Parsedness
-
-
Field Summary
-
Fields inherited from class com.github.javaparser.ast.Node
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
-
Methods inherited from class com.github.javaparser.ast.Node
addOrphanComment, customInitialization, equals, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getTokenRange, hasComment, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, toString, toString, tryAddImportToParentCompilationUnit, unregister
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.HasParentNode
getAncestorOfType
-
Methods inherited from interface com.github.javaparser.ast.nodeTypes.NodeWithRange
containsWithin, getBegin, getEnd, isPositionedAfter, isPositionedBefore
-
Methods inherited from interface com.github.javaparser.ast.nodeTypes.NodeWithTypeArguments
isUsingDiamondOperator, removeTypeArguments, setDiamondOperator, setTypeArguments
-
-
-
-
Constructor Detail
-
ExplicitConstructorInvocationStmt
public ExplicitConstructorInvocationStmt()
-
ExplicitConstructorInvocationStmt
public ExplicitConstructorInvocationStmt(boolean isThis, Expression expression, NodeList<Expression> arguments)
-
ExplicitConstructorInvocationStmt
public ExplicitConstructorInvocationStmt(NodeList<Type> typeArguments, boolean isThis, Expression expression, NodeList<Expression> arguments)
-
ExplicitConstructorInvocationStmt
@Generated("com.github.javaparser.generator.core.node.MainConstructorGenerator") public ExplicitConstructorInvocationStmt(TokenRange tokenRange, NodeList<Type> typeArguments, boolean isThis, Expression expression, NodeList<Expression> arguments)
This constructor is used by the parser and is considered private.
-
-
Method Detail
-
accept
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Description copied from interface:Visitable
Accept method for visitor support.- Specified by:
accept
in interfaceVisitable
- Type Parameters:
R
- the type of the return value of the visitorA
- the type the user argument passed to the visitor- Parameters:
v
- the visitor implementationarg
- the argument passed to the visitor (of type A)- Returns:
- the result of the visit (of type R)
-
accept
public <A> void accept(VoidVisitor<A> v, A arg)
Description copied from interface:Visitable
Accept method for visitor support.
-
getArguments
@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public NodeList<Expression> getArguments()
-
getArgument
public Expression getArgument(int i)
-
setArgument
public ExplicitConstructorInvocationStmt setArgument(int i, Expression argument)
-
addArgument
public ExplicitConstructorInvocationStmt addArgument(Expression argument)
-
getExpression
@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public Optional<Expression> getExpression()
-
isThis
@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public boolean isThis()
-
setArguments
@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public ExplicitConstructorInvocationStmt setArguments(NodeList<Expression> arguments)
-
setExpression
@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public ExplicitConstructorInvocationStmt setExpression(Expression expression)
Sets the expression- Parameters:
expression
- the expression, can be null- Returns:
- this, the ExplicitConstructorInvocationStmt
-
setThis
@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public ExplicitConstructorInvocationStmt setThis(boolean isThis)
-
getTypeArguments
@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public Optional<NodeList<Type>> getTypeArguments()
- Specified by:
getTypeArguments
in interfaceNodeWithTypeArguments<ExplicitConstructorInvocationStmt>
- Returns:
- the types that can be found in the type arguments: <String, Integer>.
-
setTypeArguments
@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public ExplicitConstructorInvocationStmt setTypeArguments(NodeList<Type> typeArguments)
Sets the typeArguments- Specified by:
setTypeArguments
in interfaceNodeWithTypeArguments<ExplicitConstructorInvocationStmt>
- Parameters:
typeArguments
- the typeArguments, can be null- Returns:
- this, the ExplicitConstructorInvocationStmt
-
getNodeLists
@Generated("com.github.javaparser.generator.core.node.GetNodeListsGenerator") public List<NodeList<?>> getNodeLists()
Description copied from class:Node
The list of NodeLists owned by this node.- Overrides:
getNodeLists
in classNode
-
remove
@Generated("com.github.javaparser.generator.core.node.RemoveMethodGenerator") public boolean remove(Node node)
-
removeExpression
@Generated("com.github.javaparser.generator.core.node.RemoveMethodGenerator") public ExplicitConstructorInvocationStmt removeExpression()
-
clone
@Generated("com.github.javaparser.generator.core.node.CloneGenerator") public ExplicitConstructorInvocationStmt clone()
-
getMetaModel
@Generated("com.github.javaparser.generator.core.node.GetMetaModelGenerator") public ExplicitConstructorInvocationStmtMetaModel getMetaModel()
- Overrides:
getMetaModel
in classStatement
- Returns:
- get JavaParser specific node introspection information.
-
replace
@Generated("com.github.javaparser.generator.core.node.ReplaceMethodGenerator") public boolean replace(Node node, Node replacementNode)
-
-