public final class ConstructorDeclaration extends BodyDeclaration<ConstructorDeclaration> implements NodeWithJavaDoc<ConstructorDeclaration>, NodeWithDeclaration, NodeWithSimpleName<ConstructorDeclaration>, NodeWithModifiers<ConstructorDeclaration>, NodeWithParameters<ConstructorDeclaration>, NodeWithThrownExceptions<ConstructorDeclaration>, NodeWithBlockStmt<ConstructorDeclaration>, NodeWithTypeParameters<ConstructorDeclaration>
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 block) |
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 block) |
| Modifier and Type | Method and Description |
|---|---|
<R,A> R |
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support.
|
<A> void |
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support.
|
BlockStmt |
getBody() |
String |
getDeclarationAsString()
As
NodeWithDeclaration.getDeclarationAsString(boolean, boolean, boolean) including
the modifiers, the throws clause and the parameters with both type and name. |
String |
getDeclarationAsString(boolean includingModifiers,
boolean includingThrows)
As
NodeWithDeclaration.getDeclarationAsString(boolean, boolean, boolean) including
the parameters with both type and name. |
String |
getDeclarationAsString(boolean includingModifiers,
boolean includingThrows,
boolean includingParameterName)
The declaration returned has this schema:
[accessSpecifier] className ([paramType [paramName]])
[throws exceptionsList]
|
JavadocComment |
getJavaDoc()
Gets the JavaDoc for this node.
|
EnumSet<Modifier> |
getModifiers()
Return the modifiers of this member declaration.
|
SimpleName |
getName() |
List<NodeList<?>> |
getNodeLists()
The list of NodeLists owned by this node.
|
NodeList<Parameter> |
getParameters() |
NodeList<ReferenceType<?>> |
getThrownExceptions() |
NodeList<TypeParameter> |
getTypeParameters() |
ConstructorDeclaration |
setBody(BlockStmt body) |
ConstructorDeclaration |
setModifiers(EnumSet<Modifier> modifiers) |
ConstructorDeclaration |
setName(SimpleName name) |
ConstructorDeclaration |
setParameters(NodeList<Parameter> parameters) |
ConstructorDeclaration |
setThrownExceptions(NodeList<ReferenceType<?>> thrownExceptions) |
ConstructorDeclaration |
setTypeParameters(NodeList<TypeParameter> typeParameters) |
getAnnotations, setAnnotationsaddOrphanComment, clone, containsWithin, equals, getAllContainedComments, getBegin, getChildNodes, getComment, getData, getEnd, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getRange, hasComment, hashCode, isPositionedAfter, isPositionedBefore, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setRange, toString, toString, tryAddImportToParentCompilationUnit, unregisterfinalize, getClass, notify, notifyAll, wait, wait, waitsetJavaDocCommentgetNameAsString, setNameaddModifier, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatileaddAndGetParameter, addAndGetParameter, addAndGetParameter, addAndGetParameter, addParameter, addParameter, addParameter, addParameter, getParamByName, getParamByType, getParamByType, getParameteraddThrownException, addThrownException, getThrownException, isThrown, isThrowncreateBodygetTypeParameter, isGenericaddAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresentgetAncestorOfType, setAsParentNodeOf, setAsParentNodeOfpublic ConstructorDeclaration()
public ConstructorDeclaration(EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, NodeList<TypeParameter> typeParameters, SimpleName name, NodeList<Parameter> parameters, NodeList<ReferenceType<?>> thrownExceptions, BlockStmt block)
public ConstructorDeclaration(Range range, EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, NodeList<TypeParameter> typeParameters, SimpleName name, NodeList<Parameter> parameters, NodeList<ReferenceType<?>> thrownExceptions, BlockStmt block)
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 EnumSet<Modifier> getModifiers()
getModifiers in interface NodeWithModifiers<ConstructorDeclaration>Modifierpublic SimpleName getName()
getName in interface NodeWithSimpleName<ConstructorDeclaration>public NodeList<Parameter> getParameters()
getParameters in interface NodeWithParameters<ConstructorDeclaration>public NodeList<ReferenceType<?>> getThrownExceptions()
getThrownExceptions in interface NodeWithThrownExceptions<ConstructorDeclaration>public NodeList<TypeParameter> getTypeParameters()
getTypeParameters in interface NodeWithTypeParameters<ConstructorDeclaration>public ConstructorDeclaration setModifiers(EnumSet<Modifier> modifiers)
setModifiers in interface NodeWithModifiers<ConstructorDeclaration>public ConstructorDeclaration setName(SimpleName name)
setName in interface NodeWithSimpleName<ConstructorDeclaration>public ConstructorDeclaration setParameters(NodeList<Parameter> parameters)
setParameters in interface NodeWithParameters<ConstructorDeclaration>public ConstructorDeclaration setThrownExceptions(NodeList<ReferenceType<?>> thrownExceptions)
setThrownExceptions in interface NodeWithThrownExceptions<ConstructorDeclaration>public ConstructorDeclaration setTypeParameters(NodeList<TypeParameter> typeParameters)
setTypeParameters in interface NodeWithTypeParameters<ConstructorDeclaration>public String getDeclarationAsString(boolean includingModifiers, boolean includingThrows, boolean includingParameterName)
getDeclarationAsString in interface NodeWithDeclarationincludingModifiers - 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 String getDeclarationAsString(boolean includingModifiers, boolean includingThrows)
NodeWithDeclarationNodeWithDeclaration.getDeclarationAsString(boolean, boolean, boolean) including
the parameters with both type and name.getDeclarationAsString in interface NodeWithDeclarationincludingModifiers - flag to include the modifiers (if present) in the string producedincludingThrows - flag to include the throws clause (if present) in the string producedpublic String getDeclarationAsString()
NodeWithDeclarationNodeWithDeclaration.getDeclarationAsString(boolean, boolean, boolean) including
the modifiers, the throws clause and the parameters with both type and name.getDeclarationAsString in interface NodeWithDeclarationpublic JavadocComment getJavaDoc()
NodeWithJavaDocgetJavaDoc in interface NodeWithJavaDoc<ConstructorDeclaration>public BlockStmt getBody()
getBody in interface NodeWithBlockStmt<ConstructorDeclaration>public ConstructorDeclaration setBody(BlockStmt body)
setBody in interface NodeWithBlockStmt<ConstructorDeclaration>public List<NodeList<?>> getNodeLists()
NodegetNodeLists in class BodyDeclaration<ConstructorDeclaration>Copyright © 2007–2016. All rights reserved.