Class JavaParserEnumDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
-
- com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserEnumDeclaration
-
- All Implemented Interfaces:
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,MethodUsageResolutionCapability,com.github.javaparser.symbolsolver.logic.MethodResolutionCapability
public class JavaParserEnumDeclaration extends com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration implements com.github.javaparser.resolution.declarations.ResolvedEnumDeclaration, com.github.javaparser.symbolsolver.logic.MethodResolutionCapability, MethodUsageResolutionCapability
- Author:
- Federico Tomassetti
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJavaParserEnumDeclaration.ValuesMethod
-
Constructor Summary
Constructors Constructor Description JavaParserEnumDeclaration(com.github.javaparser.ast.body.EnumDeclaration wrappedNode, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.github.javaparser.ast.Modifier.KeywordaccessSpecifier()booleancanBeAssignedTo(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration>containerType()booleanequals(Object o)List<com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration>getAllFields()List<com.github.javaparser.resolution.types.ResolvedReferenceType>getAncestors(boolean acceptIncompleteList)StringgetClassName()List<com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration>getConstructors()ContextgetContext()Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>getDeclaredMethods()List<com.github.javaparser.resolution.declarations.ResolvedEnumConstantDeclaration>getEnumConstants()StringgetName()StringgetPackageName()StringgetQualifiedName()List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration>getTypeParameters()com.github.javaparser.ast.body.EnumDeclarationgetWrappedNode()Returns the JavaParser node associated with this JavaParserEnumDeclaration.booleanhasDirectlyAnnotation(String canonicalName)inthashCode()Set<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration>internalTypes()booleanisAssignableBy(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)booleanisAssignableBy(com.github.javaparser.resolution.types.ResolvedType type)booleanisClass()booleanisField()booleanisInterface()booleanisParameter()booleanisType()booleanisTypeParameter()com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>solveMethod(String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, boolean staticOnly)Optional<com.github.javaparser.resolution.MethodUsage>solveMethodAsUsage(String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentTypes, Context invokationContext, List<com.github.javaparser.resolution.types.ResolvedType> typeParameters)StringtoString()-
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
-
-
-
-
Method Detail
-
getDeclaredMethods
public Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> getDeclaredMethods()
- Specified by:
getDeclaredMethodsin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getContext
public Context getContext()
-
getName
public String getName()
- Specified by:
getNamein interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
isField
public boolean isField()
- Specified by:
isFieldin interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
isParameter
public boolean isParameter()
- Specified by:
isParameterin interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
isType
public boolean isType()
- Specified by:
isTypein interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration- Specified by:
isTypein interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
hasDirectlyAnnotation
public boolean hasDirectlyAnnotation(String canonicalName)
- Specified by:
hasDirectlyAnnotationin 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
-
isClass
public boolean isClass()
- Specified by:
isClassin interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
isInterface
public boolean isInterface()
- Specified by:
isInterfacein interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getPackageName
public String getPackageName()
- Specified by:
getPackageNamein interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getClassName
public String getClassName()
- Specified by:
getClassNamein interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getQualifiedName
public String getQualifiedName()
- Specified by:
getQualifiedNamein interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
isAssignableBy
public boolean isAssignableBy(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)
- Specified by:
isAssignableByin 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
-
isTypeParameter
public boolean isTypeParameter()
- Specified by:
isTypeParameterin interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
solveMethodAsUsage
public Optional<com.github.javaparser.resolution.MethodUsage> solveMethodAsUsage(String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentTypes, Context invokationContext, List<com.github.javaparser.resolution.types.ResolvedType> typeParameters)
- Specified by:
solveMethodAsUsagein interfaceMethodUsageResolutionCapability
-
solveMethod
public com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> solveMethod(String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, boolean staticOnly)
- Specified by:
solveMethodin interfacecom.github.javaparser.symbolsolver.logic.MethodResolutionCapability
-
getAllFields
public List<com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration> getAllFields()
- Specified by:
getAllFieldsin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getAncestors
public List<com.github.javaparser.resolution.types.ResolvedReferenceType> getAncestors(boolean acceptIncompleteList)
- Specified by:
getAncestorsin interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getTypeParameters
public List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> getTypeParameters()
- Specified by:
getTypeParametersin interfacecom.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
-
getWrappedNode
public com.github.javaparser.ast.body.EnumDeclaration getWrappedNode()
Returns the JavaParser node associated with this JavaParserEnumDeclaration.- Returns:
- A visitable JavaParser node wrapped by this object.
-
getEnumConstants
public List<com.github.javaparser.resolution.declarations.ResolvedEnumConstantDeclaration> getEnumConstants()
- Specified by:
getEnumConstantsin interfacecom.github.javaparser.resolution.declarations.ResolvedEnumDeclaration
-
accessSpecifier
public com.github.javaparser.ast.Modifier.Keyword accessSpecifier()
- Specified by:
accessSpecifierin interfacecom.github.javaparser.resolution.declarations.HasAccessSpecifier
-
internalTypes
public Set<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> internalTypes()
- Specified by:
internalTypesin interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
containerType
public Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> containerType()
- Specified by:
containerTypein 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
-
-