Package org.openjdk.jol.info
Class FieldData
java.lang.Object
org.openjdk.jol.info.FieldData
Holds the field information, without the layout.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet contentded group of the field.static FieldData
Creates the synthetic field data.static FieldData
create
(String hostKlass, String fieldName, String fieldType, boolean isContended, String contendedGroup) Creates the field data.Answers the class for the field holder.boolean
Answers whether the field has contentded annotation.boolean
name()
Answers the field name.static FieldData
Parses the field data from the existing field.refField()
Get original Field.toString()
Answers the class for the field type
-
Field Details
-
name
-
type
-
klass
-
refField
-
isContended
private final boolean isContended -
contendedGroup
-
-
Constructor Details
-
FieldData
-
-
Method Details
-
create
Creates the synthetic field data.- Parameters:
hostKlass
- class name where the field is declaredfieldName
- field namefieldType
- string representation of field type- Returns:
- field data
-
create
public static FieldData create(String hostKlass, String fieldName, String fieldType, boolean isContended, String contendedGroup) Creates the field data.- Parameters:
hostKlass
- class name where the field is declaredfieldName
- field namefieldType
- string representation of field typeisContended
- true if the field marked withjdk.internal.vm.annotation.Contended
annotationcontendedGroup
- name of the group specified in the@Contended
annotation- Returns:
- field data
-
parse
Parses the field data from the existing field.- Parameters:
field
- field to parse- Returns:
- field data
-
typeClass
Answers the class for the field type- Returns:
- string representation of field type
-
isPrimitive
public boolean isPrimitive() -
hostClass
Answers the class for the field holder.- Returns:
- string representation of holder class
-
name
Answers the field name.- Returns:
- field name
-
isContended
public boolean isContended()Answers whether the field has contentded annotation.- Returns:
- true, if the field is contended
-
contendedGroup
Get contentded group of the field.- Returns:
- String
-
refField
Get original Field.- Returns:
- Field which is represented by the FieldData
-
toString
-