Class ReflectionEnumDeclaration

  • All Implemented Interfaces:
    com.github.javaparser.resolution.declarations.HasAccessSpecifier, com.github.javaparser.resolution.declarations.ResolvedDeclaration, com.github.javaparser.resolution.declarations.ResolvedEnumDeclaration, com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration, com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration, com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable, MethodUsageResolutionCapability, com.github.javaparser.symbolsolver.logic.MethodResolutionCapability

    public class ReflectionEnumDeclaration
    extends com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
    implements com.github.javaparser.resolution.declarations.ResolvedEnumDeclaration, com.github.javaparser.symbolsolver.logic.MethodResolutionCapability, MethodUsageResolutionCapability
    Author:
    Federico Tomassetti
    • Constructor Summary

      Constructors 
      Constructor Description
      ReflectionEnumDeclaration​(Class<?> clazz, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.github.javaparser.ast.Modifier.Keyword accessSpecifier()  
      Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> containerType()  
      List<com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration> getAllFields()  
      List<com.github.javaparser.resolution.types.ResolvedReferenceType> getAncestors​(boolean acceptIncompleteList)  
      String getClassName()  
      List<com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration> getConstructors()  
      Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> getDeclaredMethods()  
      List<com.github.javaparser.resolution.declarations.ResolvedEnumConstantDeclaration> getEnumConstants()  
      com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration getField​(String name)  
      String getName()  
      String getPackageName()  
      String getQualifiedName()  
      List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> getTypeParameters()  
      boolean hasDirectlyAnnotation​(String qualifiedName)  
      boolean hasField​(String name)  
      Set<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> internalTypes()  
      boolean isAssignableBy​(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)  
      boolean isAssignableBy​(com.github.javaparser.resolution.types.ResolvedType type)  
      com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> solveMethod​(String name, List<com.github.javaparser.resolution.types.ResolvedType> parameterTypes, boolean staticOnly)  
      Optional<com.github.javaparser.resolution.MethodUsage> solveMethodAsUsage​(String name, List<com.github.javaparser.resolution.types.ResolvedType> parameterTypes, Context invokationContext, List<com.github.javaparser.resolution.types.ResolvedType> typeParameterValues)  
      • Methods inherited from class com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration

        getAllMethods, isFunctionalInterface
      • 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.ResolvedEnumDeclaration

        asEnum, getEnumConstant, hasEnumConstant, isEnum
      • Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration

        asReferenceType, canBeAssignedTo, findTypeParameter, getAllAncestors, getAllMethods, getAllNonStaticFields, getAllStaticFields, getAncestors, getDeclaredFields, getVisibleField, getVisibleFields, hasAnnotation, hasVisibleField, isFunctionalInterface
      • Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration

        asClass, asInterface, asType, asTypeParameter, getId, getInternalType, hasInternalType, isAnonymousClass, isClass, isInterface, isType, isTypeParameter
      • Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable

        isGeneric
    • Constructor Detail

      • ReflectionEnumDeclaration

        public ReflectionEnumDeclaration​(Class<?> clazz,
                                         com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
    • Method Detail

      • accessSpecifier

        public com.github.javaparser.ast.Modifier.Keyword accessSpecifier()
        Specified by:
        accessSpecifier in interface com.github.javaparser.resolution.declarations.HasAccessSpecifier
      • containerType

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

        public String getPackageName()
        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
      • getAncestors

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

        public com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration getField​(String name)
        Specified by:
        getField in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
      • hasField

        public boolean hasField​(String name)
        Specified by:
        hasField 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
      • getDeclaredMethods

        public Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> getDeclaredMethods()
        Specified by:
        getDeclaredMethods in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
      • 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 qualifiedName)
        Specified by:
        hasDirectlyAnnotation in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
      • getName

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

        public List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> getTypeParameters()
        Specified by:
        getTypeParameters in interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
      • solveMethod

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

        public List<com.github.javaparser.resolution.declarations.ResolvedEnumConstantDeclaration> getEnumConstants()
        Specified by:
        getEnumConstants in interface com.github.javaparser.resolution.declarations.ResolvedEnumDeclaration
      • 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