Package org.openjdk.jmc.common.util
Class MCOldObject
java.lang.Object
org.openjdk.jmc.common.util.MCOldObject
- All Implemented Interfaces:
IMCOldObject
Base implementation of the
IMCOldObject interface.-
Constructor Summary
ConstructorsConstructorDescriptionMCOldObject(IQuantity address, IMCType type, String objectDescription, IMCOldObject referrer, String field, IQuantity fieldModifier, IQuantity arraySize, IQuantity arrayIndex) Create a new old object instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe address of the object, used for identity purposes.Returns a description of the object.Returns the object that refers to this object in the heap reference chain.If the object is referred to by an object in an array it returns the information about that array, otherwise it returnsnull.If the object is referred to by an object in a field it returns a representation of the field,nullotherwise.intReturns the number of steps away in the reference chain this object is from the next object referring to it.getType()The type of the object, as anIMCTypeinthashCode()toString()
-
Constructor Details
-
MCOldObject
public MCOldObject(IQuantity address, IMCType type, String objectDescription, IMCOldObject referrer, String field, IQuantity fieldModifier, IQuantity arraySize, IQuantity arrayIndex) Create a new old object instance.- Parameters:
address- object address, seeIMCOldObject.getAddress()type- object typeobjectDescription- object descriptionreferrer- Referrer object, seeIMCOldObject.getReferrer().nullif there is no referring object.field- Name of the referring field, seeIMCOldObjectField.getName().nullif there is no referring field.fieldModifier- Modifier of the referring field, seeIMCOldObjectField.getModifier().nullif there is no referring field.arraySize- The array size iffieldrefers to an array, seeIMCOldObjectArray.getSize().nullif the field is not an array.arrayIndex- The array index that refers to this object iffieldrefers to an array, seeIMCOldObjectArray.getIndex().nullif the field is not an array.
-
-
Method Details
-
getAddress
Description copied from interface:IMCOldObjectThe address of the object, used for identity purposes.- Specified by:
getAddressin interfaceIMCOldObject- Returns:
- the address of the object
-
getReferrerArray
Description copied from interface:IMCOldObjectIf the object is referred to by an object in an array it returns the information about that array, otherwise it returnsnull.- Specified by:
getReferrerArrayin interfaceIMCOldObject- Returns:
- a representation of the array data for the object referring to this old object
-
getReferrerField
Description copied from interface:IMCOldObjectIf the object is referred to by an object in a field it returns a representation of the field,nullotherwise.- Specified by:
getReferrerFieldin interfaceIMCOldObject- Returns:
- a representation of the field that refers to this object
-
getDescription
Description copied from interface:IMCOldObjectReturns a description of the object.- Specified by:
getDescriptionin interfaceIMCOldObject- Returns:
- the object description
-
getReferrer
Description copied from interface:IMCOldObjectReturns the object that refers to this object in the heap reference chain.- Specified by:
getReferrerin interfaceIMCOldObject- Returns:
- the object that refers to this object
-
getType
Description copied from interface:IMCOldObjectThe type of the object, as anIMCType- Specified by:
getTypein interfaceIMCOldObject- Returns:
- the type of the object
-
equals
-
hashCode
public int hashCode() -
toString
-
getReferrerSkip
public int getReferrerSkip()Description copied from interface:IMCOldObjectReturns the number of steps away in the reference chain this object is from the next object referring to it. If this is greater than 0, it means that there are objects between this one and the referrer that were omitted when committing the traces to the Flight Recording file.- Specified by:
getReferrerSkipin interfaceIMCOldObject- Returns:
- the number of steps between this object and the next one towards the root in the reference chain
-