org.openjdk.jol.info
Class FieldData

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

public class FieldData
extends Object

Holds the field information, without the layout.

Author:
Aleksey Shipilev

Method Summary
static FieldData create(String hostKlass, String fieldName, String fieldType)
          Creates the synthetic field data.
 String hostClass()
          Answers the class for the field holder.
 String name()
          Answers the field name.
static FieldData parse(Field field)
          Parses the field data from the existing field.
 String safeValue(Object object)
          Gets the string representation of field value, if appropriate.
 String typeClass()
          Answers the class for the field type
 int vmOffset()
          The VM offset for the field, as discovered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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

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

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

safeValue

public String safeValue(Object object)
Gets the string representation of field value, if appropriate.

Parameters:
object - the object to read the contents from
Returns:
field value in given object

vmOffset

public int vmOffset()
The VM offset for the field, as discovered. Some layouters need to know this.

Returns:
vm offset


Copyright © 2013. All Rights Reserved.