Class FieldData

java.lang.Object
org.openjdk.jol.info.FieldData

public class FieldData extends Object
Holds the field information, without the layout.
  • Field Details

    • name

      private final String name
    • type

      private final String type
    • klass

      private final String klass
    • refField

      private final Field refField
    • isContended

      private final boolean isContended
    • contendedGroup

      private final String contendedGroup
  • Constructor Details

    • FieldData

      private FieldData(Field refField, String hostKlass, String fieldName, String fieldType, boolean isContended, String contendedGroup)
  • Method Details

    • create

      public static FieldData create(String hostKlass, String fieldName, String fieldType)
      Creates the synthetic field data.
      Parameters:
      hostKlass - class name where the field is declared
      fieldName - field name
      fieldType - 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 declared
      fieldName - field name
      fieldType - string representation of field type
      isContended - true if the field marked with jdk.internal.vm.annotation.Contended annotation
      contendedGroup - name of the group specified in the @Contended annotation
      Returns:
      field data
    • parse

      public static FieldData parse(Field field)
      Parses the field data from the existing field.
      Parameters:
      field - field to parse
      Returns:
      field data
    • typeClass

      public String typeClass()
      Answers the class for the field type
      Returns:
      string representation of field type
    • isPrimitive

      public boolean isPrimitive()
    • hostClass

      public String hostClass()
      Answers the class for the field holder.
      Returns:
      string representation of holder class
    • name

      public String 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

      public String contendedGroup()
      Get contentded group of the field.
      Returns:
      String
    • refField

      public Field refField()
      Get original Field.
      Returns:
      Field which is represented by the FieldData
    • toString

      public String toString()
      Overrides:
      toString in class Object