Class JavaParserAnnotationDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
-
- com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserAnnotationDeclaration
-
- All Implemented Interfaces:
AssociableToAST
,ResolvedAnnotationDeclaration
,ResolvedDeclaration
,ResolvedReferenceTypeDeclaration
,ResolvedTypeDeclaration
,ResolvedTypeParametrizable
public class JavaParserAnnotationDeclaration extends AbstractTypeDeclaration implements ResolvedAnnotationDeclaration
- Author:
- Federico Tomassetti
-
-
Field Summary
-
Fields inherited from interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
breadthFirstFunc, depthFirstFunc, JAVA_IO_SERIALIZABLE, JAVA_LANG_COMPARABLE, JAVA_LANG_ENUM, JAVA_LANG_OBJECT, JAVA_LANG_RECORD
-
-
Constructor Summary
Constructors Constructor Description JavaParserAnnotationDeclaration(AnnotationDeclaration wrappedNode, TypeSolver typeSolver)
-
Method Summary
-
Methods inherited from class com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
getAllMethods, isFunctionalInterface, isRecordType
-
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.AssociableToAST
toAst
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedAnnotationDeclaration
asAnnotation, isAnnotation
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asField, asMethod, asParameter, asTypePattern, hasName, isEnumConstant, isField, isMethod, isParameter, isTypePattern, isVariable
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
asReferenceType, canBeAssignedTo, findTypeParameter, getAllAncestors, getAllAncestors, getAllMethods, getAllNonStaticFields, getAllStaticFields, getAncestors, getDeclaredAnnotation, getDeclaredFields, getField, getVisibleField, getVisibleFields, hasAnnotation, hasField, hasVisibleField, isFunctionalInterface, isInheritedAnnotation, isJavaLangEnum, isJavaLangObject, isJavaLangRecord, isReferenceType
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
asClass, asEnum, asInterface, asRecord, asType, asTypeParameter, getId, getInternalType, hasInternalType, isAnonymousClass, isClass, isEnum, isInterface, isRecord, 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
-
internalTypes
public Set<ResolvedReferenceTypeDeclaration> internalTypes()
- Specified by:
internalTypes
in interfaceResolvedTypeDeclaration
-
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
-
getDeclaredAnnotations
public Set<ResolvedAnnotationDeclaration> getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotations
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
-
isInheritable
public boolean isInheritable()
- Specified by:
isInheritable
in interfaceResolvedAnnotationDeclaration
-
toAst
public Optional<Node> toAst()
- Specified by:
toAst
in interfaceAssociableToAST
-
-