Interface ASTAnyTypeDeclaration
-
- All Superinterfaces:
AccessNode
,JavaNode
,JavaQualifiableNode
,Node
,QualifiableNode
,ScopedNode
,TypeNode
- All Known Implementing Classes:
AbstractAnyTypeDeclaration
,ASTAnnotationTypeDeclaration
,ASTClassOrInterfaceDeclaration
,ASTEnumDeclaration
,ASTRecordDeclaration
public interface ASTAnyTypeDeclaration extends TypeNode, JavaQualifiableNode, AccessNode, JavaNode
Groups class, enum, record, annotation and interface declarations.- Author:
- Clément Fournier
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ASTAnyTypeDeclaration.TypeKind
Deprecated.This is not useful, not adapted to the problem, and does not scale to changes in the Java language.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description String
getBinaryName()
Returns the binary name of this type declaration.List<ASTAnyTypeBodyDeclaration>
getDeclarations()
Retrieves the member declarations (fields, methods, classes, etc.) from the body of this type declaration.String
getImage()
Deprecated.UsegetSimpleName()
JavaTypeQualifiedName
getQualifiedName()
Deprecated.UsegetBinaryName()
String
getSimpleName()
Returns the simple name of this type declaration.ASTAnyTypeDeclaration.TypeKind
getTypeKind()
Deprecated.boolean
isNested()
Returns true if this type declaration is nested inside an interface, class or annotation.-
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
children, childrenAccept, getChild, getParent, getRoot, jjtAccept, setScope
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.Node
findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getIndexInParent, getNthParent, getNumChildren, getParentsOfType, getUserData, getUserMap, getXPathAttributesIterator, getXPathNodeName, hasDescendantMatchingXPath, hasDescendantOfType, hasImageEqualTo, isFindBoundary, jjtAddChild, jjtClose, jjtGetChild, jjtGetChildIndex, jjtGetId, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetChildIndex, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData
-
Methods inherited from interface net.sourceforge.pmd.lang.symboltable.ScopedNode
getScope
-
Methods inherited from interface net.sourceforge.pmd.lang.java.ast.TypeNode
getType, getTypeDefinition, setType, setTypeDefinition
-
-
-
-
Method Detail
-
getSimpleName
String getSimpleName()
Returns the simple name of this type declaration. Returns null if this is an anonymous class declaration.
-
getImage
@Deprecated @DeprecatedAttribute(replaceWith="@SimpleName") String getImage()
Deprecated.UsegetSimpleName()
-
getBinaryName
String getBinaryName()
Returns the binary name of this type declaration. This is likeClass.getName()
.
-
getTypeKind
@Deprecated ASTAnyTypeDeclaration.TypeKind getTypeKind()
Deprecated.Finds the type kind of this declaration.- Returns:
- The type kind of this declaration.
-
getDeclarations
List<ASTAnyTypeBodyDeclaration> getDeclarations()
Retrieves the member declarations (fields, methods, classes, etc.) from the body of this type declaration.- Returns:
- The member declarations declared in this type declaration
-
getQualifiedName
@Deprecated JavaTypeQualifiedName getQualifiedName()
Deprecated.UsegetBinaryName()
Description copied from interface:JavaQualifiableNode
Returns a qualified name for this node.- Specified by:
getQualifiedName
in interfaceJavaQualifiableNode
- Specified by:
getQualifiedName
in interfaceQualifiableNode
- Returns:
- A qualified name.
-
isNested
boolean isNested()
Returns true if this type declaration is nested inside an interface, class or annotation.
-
-