Class JavaParserEnumDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
-
- com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserEnumDeclaration
-
- All Implemented Interfaces:
HasAccessSpecifier,ResolvedDeclaration,ResolvedEnumDeclaration,ResolvedReferenceTypeDeclaration,ResolvedTypeDeclaration,ResolvedTypeParametrizable,MethodUsageResolutionCapability,MethodResolutionCapability
public class JavaParserEnumDeclaration extends AbstractTypeDeclaration implements ResolvedEnumDeclaration, MethodResolutionCapability, MethodUsageResolutionCapability
- Author:
- Federico Tomassetti
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJavaParserEnumDeclaration.ValuesMethod
-
Constructor Summary
Constructors Constructor Description JavaParserEnumDeclaration(EnumDeclaration wrappedNode, TypeSolver typeSolver)
-
Method Summary
-
Methods inherited from class com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
getAllMethods, isFunctionalInterface
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asField, asMethod, asParameter, hasName, isEnumConstant, isMethod, 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, getAllMethods, getAllNonStaticFields, getAllStaticFields, getAncestors, getDeclaredFields, getField, getVisibleField, getVisibleFields, hasAnnotation, hasField, hasVisibleField, isFunctionalInterface
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
asClass, asInterface, asType, asTypeParameter, getId, getInternalType, hasInternalType, isAnonymousClass
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
isGeneric
-
-
-
-
Constructor Detail
-
JavaParserEnumDeclaration
public JavaParserEnumDeclaration(EnumDeclaration wrappedNode, TypeSolver typeSolver)
-
-
Method Detail
-
getDeclaredMethods
public Set<ResolvedMethodDeclaration> getDeclaredMethods()
- Specified by:
getDeclaredMethodsin interfaceResolvedReferenceTypeDeclaration
-
getContext
public Context getContext()
-
getName
public String getName()
- Specified by:
getNamein interfaceResolvedDeclaration
-
isField
public boolean isField()
- Specified by:
isFieldin interfaceResolvedDeclaration
-
isParameter
public boolean isParameter()
- Specified by:
isParameterin interfaceResolvedDeclaration
-
isType
public boolean isType()
- Specified by:
isTypein interfaceResolvedDeclaration- Specified by:
isTypein interfaceResolvedTypeDeclaration
-
hasDirectlyAnnotation
public boolean hasDirectlyAnnotation(String canonicalName)
- Specified by:
hasDirectlyAnnotationin interfaceResolvedReferenceTypeDeclaration
-
canBeAssignedTo
public boolean canBeAssignedTo(ResolvedReferenceTypeDeclaration other)
- Specified by:
canBeAssignedToin interfaceResolvedReferenceTypeDeclaration
-
isClass
public boolean isClass()
- Specified by:
isClassin interfaceResolvedTypeDeclaration
-
isInterface
public boolean isInterface()
- Specified by:
isInterfacein interfaceResolvedTypeDeclaration
-
getPackageName
public String getPackageName()
- Specified by:
getPackageNamein interfaceResolvedTypeDeclaration
-
getClassName
public String getClassName()
- Specified by:
getClassNamein interfaceResolvedTypeDeclaration
-
getQualifiedName
public String getQualifiedName()
- Specified by:
getQualifiedNamein interfaceResolvedTypeDeclaration
-
isAssignableBy
public boolean isAssignableBy(ResolvedReferenceTypeDeclaration other)
- Specified by:
isAssignableByin interfaceResolvedReferenceTypeDeclaration
-
isAssignableBy
public boolean isAssignableBy(ResolvedType type)
- Specified by:
isAssignableByin interfaceResolvedReferenceTypeDeclaration
-
isTypeParameter
public boolean isTypeParameter()
- Specified by:
isTypeParameterin interfaceResolvedTypeDeclaration
-
solveMethodAsUsage
public Optional<MethodUsage> solveMethodAsUsage(String name, List<ResolvedType> argumentTypes, Context invokationContext, List<ResolvedType> typeParameters)
- Specified by:
solveMethodAsUsagein interfaceMethodUsageResolutionCapability
-
solveMethod
public SymbolReference<ResolvedMethodDeclaration> solveMethod(String name, List<ResolvedType> argumentsTypes, boolean staticOnly)
- Specified by:
solveMethodin interfaceMethodResolutionCapability
-
getAllFields
public List<ResolvedFieldDeclaration> getAllFields()
- Specified by:
getAllFieldsin interfaceResolvedReferenceTypeDeclaration
-
getAncestors
public List<ResolvedReferenceType> getAncestors(boolean acceptIncompleteList)
- Specified by:
getAncestorsin interfaceResolvedReferenceTypeDeclaration
-
solveType
@Deprecated public SymbolReference<ResolvedTypeDeclaration> solveType(String name)
Deprecated.This method is deprecated because it receives the TypesSolver as a parameter. Eventually we would like to remove all usages of TypeSolver as a parameter. Also, resolution should move out of declarations, so that they are pure declarations and the resolution should work for JavaParser, Reflection and Javassist classes in the same way and not be specific to the three implementations.
-
getTypeParameters
public List<ResolvedTypeParameterDeclaration> getTypeParameters()
- Specified by:
getTypeParametersin interfaceResolvedTypeParametrizable
-
getWrappedNode
public EnumDeclaration getWrappedNode()
Returns the JavaParser node associated with this JavaParserEnumDeclaration.- Returns:
- A visitable JavaParser node wrapped by this object.
-
getEnumConstants
public List<ResolvedEnumConstantDeclaration> getEnumConstants()
- Specified by:
getEnumConstantsin interfaceResolvedEnumDeclaration
-
accessSpecifier
public AccessSpecifier accessSpecifier()
- Specified by:
accessSpecifierin interfaceHasAccessSpecifier
-
internalTypes
public Set<ResolvedReferenceTypeDeclaration> internalTypes()
- Specified by:
internalTypesin interfaceResolvedTypeDeclaration
-
containerType
public Optional<ResolvedReferenceTypeDeclaration> containerType()
- Specified by:
containerTypein interfaceResolvedTypeDeclaration
-
getConstructors
public List<ResolvedConstructorDeclaration> getConstructors()
- Specified by:
getConstructorsin interfaceResolvedReferenceTypeDeclaration
-
-