public final class ConstructorDeclaration extends BodyDeclaration implements DocumentableNode, WithDeclaration, NamedNode, NodeWithModifiers
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE
Constructor and Description |
---|
ConstructorDeclaration() |
ConstructorDeclaration(int beginLine,
int beginColumn,
int endLine,
int endColumn,
int modifiers,
List<AnnotationExpr> annotations,
List<TypeParameter> typeParameters,
String name,
List<Parameter> parameters,
List<ReferenceType> throws_,
BlockStmt block)
Deprecated.
prefer using Range objects.
|
ConstructorDeclaration(int modifiers,
List<AnnotationExpr> annotations,
List<TypeParameter> typeParameters,
String name,
List<Parameter> parameters,
List<ReferenceType> throws_,
BlockStmt block) |
ConstructorDeclaration(int modifiers,
String name) |
ConstructorDeclaration(Range range,
int modifiers,
List<AnnotationExpr> annotations,
List<TypeParameter> typeParameters,
String name,
List<Parameter> parameters,
List<ReferenceType> throws_,
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 |
getBlock() |
String |
getDeclarationAsString()
As
WithDeclaration.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
WithDeclaration.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.
|
int |
getModifiers()
Return the modifiers of this member declaration.
|
String |
getName() |
NameExpr |
getNameExpr() |
List<Parameter> |
getParameters() |
List<ReferenceType> |
getThrows() |
List<TypeParameter> |
getTypeParameters() |
void |
setBlock(BlockStmt block) |
void |
setModifiers(int modifiers) |
void |
setName(String name) |
void |
setNameExpr(NameExpr name) |
void |
setParameters(List<Parameter> parameters) |
void |
setThrows(List<ReferenceType> throws_) |
void |
setTypeParameters(List<TypeParameter> typeParameters) |
getAnnotations, setAnnotations
addOrphanComment, clone, contains, equals, getAllContainedComments, getBegin, getBeginColumn, getBeginLine, getChildrenNodes, getComment, getData, getEnd, getEndColumn, getEndLine, getOrphanComments, getParentNode, getRange, hasComment, hashCode, isPositionedAfter, isPositionedAfter, isPositionedBefore, isPositionedBefore, setAsParentNodeOf, setAsParentNodeOf, setBegin, setBeginColumn, setBeginLine, setComment, setData, setEnd, setEndColumn, setEndLine, setParentNode, setRange, toString, toStringWithoutComments
public ConstructorDeclaration()
public ConstructorDeclaration(int modifiers, String name)
public ConstructorDeclaration(int modifiers, List<AnnotationExpr> annotations, List<TypeParameter> typeParameters, String name, List<Parameter> parameters, List<ReferenceType> throws_, BlockStmt block)
@Deprecated public ConstructorDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, int modifiers, List<AnnotationExpr> annotations, List<TypeParameter> typeParameters, String name, List<Parameter> parameters, List<ReferenceType> throws_, BlockStmt block)
public ConstructorDeclaration(Range range, int modifiers, List<AnnotationExpr> annotations, List<TypeParameter> typeParameters, String name, List<Parameter> parameters, List<ReferenceType> throws_, BlockStmt block)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Node
public <A> void accept(VoidVisitor<A> v, A arg)
Node
public BlockStmt getBlock()
public int getModifiers()
getModifiers
in interface NodeWithModifiers
ModifierSet
public NameExpr getNameExpr()
public List<ReferenceType> getThrows()
public List<TypeParameter> getTypeParameters()
public void setBlock(BlockStmt block)
public void setModifiers(int modifiers)
public void setName(String name)
public void setNameExpr(NameExpr name)
public void setThrows(List<ReferenceType> throws_)
public void setTypeParameters(List<TypeParameter> typeParameters)
public String getDeclarationAsString(boolean includingModifiers, boolean includingThrows, boolean includingParameterName)
getDeclarationAsString
in interface WithDeclaration
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 String getDeclarationAsString(boolean includingModifiers, boolean includingThrows)
WithDeclaration
WithDeclaration.getDeclarationAsString(boolean, boolean, boolean)
including
the parameters with both type and name.getDeclarationAsString
in interface WithDeclaration
includingModifiers
- 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()
WithDeclaration
WithDeclaration.getDeclarationAsString(boolean, boolean, boolean)
including
the modifiers, the throws clause and the parameters with both type and name.getDeclarationAsString
in interface WithDeclaration
public JavadocComment getJavaDoc()
DocumentableNode
getJavaDoc
in interface DocumentableNode
Copyright © 2007–2016. All rights reserved.