APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.jvm.hotspot.utilities

public Class ObjectReader

extends Object
Class Inheritance
Imports
java.lang.reflect.Modifier, java.util.*, java.util.stream.*, sun.jvm.hotspot.debugger.*, sun.jvm.hotspot.oops.*, sun.jvm.hotspot.runtime.*, sun.jvm.hotspot.utilities.*

ObjectReader can "deserialize" objects from debuggee. Class Loading: ObjectReader loads classes using the given class loader. If no class loader is supplied, it uses a ProcImageClassLoader, which loads classes from debuggee core or process. Object creation: This class uses no-arg constructor to construct objects. But if there is no no-arg constructor in a given class, then it tries to use other constructors with 'default' values - null for object types, 0, 0.0, false etc. for primitives. If this process fails to construct an instance (because of null checking by constructor or 0 being invalid for an int arg etc.), then null is returned. While constructing complete object graph 'null' is inserted silently on failure and the deserialization continues to construct best-effort object graph. Debug messages: The flag sun.jvm.hotspot.utilities.ObjectReader.DEBUG may be set to non-null to get debug error messages and stack traces. JDK version: JDK classes are loaded by bootstrap class loader and not by the supplied class loader or ProcImageClassLoader. This may create problems if a JDK class evolves. i.e., if SA runs a JDK version different from that of the debuggee, there is a possibility of schema change. It is recommended that the matching JDK version be used to run SA for proper object deserialization.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class
protected class

Field Summary

Modifier and TypeField and Description
protected final ClassLoader
private static final boolean
protected Map<Field, Field>
protected String
protected String
protected String
protected String
protected Map<Object, Object>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
pack-priv static void
protected final Object
protected Object
protected Object
protected Object
protected Class<T>[]
getParamTypes(Symbol signature)

private Properties
protected final boolean
protected String
protected String
protected String
protected String
protected void
protected void
public Class<T>
public Constructor<T>
public Field
public Object
public Method
public Object
public Object
public Object
public Object
private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clback to summary
protected final ClassLoader cl
DEBUGback to summary
private static final boolean DEBUG
fieldMapback to summary
protected Map<Field, Field> fieldMap
javaLangStringback to summary
protected String javaLangString
javaUtilHashtableback to summary
protected String javaUtilHashtable
javaUtilHashtableEntryback to summary
protected String javaUtilHashtableEntry
javaUtilPropertiesback to summary
protected String javaUtilProperties
oopToObjMapback to summary
protected Map<Object, Object> oopToObjMap

Constructor Detail

ObjectReaderback to summary
public ObjectReader(ClassLoader cl)
ObjectReaderback to summary
public ObjectReader()

Method Detail

debugPrintlnback to summary
pack-priv static void debugPrintln(String msg)
debugPrintStackTraceback to summary
pack-priv static void debugPrintStackTrace(Exception exp)
getDefaultPrimitiveValueback to summary
protected final Object getDefaultPrimitiveValue(Class<T> clz)
getFromObjTableback to summary
protected Object getFromObjTable(Oop oop)
getFromObjTableback to summary
protected Object getFromObjTable(Metadata oop)
getHashtableback to summary
protected Object getHashtable(Instance oop)
getParamTypesback to summary
protected Class<T>[] getParamTypes(Symbol signature)
getPropertiesback to summary
private Properties getProperties(Instance oop)
isRobustback to summary
protected final boolean isRobust(OopHandle handle)
javaLangStringback to summary
protected String javaLangString()
javaUtilHashtableback to summary
protected String javaUtilHashtable()
javaUtilHashtableEntryback to summary
protected String javaUtilHashtableEntry()
javaUtilPropertiesback to summary
protected String javaUtilProperties()
putIntoObjTableback to summary
protected void putIntoObjTable(Oop oop, Object obj)
putIntoObjTableback to summary
protected void putIntoObjTable(Metadata oop, Object obj)
readClassback to summary
public Class<T> readClass(InstanceKlass kls) throws ClassNotFoundException
readConstructorback to summary
public Constructor<T> readConstructor(Method m) throws NoSuchMethodException, ClassNotFoundException
readFieldback to summary
public Field readField(Field f) throws NoSuchFieldException, ClassNotFoundException
readInstanceback to summary
public Object readInstance(Instance oop) throws ClassNotFoundException
readMethodback to summary
public Method readMethod(Method m) throws NoSuchMethodException, ClassNotFoundException
readMethodOrConstructorback to summary
public Object readMethodOrConstructor(Method m) throws NoSuchMethodException, ClassNotFoundException
readObjectback to summary
public Object readObject(Oop oop) throws ClassNotFoundException
readObjectArrayback to summary
public Object readObjectArray(final ObjArray array) throws ClassNotFoundException
readPrimitiveArrayback to summary
public Object readPrimitiveArray(final TypeArray array)
setHashtableEntryback to summary
private void setHashtableEntry(Hashtable<Object, Object> p, Oop oop)
setPropertiesEntryback to summary
private void setPropertiesEntry(Properties p, Oop oop)
sun.jvm.hotspot.utilities back to summary

protected Class ObjectReader.FieldSetter

extends DefaultOopVisitor
Class Inheritance

Field Summary

Modifier and TypeField and Description
protected Object

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
public void
public void
public void
public void
public void
public void
public void
private void
Inherited from sun.jvm.hotspot.oops.DefaultOopVisitor:
doMetadatadoOopepiloguegetObjprologuesetObj

Field Detail

objback to summary
protected Object obj

Hides sun.jvm.hotspot.oops.DefaultOopVisitor.obj.

Constructor Detail

