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.Node.ObserverRegistrationModeABSOLUTE_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(Range range,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
SimpleName name,
NodeList<Parameter> parameters,
NodeList<ReferenceType<?>> thrownExceptions,
BlockStmt body) |
appendThrowsIfRequested, getDeclarationAsString, getDeclarationAsString, getModifiers, getName, getParameters, getThrownExceptions, getTypeParametersgetAnnotations, setAnnotationsaddOrphanComment, equals, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getRange, hasComment, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeOrphanComment, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setRange, 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, setParameteraddThrownException, addThrownException, getThrownException, getThrownExceptions, isThrown, isThrown, tryAddImportToParentCompilationUnitaddTypeParameter, getTypeParameter, getTypeParameters, isGeneric, setTypeParameteraddAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotationgetAncestorOfType, setAsParentNodeOf, setAsParentNodeOfcontainsWithin, 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)
public ConstructorDeclaration(Range range, 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)
Visitablepublic BlockStmt getBody()
getBody in interface NodeWithBlockStmt<ConstructorDeclaration>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 producedpublic List<NodeList<?>> getNodeLists()
NodegetNodeLists in class CallableDeclaration<ConstructorDeclaration>public boolean remove(Node node)
remove in class CallableDeclaration<ConstructorDeclaration>public ConstructorDeclaration clone()
clone in class CallableDeclaration<ConstructorDeclaration>public ConstructorDeclarationMetaModel getMetaModel()
getMetaModel in class CallableDeclaration<ConstructorDeclaration>Copyright © 2007–2017. All rights reserved.