org.openjdk.jol.info
Class FieldLayout

java.lang.Object
  extended by org.openjdk.jol.info.FieldLayout
All Implemented Interfaces:
Comparable<FieldLayout>

public class FieldLayout
extends Object
implements Comparable<FieldLayout>

Holds the field info with the layout.

Author:
Aleksey Shipilev

Constructor Summary
FieldLayout(FieldData fieldData, int offset, int size)
          Construct field layout with discovered offset and field size.
 
Method Summary
 int compareTo(FieldLayout o)
           
 boolean equals(Object o)
           
 int hashCode()
           
 String hostClass()
          Answers the class for the field holder.
 String name()
          Answers the field name.
 int offset()
          Answers field offset
 String safeValue(Object object)
          Gets the string representation of field value, if appropriate.
 int size()
          Answers field size
 String toString()
           
 String typeClass()
          Answers the class for the field type
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldLayout

public FieldLayout(FieldData fieldData,
                   int offset,
                   int size)
Construct field layout with discovered offset and field size.

Parameters:
fieldData - field data for the field
offset - discovered offset
size - discovered field size
Method Detail

offset

public int offset()
Answers field offset

Returns:
field offset

size

public int size()
Answers field size

Returns:
field size

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

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(FieldLayout o)
Specified by:
compareTo in interface Comparable<FieldLayout>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.