ResolvedFieldDeclaration

Declaration of a field.

Author

Federico Tomassetti

Functions

Link copied to clipboard
The access specifier of this element.
Link copied to clipboard
Return this as a EnumConstantDeclaration or throw an UnsupportedOperationException
Link copied to clipboard
Return this as a FieldDeclaration or throw an UnsupportedOperationException
Link copied to clipboard
Return this as a MethodDeclaration or throw an UnsupportedOperationException // FIXME: This is never overridden.
Link copied to clipboard
Return this as a ParameterDeclaration or throw an UnsupportedOperationException
Link copied to clipboard
Return this as a TypeDeclaration or throw an UnsupportedOperationException
Link copied to clipboard
Return this as a PatternDeclaration or throw an UnsupportedOperationException
Link copied to clipboard
The type on which this field has been declared
Link copied to clipboard
abstract fun getName(): String
Should return the name or return null if the name is not available.
Link copied to clipboard
abstract fun getType(): ResolvedType
Type of the declaration.
Link copied to clipboard
open fun hasName(): Boolean
Anonymous classes do not have a name, for example.
Link copied to clipboard
Does this declaration represent the array length pseudo-field?
Link copied to clipboard
Does this declaration represents an enum constant?
Link copied to clipboard
open fun isField(): Boolean
Does this declaration represents a class field?
Link copied to clipboard
open fun isMethod(): Boolean
Does this declaration represents a method?
Link copied to clipboard
open fun isParameter(): Boolean
Does this declaration represents a method parameter?
Link copied to clipboard
abstract fun isStatic(): Boolean
Is the field static?
Link copied to clipboard
open fun isType(): Boolean
Does this declaration represents a type?
Link copied to clipboard
Does this declaration represents a pattern declaration?
Link copied to clipboard
open fun isVariable(): Boolean
Does this declaration represents a variable?
Link copied to clipboard
abstract fun isVolatile(): Boolean
Is the field volatile?
Link copied to clipboard
open fun toAst(): Optional<Node>
If the declaration is associated to an AST node return it, otherwise it return empty.
open fun <N : Node?> toAst(clazz: Class<N>): Optional<N>
If the declaration is associated to an AST node and the type matches the expected Class return it, otherwise it returns empty.