public class ReflectionEnumDeclaration extends AbstractTypeDeclaration implements ResolvedEnumDeclaration, MethodResolutionCapability, MethodUsageResolutionCapability, SymbolResolutionCapability
breadthFirstFunc, depthFirstFunc, JAVA_IO_SERIALIZABLE, JAVA_LANG_COMPARABLE, JAVA_LANG_ENUM, JAVA_LANG_OBJECT
Constructor and Description |
---|
ReflectionEnumDeclaration(Class<?> clazz,
TypeSolver typeSolver) |
getAllMethods, isFunctionalInterface
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asEnum, getEnumConstant, hasEnumConstant, isEnum
asReferenceType, findTypeParameter, getAllAncestors, getAllAncestors, getAllMethods, getAllNonStaticFields, getAllStaticFields, getAncestors, getDeclaredAnnotation, getDeclaredAnnotations, getDeclaredFields, getVisibleField, getVisibleFields, hasAnnotation, hasVisibleField, isFunctionalInterface, isInheritedAnnotation, isJavaLangEnum, isJavaLangObject, isReferenceType
asAnnotation, asClass, asInterface, asType, asTypeParameter, getId, getInternalType, hasInternalType, isAnnotation, isAnonymousClass, isClass, isInterface, isType, isTypeParameter
asEnumConstant, asField, asMethod, asParameter, asTypePattern, hasName, isEnumConstant, isField, isMethod, isParameter, isTypePattern, isVariable
toAst, toAst
isGeneric
public ReflectionEnumDeclaration(Class<?> clazz, TypeSolver typeSolver)
public AccessSpecifier accessSpecifier()
accessSpecifier
in interface HasAccessSpecifier
public Optional<ResolvedReferenceTypeDeclaration> containerType()
containerType
in interface ResolvedTypeDeclaration
public String getPackageName()
getPackageName
in interface ResolvedTypeDeclaration
public String getClassName()
getClassName
in interface ResolvedTypeDeclaration
public String getQualifiedName()
getQualifiedName
in interface ResolvedTypeDeclaration
public List<ResolvedReferenceType> getAncestors(boolean acceptIncompleteList)
getAncestors
in interface ResolvedReferenceTypeDeclaration
public ResolvedFieldDeclaration getField(String name)
getField
in interface ResolvedReferenceTypeDeclaration
public boolean hasField(String name)
hasField
in interface ResolvedReferenceTypeDeclaration
public List<ResolvedFieldDeclaration> getAllFields()
getAllFields
in interface ResolvedReferenceTypeDeclaration
public Set<ResolvedMethodDeclaration> getDeclaredMethods()
getDeclaredMethods
in interface ResolvedReferenceTypeDeclaration
public boolean canBeAssignedTo(ResolvedReferenceTypeDeclaration other)
canBeAssignedTo
in interface ResolvedReferenceTypeDeclaration
public boolean isAssignableBy(ResolvedType type)
isAssignableBy
in interface ResolvedReferenceTypeDeclaration
public boolean isAssignableBy(ResolvedReferenceTypeDeclaration other)
isAssignableBy
in interface ResolvedReferenceTypeDeclaration
public boolean hasDirectlyAnnotation(String qualifiedName)
hasDirectlyAnnotation
in interface ResolvedReferenceTypeDeclaration
public String getName()
getName
in interface ResolvedDeclaration
public List<ResolvedTypeParameterDeclaration> getTypeParameters()
getTypeParameters
in interface ResolvedTypeParametrizable
public SymbolReference<ResolvedMethodDeclaration> solveMethod(String name, List<ResolvedType> parameterTypes, boolean staticOnly)
solveMethod
in interface MethodResolutionCapability
public Optional<MethodUsage> solveMethodAsUsage(String name, List<ResolvedType> parameterTypes, Context invokationContext, List<ResolvedType> typeParameterValues)
solveMethodAsUsage
in interface MethodUsageResolutionCapability
public SymbolReference<? extends ResolvedValueDeclaration> solveSymbol(String name, TypeSolver typeSolver)
solveSymbol
in interface SymbolResolutionCapability
name
- Field / symbol name.typeSolver
- Symbol solver to resolve type usage.public List<ResolvedEnumConstantDeclaration> getEnumConstants()
getEnumConstants
in interface ResolvedEnumDeclaration
public Set<ResolvedReferenceTypeDeclaration> internalTypes()
internalTypes
in interface ResolvedTypeDeclaration
public List<ResolvedConstructorDeclaration> getConstructors()
getConstructors
in interface ResolvedReferenceTypeDeclaration
Copyright © 2007–2024. All rights reserved.