FieldSetterback to summary
public FieldSetter(Object obj)

Method Detail

doBooleanback to summary
public void doBoolean(BooleanField field, boolean isVMField)

Overrides sun.jvm.hotspot.oops.DefaultOopVisitor.doBoolean.

Implements sun.jvm.hotspot.oops.FieldVisitor.doBoolean.

doByteback to summary
public void doByte(ByteField field, boolean isVMField)

Overrides sun.jvm.hotspot.oops.DefaultOopVisitor.doByte.

Implements sun.jvm.hotspot.oops.FieldVisitor.doByte.

doCharback to summary
public void doChar(CharField field, boolean isVMField)

Overrides sun.jvm.hotspot.oops.DefaultOopVisitor.doChar.

Implements sun.jvm.hotspot.oops.FieldVisitor.doChar.

doCIntback to summary
public void doCInt(CIntField field, boolean isVMField)

Overrides sun.jvm.hotspot.oops.DefaultOopVisitor.doCInt.

Implements sun.jvm.hotspot.oops.FieldVisitor.doCInt.

doDoubleback to summary
public void doDouble(DoubleField field, boolean isVMField)

Overrides sun.jvm.hotspot.oops.DefaultOopVisitor.doDouble.

Implements sun.jvm.hotspot.oops.FieldVisitor.doDouble.

doFloatback to summary
public void doFloat(FloatField field, boolean isVMField)

Overrides sun.jvm.hotspot.oops.DefaultOopVisitor.doFloat.

Implements sun.jvm.hotspot.oops.FieldVisitor.doFloat.

doIntback to summary
public void doInt(IntField field, boolean isVMField)

Overrides sun.jvm.hotspot.oops.DefaultOopVisitor.doInt.

Implements sun.jvm.hotspot.oops.FieldVisitor.doInt.

doLongback to summary
public void doLong(LongField field, boolean isVMField)

Overrides sun.jvm.hotspot.oops.DefaultOopVisitor.doLong.

Implements sun.jvm.hotspot.oops.FieldVisitor.doLong.

doOopback to summary
public void doOop(OopField field, boolean isVMField)

Overrides sun.jvm.hotspot.oops.DefaultOopVisitor.doOop.

Implements sun.jvm.hotspot.oops.FieldVisitor.doOop.

doShortback to summary
public void doShort(ShortField field, boolean isVMField)

Overrides sun.jvm.hotspot.oops.DefaultOopVisitor.doShort.

Implements sun.jvm.hotspot.oops.FieldVisitor.doShort.

printFieldSetErrorback to summary
private void printFieldSetError(Field f, Exception ex)
sun.jvm.hotspot.utilities back to summary

protected Class ObjectReader.SignatureParser

extends SignatureIterator
Class Inheritance

Field Summary

Modifier and TypeField and Description
protected Vector<Class<?>>
Inherited from sun.jvm.hotspot.runtime.SignatureIterator:
_index_parameter_index_signature

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected int
arrayInnerBegin(int begin)

public void
doArray(int begin, int end)

Implements abstract sun.jvm.hotspot.runtime.SignatureIterator.doArray.

public void
public void
public void
public void
public void
public void
public void
public void
doObject(int begin, int end)

Implements abstract sun.jvm.hotspot.runtime.SignatureIterator.doObject.

public void
public void
protected Class<T>
getClass(int begin, int end)

protected String
getClassName(int begin, int end)

public int
public Enumeration<E>
Inherited from sun.jvm.hotspot.runtime.SignatureIterator:
checkSignatureEnddispatchFieldexpectisReturnTypeiterateiterateParametersiterateReturntypeparameterIndexparseTypeskipOptionalSize

Field Detail

tmpback to summary
protected Vector<Class<?>> tmp

Constructor Detail

SignatureParserback to summary
public SignatureParser(Symbol s)

Method Detail

arrayInnerBeginback to summary
protected int arrayInnerBegin(int begin)
doArrayback to summary
public void doArray(int begin, int end)

Implements abstract sun.jvm.hotspot.runtime.SignatureIterator.doArray.

doBoolback to summary
public void doBool()

Implements abstract sun.jvm.hotspot.runtime.SignatureIterator.doBool.

doByteback to summary
public void doByte()

Implements abstract sun.jvm.hotspot.runtime.SignatureIterator.doByte.

doCharback to summary
public void doChar()

Implements abstract sun.jvm.hotspot.runtime.SignatureIterator.doChar.

doDoubleback to summary
public void doDouble()

Implements abstract sun.jvm.hotspot.runtime.SignatureIterator.doDouble.

doFloatback to summary
public void doFloat()

Implements abstract sun.jvm.hotspot.runtime.SignatureIterator.doFloat.

doIntback to summary
public void doInt()

Implements abstract sun.jvm.hotspot.runtime.SignatureIterator.doInt.

doLongback to summary
public void doLong()

Implements abstract sun.jvm.hotspot.runtime.SignatureIterator.doLong.

doObjectback to summary
public void doObject(int begin, int end)

Implements abstract sun.jvm.hotspot.runtime.SignatureIterator.doObject.

doShortback to summary
public void doShort()

Implements abstract sun.jvm.hotspot.runtime.SignatureIterator.doShort.

doVoidback to summary
public void doVoid()

Implements abstract sun.jvm.hotspot.runtime.SignatureIterator.doVoid.

getClassback to summary
protected Class<T> getClass(int begin, int end)
getClassNameback to summary
protected String getClassName(int begin, int end)
getNumParamsback to summary
public int getNumParams()
getParamTypesback to summary
public Enumeration<E> getParamTypes()