Interface ResolvedDeclaration
- All Known Subinterfaces:
ResolvedAnnotationDeclaration,ResolvedAnnotationMemberDeclaration,ResolvedClassDeclaration,ResolvedConstructorDeclaration,ResolvedEnumConstantDeclaration,ResolvedEnumDeclaration,ResolvedFieldDeclaration,ResolvedInterfaceDeclaration,ResolvedMethodDeclaration,ResolvedMethodLikeDeclaration,ResolvedParameterDeclaration,ResolvedPatternDeclaration,ResolvedReferenceTypeDeclaration,ResolvedTypeDeclaration,ResolvedTypeParameterDeclaration,ResolvedValueDeclaration
public interface ResolvedDeclaration
A generic declaration.
- Author:
- Federico Tomassetti
-
Method Summary
Modifier and TypeMethodDescriptiondefault ResolvedEnumConstantDeclarationReturn this as a EnumConstantDeclaration or throw an UnsupportedOperationExceptiondefault ResolvedFieldDeclarationasField()Return this as a FieldDeclaration or throw an UnsupportedOperationExceptiondefault ResolvedMethodDeclarationasMethod()Return this as a MethodDeclaration or throw an UnsupportedOperationException // FIXME: This is never overridden.default ResolvedParameterDeclarationReturn this as a ParameterDeclaration or throw an UnsupportedOperationExceptiondefault ResolvedPatternDeclarationReturn this as a PatternDeclaration or throw an UnsupportedOperationExceptiondefault ResolvedTypeDeclarationasType()Return this as a TypeDeclaration or throw an UnsupportedOperationExceptiongetName()Should return the name or return null if the name is not available.default booleanhasName()Anonymous classes do not have a name, for example.default booleanDoes this declaration represents an enum constant?default booleanisField()Does this declaration represents a class field?default booleanisMethod()Does this declaration represents a method? // FIXME: This is never overridden.default booleanDoes this declaration represents a method parameter?default booleanDoes this declaration represents a pattern declaration?default booleanisType()Does this declaration represents a type?default booleanDoes this declaration represents a variable?
-
Method Details
-
hasName
default boolean hasName()Anonymous classes do not have a name, for example. -
getName
String getName()Should return the name or return null if the name is not available. -
isField
default boolean isField()Does this declaration represents a class field? -
isVariable
default boolean isVariable()Does this declaration represents a variable? -
isEnumConstant
default boolean isEnumConstant()Does this declaration represents an enum constant? -
isPattern
default boolean isPattern()Does this declaration represents a pattern declaration? -
isParameter
default boolean isParameter()Does this declaration represents a method parameter? -
isType
default boolean isType()Does this declaration represents a type? -
isMethod
default boolean isMethod()Does this declaration represents a method? // FIXME: This is never overridden. -
asField
Return this as a FieldDeclaration or throw an UnsupportedOperationException -
asParameter
Return this as a ParameterDeclaration or throw an UnsupportedOperationException -
asType
Return this as a TypeDeclaration or throw an UnsupportedOperationException -
asMethod
Return this as a MethodDeclaration or throw an UnsupportedOperationException // FIXME: This is never overridden. -
asEnumConstant
Return this as a EnumConstantDeclaration or throw an UnsupportedOperationException -
asPattern
Return this as a PatternDeclaration or throw an UnsupportedOperationException
-