Class ASTConstructorDeclaration
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.AbstractNode
-
- net.sourceforge.pmd.lang.java.ast.AbstractJavaNode
-
- net.sourceforge.pmd.lang.java.ast.AbstractJavaAccessNode
-
- net.sourceforge.pmd.lang.java.ast.AbstractMethodLikeNode
-
- net.sourceforge.pmd.lang.java.ast.AbstractMethodOrConstructorDeclaration
-
- net.sourceforge.pmd.lang.java.ast.ASTConstructorDeclaration
-
- All Implemented Interfaces:
net.sourceforge.pmd.lang.ast.Node
,net.sourceforge.pmd.lang.ast.QualifiableNode
,net.sourceforge.pmd.lang.ast.SignedNode<ASTMethodOrConstructorDeclaration>
,AccessNode
,Annotatable
,ASTMethodOrConstructorDeclaration
,JavaNode
,JavaQualifiableNode
,MethodLikeNode
,net.sourceforge.pmd.lang.symboltable.ScopedNode
public class ASTConstructorDeclaration extends AbstractMethodOrConstructorDeclaration
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.sourceforge.pmd.lang.java.ast.MethodLikeNode
MethodLikeNode.MethodLikeKind
-
-
Field Summary
-
Fields inherited from class net.sourceforge.pmd.lang.java.ast.AbstractJavaNode
parser
-
-
Constructor Summary
Constructors Constructor Description ASTConstructorDeclaration(int id)
ASTConstructorDeclaration(JavaParser p, int id)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsComment()
ASTAnnotation
getAnnotation(java.lang.String annotQualifiedName)
Get specific annotaion on this node.java.util.List<ASTAnnotation>
getDeclaredAnnotations()
Get all annotations present on this node.ASTFormalParameters
getFormalParameters()
MethodLikeNode.MethodLikeKind
getKind()
Returns a token indicating whether this node is a lambda expression or a method or constructor declaration.int
getParameterCount()
ASTFormalParameters
getParameters()
Deprecated.to be removed with PMD 7.0.0 - use getFormalParameters() insteadboolean
isAnnotationPresent(java.lang.String annotQualifiedName)
Checks whether the annotation is present on this node.boolean
isAnyAnnotationPresent(java.util.Collection<java.lang.String> annotQualifiedNames)
Checks whether any annotation is present on this node.java.lang.Object
jjtAccept(JavaParserVisitor visitor, java.lang.Object data)
Accept the visitorvoid
setContainsComment()
-
Methods inherited from class net.sourceforge.pmd.lang.java.ast.AbstractMethodOrConstructorDeclaration
getSignature
-
Methods inherited from class net.sourceforge.pmd.lang.java.ast.AbstractMethodLikeNode
getQualifiedName, setQualifiedName
-
Methods inherited from class net.sourceforge.pmd.lang.java.ast.AbstractJavaAccessNode
getModifiers, isAbstract, isDefault, isFinal, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, setAbstract, setDefault, setFinal, setModifiers, setNative, setPrivate, setProtected, setPublic, setStatic, setStrictfp, setSynchronized, setTransient, setVolatile
-
Methods inherited from class net.sourceforge.pmd.lang.java.ast.AbstractJavaNode
childrenAccept, comment, comment, getScope, getXPathNodeName, jjtClose, jjtOpen, setScope
-
Methods inherited from class net.sourceforge.pmd.lang.ast.AbstractNode
appendElement, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getImage, getNthParent, getParentsOfType, getUserData, getXPathAttributesIterator, hasDecendantOfAnyType, hasDescendantMatchingXPath, hasDescendantOfAnyType, hasDescendantOfType, hasImageEqualTo, isFindBoundary, isSingleLine, jjtAddChild, jjtGetChild, jjtGetChildIndex, jjtGetFirstToken, jjtGetId, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtSetChildIndex, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData, testingOnlySetBeginColumn, testingOnlySetBeginLine, testingOnlySetEndColumn, testingOnlySetEndLine, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.lang.java.ast.AccessNode
getModifiers, isAbstract, isDefault, isFinal, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, setAbstract, setDefault, setFinal, setModifiers, setNative, setPrivate, setProtected, setPublic, setStatic, setStrictfp, setSynchronized, setTransient, setVolatile
-
Methods inherited from interface net.sourceforge.pmd.lang.java.ast.JavaNode
childrenAccept, getScope, setScope
-
Methods inherited from interface net.sourceforge.pmd.lang.java.ast.MethodLikeNode
getQualifiedName
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.Node
findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getImage, getNthParent, getParentsOfType, getUserData, getXPathAttributesIterator, getXPathNodeName, hasDescendantMatchingXPath, hasDescendantOfType, hasImageEqualTo, isFindBoundary, jjtAddChild, jjtClose, jjtGetChild, jjtGetChildIndex, jjtGetId, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetChildIndex, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData
-
-
-
-
Constructor Detail
-
ASTConstructorDeclaration
public ASTConstructorDeclaration(int id)
-
ASTConstructorDeclaration
public ASTConstructorDeclaration(JavaParser p, int id)
-
-
Method Detail
-
getKind
public MethodLikeNode.MethodLikeKind getKind()
Description copied from interface:MethodLikeNode
Returns a token indicating whether this node is a lambda expression or a method or constructor declaration. Can be used to downcast safely to a subinterface or an implementing class.- Returns:
- The kind of method-like
-
jjtAccept
public java.lang.Object jjtAccept(JavaParserVisitor visitor, java.lang.Object data)
Accept the visitor. *- Specified by:
jjtAccept
in interfaceJavaNode
- Overrides:
jjtAccept
in classAbstractJavaNode
-
containsComment
public boolean containsComment()
-
setContainsComment
public void setContainsComment()
-
getParameters
@Deprecated public ASTFormalParameters getParameters()
Deprecated.to be removed with PMD 7.0.0 - use getFormalParameters() instead
-
getParameterCount
public int getParameterCount()
-
getFormalParameters
public ASTFormalParameters getFormalParameters()
-
getDeclaredAnnotations
public java.util.List<ASTAnnotation> getDeclaredAnnotations()
Description copied from interface:Annotatable
Get all annotations present on this node.- Specified by:
getDeclaredAnnotations
in interfaceAnnotatable
- Returns:
- all annotations present on this node.
-
getAnnotation
public ASTAnnotation getAnnotation(java.lang.String annotQualifiedName)
Description copied from interface:Annotatable
Get specific annotaion on this node.- Specified by:
getAnnotation
in interfaceAnnotatable
- Parameters:
annotQualifiedName
- qulified name of the annotation.- Returns:
ASTAnnotaion
node if the annotation is present on this node, elsenull
-
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.String annotQualifiedName)
Description copied from interface:Annotatable
Checks whether the annotation is present on this node.- Specified by:
isAnnotationPresent
in interfaceAnnotatable
- Parameters:
annotQualifiedName
- qulified name of the annotation.- Returns:
true
if the annotation is present on this node, elsefalse
-
isAnyAnnotationPresent
public boolean isAnyAnnotationPresent(java.util.Collection<java.lang.String> annotQualifiedNames)
Description copied from interface:Annotatable
Checks whether any annotation is present on this node.- Specified by:
isAnyAnnotationPresent
in interfaceAnnotatable
- Parameters:
annotQualifiedNames
- collection that cotains qulified name of annotations.- Returns:
true
if any annotation is present on this node, elsefalse
-
-