Class ReflectionEnumDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
-
- com.github.javaparser.symbolsolver.reflectionmodel.ReflectionEnumDeclaration
-
- All Implemented Interfaces:
AssociableToAST
,HasAccessSpecifier
,ResolvedDeclaration
,ResolvedEnumDeclaration
,ResolvedReferenceTypeDeclaration
,ResolvedTypeDeclaration
,ResolvedTypeParametrizable
,MethodResolutionCapability
,MethodUsageResolutionCapability
,SymbolResolutionCapability
public class ReflectionEnumDeclaration extends AbstractTypeDeclaration implements ResolvedEnumDeclaration, MethodResolutionCapability, MethodUsageResolutionCapability, SymbolResolutionCapability
- 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 ReflectionEnumDeclaration(Class<?> clazz, 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, toAst
-
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.ResolvedEnumDeclaration
asEnum, getEnumConstant, hasEnumConstant, isEnum
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
asReferenceType, findTypeParameter, getAllAncestors, getAllAncestors, getAllMethods, getAllNonStaticFields, getAllStaticFields, getAncestors, getDeclaredAnnotation, getDeclaredAnnotations, getDeclaredFields, getVisibleField, getVisibleFields, hasAnnotation, hasVisibleField, isFunctionalInterface, isInheritedAnnotation, isJavaLangEnum, isJavaLangObject, isJavaLangRecord, isReferenceType
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
asAnnotation, asClass, asInterface, asRecord, asType, asTypeParameter, getId, getInternalType, hasInternalType, isAnnotation, isAnonymousClass, isClass, isInterface, isRecord, isType, isTypeParameter
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
isGeneric
-
-
-
-
Constructor Detail
-
ReflectionEnumDeclaration
public ReflectionEnumDeclaration(Class<?> clazz, TypeSolver typeSolver)
-
-
Method Detail
-
accessSpecifier
public AccessSpecifier accessSpecifier()
- Specified by:
accessSpecifier
in interfaceHasAccessSpecifier
-
containerType
public Optional<ResolvedReferenceTypeDeclaration> containerType()
- Specified by:
containerType
in interfaceResolvedTypeDeclaration
-
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
-
getAncestors
public List<ResolvedReferenceType> getAncestors(boolean acceptIncompleteList)
- Specified by:
getAncestors
in interfaceResolvedReferenceTypeDeclaration
-
getField
public ResolvedFieldDeclaration getField(String name)
- Specified by:
getField
in interfaceResolvedReferenceTypeDeclaration
-
hasField
public boolean hasField(String name)
- Specified by:
hasField
in interfaceResolvedReferenceTypeDeclaration
-
getAllFields
public List<ResolvedFieldDeclaration> getAllFields()
- Specified by:
getAllFields
in interfaceResolvedReferenceTypeDeclaration
-
getDeclaredMethods
public Set<ResolvedMethodDeclaration> getDeclaredMethods()
- Specified by:
getDeclaredMethods
in interfaceResolvedReferenceTypeDeclaration
-
canBeAssignedTo
public boolean canBeAssignedTo(ResolvedReferenceTypeDeclaration other)
- Specified by:
canBeAssignedTo
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 qualifiedName)
- Specified by:
hasDirectlyAnnotation
in interfaceResolvedReferenceTypeDeclaration
-
getName
public String getName()
- Specified by:
getName
in interfaceResolvedDeclaration
-
getTypeParameters
public List<ResolvedTypeParameterDeclaration> getTypeParameters()
- Specified by:
getTypeParameters
in interfaceResolvedTypeParametrizable
-
solveMethod
public SymbolReference<ResolvedMethodDeclaration> solveMethod(String name, List<ResolvedType> parameterTypes, boolean staticOnly)
- Specified by:
solveMethod
in interfaceMethodResolutionCapability
-
solveMethodAsUsage
public Optional<MethodUsage> solveMethodAsUsage(String name, List<ResolvedType> parameterTypes, Context invokationContext, List<ResolvedType> typeParameterValues)
- Specified by:
solveMethodAsUsage
in interfaceMethodUsageResolutionCapability
-
solveSymbol
public SymbolReference<? extends ResolvedValueDeclaration> solveSymbol(String name, TypeSolver typeSolver)
- Specified by:
solveSymbol
in interfaceSymbolResolutionCapability
- Parameters:
name
- Field / symbol name.typeSolver
- Symbol solver to resolve type usage.- Returns:
- Symbol reference of the resolved value.
-
getEnumConstants
public List<ResolvedEnumConstantDeclaration> getEnumConstants()
- Specified by:
getEnumConstants
in interfaceResolvedEnumDeclaration
-
internalTypes
public Set<ResolvedReferenceTypeDeclaration> internalTypes()
- Specified by:
internalTypes
in interfaceResolvedTypeDeclaration
-
getConstructors
public List<ResolvedConstructorDeclaration> getConstructors()
- Specified by:
getConstructors
in interfaceResolvedReferenceTypeDeclaration
-
-