Top Description Methods
jakarta.enterprise.lang.model.declarations

public Interface FieldInfo

extends DeclarationInfo
Imports
jakarta.enterprise.lang.model.types.Type

A field, declared in some class.
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public default FieldInfo
asField()

Overrides default jakarta.enterprise.lang.model.declarations.DeclarationInfo.asField.

Returns this declaration as a field.

public ClassInfo

Returns:

the class that declares this field, never null
declaringClass
()

Returns the class that declares this field.

public boolean

Returns:

whether this field is final.
isFinal
()

Returns whether this field is final.

public boolean

Returns:

whether this field is static.
isStatic
()

Returns whether this field is static.

public default DeclarationInfo.Kind
kind()

Implements jakarta.enterprise.lang.model.declarations.DeclarationInfo.kind.

Returns the kind of this declaration.

public int

Returns:

the modifiers of this field
modifiers
()

Returns the modifiers of this field as an int.

public String

Returns:

the name of this field, never null
name
()

Returns the name of this field.

public Type

Returns:

the type of this field, never null
type
()

Returns the type of this field.

Inherited from jakarta.enterprise.lang.model.declarations.DeclarationInfo:
asClassasDeclarationasMethodasPackageasParameterasRecordComponentasTypeisClassisDeclarationisFieldisMethodisPackageisParameterisRecordComponentisType

Method Detail

asFieldback to summary
public default FieldInfo asField()

Overrides default jakarta.enterprise.lang.model.declarations.DeclarationInfo.asField.

Doc from jakarta.enterprise.lang.model.declarations.DeclarationInfo.asField.

Returns this declaration as a field.

Returns:FieldInfo

this field, never null

Annotations
@Override
declaringClassback to summary
public ClassInfo declaringClass()

Returns the class that declares this field.

Returns:ClassInfo

the class that declares this field, never null

isFinalback to summary
public boolean isFinal()

Returns whether this field is final.

Returns:boolean

whether this field is final.

isStaticback to summary
public boolean isStatic()

Returns whether this field is static.

Returns:boolean

whether this field is static.

kindback to summary
public default DeclarationInfo.Kind kind()

Implements jakarta.enterprise.lang.model.declarations.DeclarationInfo.kind.

Doc from jakarta.enterprise.lang.model.declarations.DeclarationInfo.kind.

Returns the kind of this declaration.

Returns:DeclarationInfo.Kind

the kind of this declaration

Annotations
@Override
modifiersback to summary
public int modifiers()

Returns the modifiers of this field as an int. Use Modifier to inspect the value.

Returns:int

the modifiers of this field

nameback to summary
public String name()

Returns the name of this field.

Returns:String

the name of this field, never null

typeback to summary
public Type type()

Returns the type of this field.

Returns:Type

the type of this field, never null