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
  • 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
    ReflectionAnnotationDeclaration(Class<?> clazz, com.github.javaparser.resolution.TypeSolver typeSolver)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration>
     
    boolean
     
    List<com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration>
     
    List<com.github.javaparser.resolution.types.ResolvedReferenceType>
    getAncestors(boolean acceptIncompleteList)
     
    List<com.github.javaparser.resolution.declarations.ResolvedAnnotationMemberDeclaration>
     
     
    List<com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration>
     
    Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>
     
     
    Public methods
     
    List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration>
    Annotation declarations cannot have type parameters and hence this method always returns an empty list.
    boolean
     
    int
     
    Set<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration>
     
    boolean
    isAssignableBy(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)
     
    boolean
    isAssignableBy(com.github.javaparser.resolution.types.ResolvedType type)
     
    boolean
     
    com.github.javaparser.resolution.model.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>
    solveMethod(String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, boolean staticOnly)
     
    Optional<com.github.javaparser.resolution.MethodUsage>
    solveMethodAsUsage(String name, List<com.github.javaparser.resolution.types.ResolvedType> parameterTypes, com.github.javaparser.resolution.Context invokationContext, List<com.github.javaparser.resolution.types.ResolvedType> typeParameterValues)
     
     

    Methods inherited from class 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

    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 Details

    • ReflectionAnnotationDeclaration

      public ReflectionAnnotationDeclaration(Class<?> clazz, com.github.javaparser.resolution.TypeSolver typeSolver)
      Constructor
  • Method Details

    • getPackageName

      public String getPackageName()
      Public methods
      Specified by:
      getPackageName in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
    • getClassName

      public String getClassName()
      Specified by:
      getClassName in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
    • getQualifiedName

      public String getQualifiedName()
      Specified by:
      getQualifiedName in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isAssignableBy

      public boolean isAssignableBy(com.github.javaparser.resolution.types.ResolvedType type)
      Specified by:
      isAssignableBy in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
    • isAssignableBy

      public boolean isAssignableBy(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)
      Specified by:
      isAssignableBy in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
    • hasDirectlyAnnotation

      public boolean hasDirectlyAnnotation(String canonicalName)
      Specified by:
      hasDirectlyAnnotation in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
    • getAllFields

      public List<com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration> getAllFields()
      Specified by:
      getAllFields in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
    • getAncestors

      public List<com.github.javaparser.resolution.types.ResolvedReferenceType> getAncestors(boolean acceptIncompleteList)
      Specified by:
      getAncestors in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
    • getDeclaredMethods

      public Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> getDeclaredMethods()
      Specified by:
      getDeclaredMethods in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
    • getName

      public String getName()
      Specified by:
      getName in interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
    • containerType

      public Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> containerType()
      Specified by:
      containerType in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
    • getTypeParameters

      public 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:
      getTypeParameters in interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
      Returns:
      An empty list.
    • internalTypes

      public Set<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> internalTypes()
      Specified by:
      internalTypes in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
    • getConstructors

      public List<com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration> getConstructors()
      Specified by:
      getConstructors in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
    • getAnnotationMembers

      public List<com.github.javaparser.resolution.declarations.ResolvedAnnotationMemberDeclaration> getAnnotationMembers()
      Specified by:
      getAnnotationMembers in interface com.github.javaparser.resolution.declarations.ResolvedAnnotationDeclaration
    • solveMethodAsUsage

      public Optional<com.github.javaparser.resolution.MethodUsage> solveMethodAsUsage(String name, List<com.github.javaparser.resolution.types.ResolvedType> parameterTypes, com.github.javaparser.resolution.Context invokationContext, List<com.github.javaparser.resolution.types.ResolvedType> typeParameterValues)
      Specified by:
      solveMethodAsUsage in interface MethodUsageResolutionCapability
    • solveMethod

      public com.github.javaparser.resolution.model.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> solveMethod(String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, boolean staticOnly)
      Specified by:
      solveMethod in interface com.github.javaparser.resolution.logic.MethodResolutionCapability
    • isInheritable

      public boolean isInheritable()
      Specified by:
      isInheritable in interface com.github.javaparser.resolution.declarations.ResolvedAnnotationDeclaration