public class JavaParserEnumDeclaration extends AbstractTypeDeclaration implements ResolvedEnumDeclaration, MethodResolutionCapability, MethodUsageResolutionCapability, AssociableToAST<EnumDeclaration>
Modifier and Type | Class and Description |
---|---|
static class |
JavaParserEnumDeclaration.ValueOfMethod
Needed by ContextHelper
An implicitly declared method
public static E valueOf(String name) , which returns the
enum constant of E with the specified name. |
static class |
JavaParserEnumDeclaration.ValuesMethod
Needed by ContextHelper
An implicitly declared method
public static E[] values() , which returns an array containing the
enum constants of E , in the same order as they appear in the body of the declaration of E. |
Constructor and Description |
---|
JavaParserEnumDeclaration(EnumDeclaration wrappedNode,
TypeSolver typeSolver) |
getAllMethods, isFunctionalInterface
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asEnum, getEnumConstant, hasEnumConstant, isEnum
asReferenceType, findTypeParameter, getAllAncestors, getAllMethods, getAllNonStaticFields, getAllStaticFields, getAncestors, getDeclaredFields, getField, getVisibleField, getVisibleFields, hasAnnotation, hasField, hasVisibleField, isFunctionalInterface, isJavaLangEnum, isJavaLangObject
asClass, asInterface, asType, asTypeParameter, getId, getInternalType, hasInternalType, isAnonymousClass
asEnumConstant, asField, asMethod, asParameter, asPattern, hasName, isEnumConstant, isMethod, isPattern, isVariable
isGeneric
public JavaParserEnumDeclaration(EnumDeclaration wrappedNode, TypeSolver typeSolver)
public Set<ResolvedMethodDeclaration> getDeclaredMethods()
getDeclaredMethods
in interface ResolvedReferenceTypeDeclaration
public Context getContext()
public String getName()
getName
in interface ResolvedDeclaration
public boolean isField()
isField
in interface ResolvedDeclaration
public boolean isParameter()
isParameter
in interface ResolvedDeclaration
public boolean isType()
isType
in interface ResolvedDeclaration
isType
in interface ResolvedTypeDeclaration
public boolean hasDirectlyAnnotation(String canonicalName)
hasDirectlyAnnotation
in interface ResolvedReferenceTypeDeclaration
public boolean canBeAssignedTo(ResolvedReferenceTypeDeclaration other)
canBeAssignedTo
in interface ResolvedReferenceTypeDeclaration
public boolean isClass()
isClass
in interface ResolvedTypeDeclaration
public boolean isInterface()
isInterface
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 boolean isAssignableBy(ResolvedReferenceTypeDeclaration other)
isAssignableBy
in interface ResolvedReferenceTypeDeclaration
public boolean isAssignableBy(ResolvedType type)
isAssignableBy
in interface ResolvedReferenceTypeDeclaration
public boolean isTypeParameter()
isTypeParameter
in interface ResolvedTypeDeclaration
public Optional<MethodUsage> solveMethodAsUsage(String name, List<ResolvedType> argumentTypes, Context invokationContext, List<ResolvedType> typeParameters)
solveMethodAsUsage
in interface MethodUsageResolutionCapability
public SymbolReference<ResolvedMethodDeclaration> solveMethod(String name, List<ResolvedType> argumentsTypes, boolean staticOnly)
solveMethod
in interface MethodResolutionCapability
public List<ResolvedFieldDeclaration> getAllFields()
getAllFields
in interface ResolvedReferenceTypeDeclaration
public List<ResolvedReferenceType> getAncestors(boolean acceptIncompleteList)
getAncestors
in interface ResolvedReferenceTypeDeclaration
@Deprecated public SymbolReference<ResolvedTypeDeclaration> solveType(String name)
public List<ResolvedTypeParameterDeclaration> getTypeParameters()
getTypeParameters
in interface ResolvedTypeParametrizable
public EnumDeclaration getWrappedNode()
public List<ResolvedEnumConstantDeclaration> getEnumConstants()
getEnumConstants
in interface ResolvedEnumDeclaration
public AccessSpecifier accessSpecifier()
accessSpecifier
in interface HasAccessSpecifier
public Set<ResolvedReferenceTypeDeclaration> internalTypes()
internalTypes
in interface ResolvedTypeDeclaration
public Optional<ResolvedReferenceTypeDeclaration> containerType()
containerType
in interface ResolvedTypeDeclaration
public List<ResolvedConstructorDeclaration> getConstructors()
getConstructors
in interface ResolvedReferenceTypeDeclaration
public Optional<EnumDeclaration> toAst()
toAst
in interface AssociableToAST<EnumDeclaration>
Copyright © 2007–2021. All rights reserved.