Class ReflectionEnumDeclaration
java.lang.Object
com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
com.github.javaparser.symbolsolver.reflectionmodel.ReflectionEnumDeclaration
- All Implemented Interfaces:
com.github.javaparser.resolution.declarations.AssociableToAST, 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, com.github.javaparser.resolution.logic.MethodResolutionCapability, MethodUsageResolutionCapability, SymbolResolutionCapability
public class ReflectionEnumDeclaration
extends AbstractTypeDeclaration
implements com.github.javaparser.resolution.declarations.ResolvedEnumDeclaration, com.github.javaparser.resolution.logic.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
ConstructorsConstructorDescriptionReflectionEnumDeclaration(Class<?> clazz, com.github.javaparser.resolution.TypeSolver typeSolver) Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.github.javaparser.ast.AccessSpecifierPublic methodsbooleancanBeAssignedTo(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other) Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> List<com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration> List<com.github.javaparser.resolution.types.ResolvedReferenceType> getAncestors(boolean acceptIncompleteList) List<com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration> Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> List<com.github.javaparser.resolution.declarations.ResolvedEnumConstantDeclaration> com.github.javaparser.resolution.declarations.ResolvedFieldDeclarationgetName()List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> booleanhasDirectlyAnnotation(String qualifiedName) booleanSet<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> booleanisAssignableBy(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other) booleanisAssignableBy(com.github.javaparser.resolution.types.ResolvedType type) com.github.javaparser.resolution.model.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, com.github.javaparser.resolution.Context invokationContext, List<com.github.javaparser.resolution.types.ResolvedType> typeParameterValues) com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedValueDeclaration> solveSymbol(String name, com.github.javaparser.resolution.TypeSolver typeSolver) Methods inherited from class AbstractTypeDeclaration
getAllMethods, isFunctionalInterface, isRecordTypeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.javaparser.resolution.declarations.AssociableToAST
toAst, toAstMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asField, asMethod, asParameter, asTypePattern, hasName, isArrayLength, isEnumConstant, isField, isMethod, isParameter, isTypePattern, isVariableMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedEnumDeclaration
asEnum, getEnumConstant, hasEnumConstant, isEnumMethods 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, isReferenceTypeMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
asAnnotation, asClass, asInterface, asRecord, asType, asTypeParameter, getId, getInternalType, hasInternalType, isAnnotation, isAnonymousClass, isClass, isInterface, isRecord, isType, isTypeParameterMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
isGeneric
-
Constructor Details
-
ReflectionEnumDeclaration
public ReflectionEnumDeclaration(Class<?> clazz, com.github.javaparser.resolution.TypeSolver typeSolver) Constructors
-
-
Method Details
-
accessSpecifier
public com.github.javaparser.ast.AccessSpecifier accessSpecifier()Public methods- Specified by:
accessSpecifierin interfacecom.github.javaparser.resolution.declarations.HasAccessSpecifier
-
containerType
public Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> containerType()- Specified by:
containerTypein interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getPackageName
- Specified by:
getPackageNamein interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getClassName
- Specified by:
getClassNamein interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getQualifiedName
- Specified by:
getQualifiedNamein interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getAncestors
public List<com.github.javaparser.resolution.types.ResolvedReferenceType> getAncestors(boolean acceptIncompleteList) - Specified by:
getAncestorsin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getField
- Specified by:
getFieldin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
hasField
- Specified by:
hasFieldin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getAllFields
- Specified by:
getAllFieldsin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getDeclaredMethods
public Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> getDeclaredMethods()- Specified by:
getDeclaredMethodsin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
canBeAssignedTo
public boolean canBeAssignedTo(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other) - Specified by:
canBeAssignedToin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
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
- Specified by:
hasDirectlyAnnotationin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getName
- Specified by:
getNamein interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
getTypeParameters
public List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> getTypeParameters()- Specified by:
getTypeParametersin interfacecom.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
-
solveMethod
public com.github.javaparser.resolution.model.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> solveMethod(String name, List<com.github.javaparser.resolution.types.ResolvedType> parameterTypes, boolean staticOnly) - Specified by:
solveMethodin interfacecom.github.javaparser.resolution.logic.MethodResolutionCapability
-
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:
solveMethodAsUsagein interfaceMethodUsageResolutionCapability
-
solveSymbol
public com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedValueDeclaration> solveSymbol(String name, com.github.javaparser.resolution.TypeSolver typeSolver) - Specified by:
solveSymbolin interfaceSymbolResolutionCapability- Parameters:
name- Field / symbol name.typeSolver- Symbol solver to resolve type usage.- Returns:
- Symbol reference of the resolved value.
-
getEnumConstants
public List<com.github.javaparser.resolution.declarations.ResolvedEnumConstantDeclaration> getEnumConstants()- Specified by:
getEnumConstantsin interfacecom.github.javaparser.resolution.declarations.ResolvedEnumDeclaration
-
internalTypes
public Set<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> internalTypes()- Specified by:
internalTypesin interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getConstructors
public List<com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration> getConstructors()- Specified by:
getConstructorsin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-