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

public Class VirtualBaseConstructor<T>

extends InstanceConstructor<T>
Class Inheritance
Imports
java.util.*, sun.jvm.hotspot.debugger.*, sun.jvm.hotspot.debugger.cdbg.CDebugger, .ClosestSymbol, .LoadObject, sun.jvm.hotspot.types.*, sun.jvm.hotspot.HotSpotTypeDataBase

This provides a factory to create instances where the base virtual type is know and the expected subclasses are within a particular package.

Field Summary

Modifier and TypeField and Description
private Type
private TypeDataBase
private Map<String, Class<? extends T>>
private Class<T>

Constructor Summary

AccessConstructor and Description
public
VirtualBaseConstructor(TypeDataBase db, Type baseType, String packageName, Class<T> unknownTypeHandler)

Method Summary

Modifier and TypeMethod and Description
public boolean
addMapping(String cTypeName, Class<? extends T> clazz)

Adds a mapping from the given C++ type name to the given Java class.

public T
instantiateWrapperFor(Address addr)

Implements abstract sun.jvm.hotspot.runtime.InstanceConstructor.instantiateWrapperFor.

Instantiate the most-precisely typed wrapper object available for the type of the given Address.

Inherited from sun.jvm.hotspot.runtime.InstanceConstructor:
newWrongTypeException

Field Detail

baseTypeback to summary
private Type baseType
dbback to summary
private TypeDataBase db
mapback to summary
private Map<String, Class<? extends T>> map
unknownTypeHandlerback to summary
private Class<T> unknownTypeHandler

Constructor Detail

VirtualBaseConstructorback to summary
public VirtualBaseConstructor(TypeDataBase db, Type baseType, String packageName, Class<T> unknownTypeHandler)

Method Detail

addMappingback to summary
public boolean addMapping(String cTypeName, Class<? extends T> clazz)

Adds a mapping from the given C++ type name to the given Java class. The latter must be a subclass of sun.jvm.hotspot.runtime.VMObject. Returns false if there was already a class for this type name in the map.

instantiateWrapperForback to summary
public T instantiateWrapperFor(Address addr) throws WrongTypeException

Implements abstract sun.jvm.hotspot.runtime.InstanceConstructor.instantiateWrapperFor.

Instantiate the most-precisely typed wrapper object available for the type of the given Address. If no type in the mapping matched the type of the Address, throws a WrongTypeException. Returns null for a null address (similar behavior to VMObjectFactory).