Class ReflectionAnnotationDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
-
- com.github.javaparser.symbolsolver.reflectionmodel.ReflectionAnnotationDeclaration
-
- All Implemented Interfaces:
com.github.javaparser.resolution.declarations.AssociableToAST,com.github.javaparser.resolution.declarations.ResolvedAnnotationDeclaration,com.github.javaparser.resolution.declarations.ResolvedDeclaration,com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration,com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration,com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable,com.github.javaparser.resolution.logic.MethodResolutionCapability,MethodUsageResolutionCapability
public class ReflectionAnnotationDeclaration extends AbstractTypeDeclaration implements com.github.javaparser.resolution.declarations.ResolvedAnnotationDeclaration, MethodUsageResolutionCapability, com.github.javaparser.resolution.logic.MethodResolutionCapability
- Author:
- Malte Skoruppa
-
-
Constructor Summary
Constructors Constructor Description ReflectionAnnotationDeclaration(java.lang.Class<?> clazz, com.github.javaparser.resolution.TypeSolver typeSolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration>containerType()booleanequals(java.lang.Object o)java.util.List<com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration>getAllFields()java.util.List<com.github.javaparser.resolution.types.ResolvedReferenceType>getAncestors(boolean acceptIncompleteList)java.util.List<com.github.javaparser.resolution.declarations.ResolvedAnnotationMemberDeclaration>getAnnotationMembers()java.lang.StringgetClassName()java.util.List<com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration>getConstructors()java.util.Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>getDeclaredMethods()java.lang.StringgetName()java.lang.StringgetPackageName()java.lang.StringgetQualifiedName()java.util.List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration>getTypeParameters()Annotation declarations cannot have type parameters and hence this method always returns an empty list.booleanhasDirectlyAnnotation(java.lang.String canonicalName)inthashCode()java.util.Set<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration>internalTypes()booleanisAssignableBy(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)booleanisAssignableBy(com.github.javaparser.resolution.types.ResolvedType type)booleanisInheritable()com.github.javaparser.resolution.model.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>solveMethod(java.lang.String name, java.util.List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, boolean staticOnly)java.util.Optional<com.github.javaparser.resolution.MethodUsage>solveMethodAsUsage(java.lang.String name, java.util.List<com.github.javaparser.resolution.types.ResolvedType> parameterTypes, com.github.javaparser.resolution.Context invokationContext, java.util.List<com.github.javaparser.resolution.types.ResolvedType> typeParameterValues)java.lang.StringtoString()-
Methods inherited from class com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
getAllMethods, isFunctionalInterface, isRecordType
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.resolution.declarations.AssociableToAST
toAst, 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, isArrayLength, 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, getDeclaredAnnotations, getDeclaredFields, getField, getVisibleField, getVisibleFields, hasAnnotation, hasField, hasVisibleField, isFunctionalInterface, isInheritedAnnotation, isJavaLangEnum, isJavaLangObject, isJavaLangRecord, isReferenceType
-
-
-
-
Method Detail
-
getPackageName
public java.lang.String getPackageName()
- Specified by:
getPackageNamein interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getClassName
public java.lang.String getClassName()
- Specified by:
getClassNamein interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getQualifiedName
public java.lang.String getQualifiedName()
- Specified by:
getQualifiedNamein interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
isAssignableBy
public boolean isAssignableBy(com.github.javaparser.resolution.types.ResolvedType type)
- Specified by:
isAssignableByin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
isAssignableBy
public boolean isAssignableBy(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)
- Specified by:
isAssignableByin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
hasDirectlyAnnotation
public boolean hasDirectlyAnnotation(java.lang.String canonicalName)
- Specified by:
hasDirectlyAnnotationin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getAllFields
public java.util.List<com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration> getAllFields()
- Specified by:
getAllFieldsin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getAncestors
public java.util.List<com.github.javaparser.resolution.types.ResolvedReferenceType> getAncestors(boolean acceptIncompleteList)
- Specified by:
getAncestorsin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getDeclaredMethods
public java.util.Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> getDeclaredMethods()
- Specified by:
getDeclaredMethodsin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
containerType
public java.util.Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> containerType()
- Specified by:
containerTypein interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getTypeParameters
public java.util.List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> getTypeParameters()
Annotation declarations cannot have type parameters and hence this method always returns an empty list.- Specified by:
getTypeParametersin interfacecom.github.javaparser.resolution.declarations.ResolvedTypeParametrizable- Returns:
- An empty list.
-
internalTypes
public java.util.Set<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> internalTypes()
- Specified by:
internalTypesin interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getConstructors
public java.util.List<com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration> getConstructors()
- Specified by:
getConstructorsin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getAnnotationMembers
public java.util.List<com.github.javaparser.resolution.declarations.ResolvedAnnotationMemberDeclaration> getAnnotationMembers()
- Specified by:
getAnnotationMembersin interfacecom.github.javaparser.resolution.declarations.ResolvedAnnotationDeclaration
-
solveMethodAsUsage
public java.util.Optional<com.github.javaparser.resolution.MethodUsage> solveMethodAsUsage(java.lang.String name, java.util.List<com.github.javaparser.resolution.types.ResolvedType> parameterTypes, com.github.javaparser.resolution.Context invokationContext, java.util.List<com.github.javaparser.resolution.types.ResolvedType> typeParameterValues)- Specified by:
solveMethodAsUsagein interfaceMethodUsageResolutionCapability
-
solveMethod
public com.github.javaparser.resolution.model.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> solveMethod(java.lang.String name, java.util.List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, boolean staticOnly)- Specified by:
solveMethodin interfacecom.github.javaparser.resolution.logic.MethodResolutionCapability
-
isInheritable
public boolean isInheritable()
- Specified by:
isInheritablein interfacecom.github.javaparser.resolution.declarations.ResolvedAnnotationDeclaration
-
-