net.sourceforge.pmd.lang.ast.Node, net.sourceforge.pmd.lang.ast.QualifiableNode, AccessNode, Annotatable, ASTAnyTypeDeclaration, JavaNode, JavaQualifiableNode, TypeNode, net.sourceforge.pmd.lang.symboltable.ScopedNodepublic class ASTClassOrInterfaceDeclaration extends AbstractAnyTypeDeclaration
ClassOrInterfaceDeclaration ::=
( "class" | "interface" )
<IDENTIFIER>
[ TypeParameters ]
[ ExtendsList ]
[ ImplementsList ]
ClassOrInterfaceBody
ASTAnyTypeDeclaration.TypeKindtypeDefinitionparser| Constructor | Description |
|---|---|
ASTClassOrInterfaceDeclaration(int id) |
|
ASTClassOrInterfaceDeclaration(JavaParser p,
int id) |
| Modifier and Type | Method | Description |
|---|---|---|
ASTAnnotation |
getAnnotation(java.lang.String annotQualifiedName) |
Get specific annotaion on this node.
|
java.util.List<ASTAnyTypeBodyDeclaration> |
getDeclarations() |
Retrieves the member declarations (fields, methods, classes, etc.) from the body of this type declaration.
|
java.util.List<ASTAnnotation> |
getDeclaredAnnotations() |
Get all annotations present on this node.
|
ASTClassOrInterfaceType |
getSuperClassTypeNode() |
Returns the superclass type node if this node is a class
declaration and explicitly declares an
extends
clause. |
java.util.List<ASTClassOrInterfaceType> |
getSuperInterfacesTypeNodes() |
Returns the interfaces implemented by this class, or
extended by this interface.
|
ASTAnyTypeDeclaration.TypeKind |
getTypeKind() |
Finds the type kind of this declaration.
|
boolean |
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.
|
boolean |
isFindBoundary() |
|
boolean |
isInterface() |
|
boolean |
isLocal() |
Returns true if the class is declared inside a block other
than the body of another class, or the top level.
|
java.lang.Object |
jjtAccept(JavaParserVisitor visitor,
java.lang.Object data) |
Accept the visitor.
|
void |
setInterface() |
getQualifiedName, isNested, setQualifiedNamegetModifiers, 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, setVolatilegetType, getTypeDefinition, setType, setTypeDefinitionchildrenAccept, comment, comment, getScope, getXPathNodeName, jjtClose, jjtOpen, setScopeappendElement, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getImage, getNthParent, getParentsOfType, getUserData, hasDecendantOfAnyType, hasDescendantMatchingXPath, hasDescendantOfAnyType, hasDescendantOfType, hasImageEqualTo, isSingleLine, jjtAddChild, jjtGetChild, jjtGetChildIndex, jjtGetFirstToken, jjtGetId, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtSetChildIndex, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData, testingOnlySetBeginColumn, testingOnlySetBeginLine, testingOnlySetEndColumn, testingOnlySetEndLine, toStringgetModifiers, 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, setVolatilechildrenAccept, getScope, setScopeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetType, getTypeDefinition, setType, setTypeDefinitionpublic ASTClassOrInterfaceDeclaration(int id)
public ASTClassOrInterfaceDeclaration(JavaParser p, int id)
public boolean isFindBoundary()
isFindBoundary in interface net.sourceforge.pmd.lang.ast.NodeisFindBoundary in class net.sourceforge.pmd.lang.ast.AbstractNodepublic java.lang.Object jjtAccept(JavaParserVisitor visitor, java.lang.Object data)
jjtAccept in interface JavaNodejjtAccept in class AbstractJavaNodepublic boolean isLocal()
public boolean isInterface()
public void setInterface()
public ASTAnyTypeDeclaration.TypeKind getTypeKind()
ASTAnyTypeDeclarationpublic java.util.List<ASTAnyTypeBodyDeclaration> getDeclarations()
ASTAnyTypeDeclarationpublic ASTClassOrInterfaceType getSuperClassTypeNode()
extends
clause. Superinterfaces of an interface are not considered.
Returns null otherwise.
public java.util.List<ASTClassOrInterfaceType> getSuperInterfacesTypeNodes()
public java.util.List<ASTAnnotation> getDeclaredAnnotations()
AnnotatablegetDeclaredAnnotations in interface Annotatablepublic ASTAnnotation getAnnotation(java.lang.String annotQualifiedName)
AnnotatablegetAnnotation in interface AnnotatableannotQualifiedName - qulified name of the annotation.ASTAnnotaion node if the annotation is present on this node, else nullpublic boolean isAnnotationPresent(java.lang.String annotQualifiedName)
AnnotatableisAnnotationPresent in interface AnnotatableannotQualifiedName - qulified name of the annotation.true if the annotation is present on this node, else falsepublic boolean isAnyAnnotationPresent(java.util.Collection<java.lang.String> annotQualifiedNames)
AnnotatableisAnyAnnotationPresent in interface AnnotatableannotQualifiedNames - collection that cotains qulified name of annotations.true if any annotation is present on this node, else falseCopyright © 2002–2018 PMD. All rights reserved.