public final class ConstructorDeclaration extends CallableDeclaration<ConstructorDeclaration> implements NodeWithBlockStmt<ConstructorDeclaration>, NodeWithAccessModifiers<ConstructorDeclaration>, NodeWithJavadoc<ConstructorDeclaration>, NodeWithDeclaration, NodeWithSimpleName<ConstructorDeclaration>, NodeWithParameters<ConstructorDeclaration>, NodeWithThrownExceptions<ConstructorDeclaration>, NodeWithTypeParameters<ConstructorDeclaration>
class X { X() { } } where X(){} is the constructor declaration.CallableDeclaration.SignatureNode.ObserverRegistrationMode, Node.ParsednessABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration| Constructor and Description |
|---|
ConstructorDeclaration() |
ConstructorDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
SimpleName name,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
BlockStmt body) |
ConstructorDeclaration(EnumSet<Modifier> modifiers,
String name) |
ConstructorDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
SimpleName name,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
BlockStmt body)
This constructor is used by the parser and is considered private.
|
appendThrowsIfRequested, getDeclarationAsString, getDeclarationAsString, getModifiers, getName, getParameters, getSignature, getThrownExceptions, getTypeParametersgetAnnotations, setAnnotationsaddOrphanComment, 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, unregisterfinalize, getClass, notify, notifyAll, wait, wait, waitcreateBodyisPublic, setPublicisPrivate, setPrivateisProtected, setProtectedaddModifier, getModifiers, removeModifier, setModifiergetComment, getJavadoc, getJavadocComment, hasJavaDocComment, removeJavaDocComment, setComment, setJavadocComment, setJavadocComment, setJavadocCommentgetDeclarationAsString, getDeclarationAsStringgetName, getNameAsString, setNameaddAndGetParameter, addAndGetParameter, addAndGetParameter, addAndGetParameter, addParameter, addParameter, addParameter, addParameter, getParameter, getParameterByName, getParameterByType, getParameterByType, getParameters, hasParametersOfType, hasParametersOfType, setParameter, tryAddImportToParentCompilationUnitaddThrownException, addThrownException, getThrownException, getThrownExceptions, isThrown, isThrown, tryAddImportToParentCompilationUnitaddTypeParameter, getTypeParameter, getTypeParameters, isGeneric, setTypeParameterisAbstract, setAbstractisStatic, setStaticisFinal, setFinalisStrictfp, setStrictfpaddAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnitgetAncestorOfTypecontainsWithin, getBegin, getEnd, isPositionedAfter, isPositionedBeforepublic ConstructorDeclaration()
public ConstructorDeclaration(EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, NodeList<TypeParameter> typeParameters, SimpleName name, NodeList<Parameter> parameters, NodeList<ReferenceType> thrownExceptions, BlockStmt body)
@Generated(value="com.github.javaparser.generator.core.node.MainConstructorGenerator") public ConstructorDeclaration(TokenRange tokenRange, EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, NodeList<TypeParameter> typeParameters, SimpleName name, NodeList<Parameter> parameters, NodeList<ReferenceType> thrownExceptions, BlockStmt body)
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)
Visitable@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public BlockStmt getBody()
getBody in interface NodeWithBlockStmt<ConstructorDeclaration>@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public ConstructorDeclaration setBody(BlockStmt body)
setBody in interface NodeWithBlockStmt<ConstructorDeclaration>body - the body, can not be nullpublic ConstructorDeclaration setModifiers(EnumSet<Modifier> modifiers)
setModifiers in interface NodeWithModifiers<ConstructorDeclaration>setModifiers in class CallableDeclaration<ConstructorDeclaration>public ConstructorDeclaration setName(SimpleName name)
setName in interface NodeWithSimpleName<ConstructorDeclaration>setName in class CallableDeclaration<ConstructorDeclaration>public ConstructorDeclaration setParameters(NodeList<Parameter> parameters)
setParameters in interface NodeWithParameters<ConstructorDeclaration>setParameters in class CallableDeclaration<ConstructorDeclaration>public ConstructorDeclaration setThrownExceptions(NodeList<ReferenceType> thrownExceptions)
setThrownExceptions in interface NodeWithThrownExceptions<ConstructorDeclaration>setThrownExceptions in class CallableDeclaration<ConstructorDeclaration>public ConstructorDeclaration setTypeParameters(NodeList<TypeParameter> typeParameters)
setTypeParameters in interface NodeWithTypeParameters<ConstructorDeclaration>setTypeParameters in class CallableDeclaration<ConstructorDeclaration>public String getDeclarationAsString(boolean includingModifiers, boolean includingThrows, boolean includingParameterName)
[accessSpecifier] className ([paramType [paramName]]) [throws exceptionsList]
getDeclarationAsString in interface NodeWithDeclarationgetDeclarationAsString in class CallableDeclaration<ConstructorDeclaration>includingModifiers - flag to include the modifiers (if present) in the string producedincludingThrows - flag to include the throws clause (if present) in the string producedincludingParameterName - flag to include the parameter name (while the parameter type is always included) in
the string produced@Generated(value="com.github.javaparser.generator.core.node.GetNodeListsGenerator") public List<NodeList<?>> getNodeLists()
NodegetNodeLists in class CallableDeclaration<ConstructorDeclaration>@Generated(value="com.github.javaparser.generator.core.node.RemoveMethodGenerator") public boolean remove(Node node)
remove in class CallableDeclaration<ConstructorDeclaration>@Generated(value="com.github.javaparser.generator.core.node.CloneGenerator") public ConstructorDeclaration clone()
clone in class CallableDeclaration<ConstructorDeclaration>@Generated(value="com.github.javaparser.generator.core.node.GetMetaModelGenerator") public ConstructorDeclarationMetaModel getMetaModel()
getMetaModel in class CallableDeclaration<ConstructorDeclaration>@Generated(value="com.github.javaparser.generator.core.node.ReplaceMethodGenerator") public boolean replace(Node node, Node replacementNode)
replace in class CallableDeclaration<ConstructorDeclaration>Copyright © 2007–2017. All rights reserved.