Class JavaParserAnnotationDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
-
- com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserAnnotationDeclaration
-
- All Implemented Interfaces:
AssociableToAST<AnnotationDeclaration>
,ResolvedAnnotationDeclaration
,ResolvedDeclaration
,ResolvedReferenceTypeDeclaration
,ResolvedTypeDeclaration
,ResolvedTypeParametrizable
public class JavaParserAnnotationDeclaration extends AbstractTypeDeclaration implements ResolvedAnnotationDeclaration
- Author:
- Federico Tomassetti
-
-
Constructor Summary
Constructors Constructor Description JavaParserAnnotationDeclaration(AnnotationDeclaration wrappedNode, TypeSolver typeSolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<ResolvedReferenceTypeDeclaration>
containerType()
List<ResolvedFieldDeclaration>
getAllFields()
List<ResolvedReferenceType>
getAncestors(boolean acceptIncompleteList)
List<ResolvedAnnotationMemberDeclaration>
getAnnotationMembers()
String
getClassName()
List<ResolvedConstructorDeclaration>
getConstructors()
Set<ResolvedMethodDeclaration>
getDeclaredMethods()
String
getName()
String
getPackageName()
String
getQualifiedName()
List<ResolvedTypeParameterDeclaration>
getTypeParameters()
Annotation declarations cannot have type parameters and hence this method always returns an empty list.boolean
hasDirectlyAnnotation(String canonicalName)
boolean
isAssignableBy(ResolvedReferenceTypeDeclaration other)
boolean
isAssignableBy(ResolvedType type)
Optional<AnnotationDeclaration>
toAst()
-
Methods inherited from class com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
getAllMethods, isFunctionalInterface
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asField, asMethod, asParameter, hasName, isEnumConstant, isField, isMethod, isParameter, isVariable
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
asReferenceType, canBeAssignedTo, findTypeParameter, getAllAncestors, getAllMethods, getAllNonStaticFields, getAllStaticFields, getAncestors, getDeclaredFields, getField, getVisibleField, getVisibleFields, hasAnnotation, hasField, hasVisibleField, isFunctionalInterface
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
asClass, asEnum, asInterface, asType, asTypeParameter, getId, getInternalType, hasInternalType, internalTypes, isAnonymousClass, isClass, isEnum, isInterface, isType, isTypeParameter
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
isGeneric
-
-
-
-
Constructor Detail
-
JavaParserAnnotationDeclaration
public JavaParserAnnotationDeclaration(AnnotationDeclaration wrappedNode, TypeSolver typeSolver)
-
-
Method Detail
-
getAncestors
public List<ResolvedReferenceType> getAncestors(boolean acceptIncompleteList)
- Specified by:
getAncestors
in interfaceResolvedReferenceTypeDeclaration
-
getAllFields
public List<ResolvedFieldDeclaration> getAllFields()
- Specified by:
getAllFields
in interfaceResolvedReferenceTypeDeclaration
-
getDeclaredMethods
public Set<ResolvedMethodDeclaration> getDeclaredMethods()
- Specified by:
getDeclaredMethods
in interfaceResolvedReferenceTypeDeclaration
-
isAssignableBy
public boolean isAssignableBy(ResolvedType type)
- Specified by:
isAssignableBy
in interfaceResolvedReferenceTypeDeclaration
-
isAssignableBy
public boolean isAssignableBy(ResolvedReferenceTypeDeclaration other)
- Specified by:
isAssignableBy
in interfaceResolvedReferenceTypeDeclaration
-
hasDirectlyAnnotation
public boolean hasDirectlyAnnotation(String canonicalName)
- Specified by:
hasDirectlyAnnotation
in interfaceResolvedReferenceTypeDeclaration
-
getPackageName
public String getPackageName()
- Specified by:
getPackageName
in interfaceResolvedTypeDeclaration
-
getClassName
public String getClassName()
- Specified by:
getClassName
in interfaceResolvedTypeDeclaration
-
getQualifiedName
public String getQualifiedName()
- Specified by:
getQualifiedName
in interfaceResolvedTypeDeclaration
-
getName
public String getName()
- Specified by:
getName
in interfaceResolvedDeclaration
-
getTypeParameters
public List<ResolvedTypeParameterDeclaration> getTypeParameters()
Annotation declarations cannot have type parameters and hence this method always returns an empty list.- Specified by:
getTypeParameters
in interfaceResolvedTypeParametrizable
- Returns:
- An empty list.
-
containerType
public Optional<ResolvedReferenceTypeDeclaration> containerType()
- Specified by:
containerType
in interfaceResolvedTypeDeclaration
-
getAnnotationMembers
public List<ResolvedAnnotationMemberDeclaration> getAnnotationMembers()
- Specified by:
getAnnotationMembers
in interfaceResolvedAnnotationDeclaration
-
getConstructors
public List<ResolvedConstructorDeclaration> getConstructors()
- Specified by:
getConstructors
in interfaceResolvedReferenceTypeDeclaration
-
toAst
public Optional<AnnotationDeclaration> toAst()
- Specified by:
toAst
in interfaceAssociableToAST<AnnotationDeclaration>
-
-