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()StringgetClassName()List<ResolvedConstructorDeclaration>getConstructors()Set<ResolvedMethodDeclaration>getDeclaredMethods()StringgetName()StringgetPackageName()StringgetQualifiedName()List<ResolvedTypeParameterDeclaration>getTypeParameters()Annotation declarations cannot have type parameters and hence this method always returns an empty list.booleanhasDirectlyAnnotation(String canonicalName)booleanisAssignableBy(ResolvedReferenceTypeDeclaration other)booleanisAssignableBy(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:
getAncestorsin interfaceResolvedReferenceTypeDeclaration
-
getAllFields
public List<ResolvedFieldDeclaration> getAllFields()
- Specified by:
getAllFieldsin interfaceResolvedReferenceTypeDeclaration
-
getDeclaredMethods
public Set<ResolvedMethodDeclaration> getDeclaredMethods()
- Specified by:
getDeclaredMethodsin interfaceResolvedReferenceTypeDeclaration
-
isAssignableBy
public boolean isAssignableBy(ResolvedType type)
- Specified by:
isAssignableByin interfaceResolvedReferenceTypeDeclaration
-
isAssignableBy
public boolean isAssignableBy(ResolvedReferenceTypeDeclaration other)
- Specified by:
isAssignableByin interfaceResolvedReferenceTypeDeclaration
-
hasDirectlyAnnotation
public boolean hasDirectlyAnnotation(String canonicalName)
- Specified by:
hasDirectlyAnnotationin interfaceResolvedReferenceTypeDeclaration
-
getPackageName
public String getPackageName()
- Specified by:
getPackageNamein interfaceResolvedTypeDeclaration
-
getClassName
public String getClassName()
- Specified by:
getClassNamein interfaceResolvedTypeDeclaration
-
getQualifiedName
public String getQualifiedName()
- Specified by:
getQualifiedNamein interfaceResolvedTypeDeclaration
-
getName
public String getName()
- Specified by:
getNamein interfaceResolvedDeclaration
-
getTypeParameters
public List<ResolvedTypeParameterDeclaration> getTypeParameters()
Annotation declarations cannot have type parameters and hence this method always returns an empty list.- Specified by:
getTypeParametersin interfaceResolvedTypeParametrizable- Returns:
- An empty list.
-
containerType
public Optional<ResolvedReferenceTypeDeclaration> containerType()
- Specified by:
containerTypein interfaceResolvedTypeDeclaration
-
getAnnotationMembers
public List<ResolvedAnnotationMemberDeclaration> getAnnotationMembers()
- Specified by:
getAnnotationMembersin interfaceResolvedAnnotationDeclaration
-
getConstructors
public List<ResolvedConstructorDeclaration> getConstructors()
- Specified by:
getConstructorsin interfaceResolvedReferenceTypeDeclaration
-
toAst
public Optional<AnnotationDeclaration> toAst()
- Specified by:
toAstin interfaceAssociableToAST<AnnotationDeclaration>
-
-