public abstract class AbstractExtractedCollection<E,X extends ICollectionExtractor> extends Object implements Iterable<E>, IObject
IObject.Type
Constructor and Description |
---|
AbstractExtractedCollection(IObject collection,
X extractor) |
Modifier and Type | Method and Description |
---|---|
IObjectArray |
extractEntries()
Get the array with contents of the collection
|
int[] |
extractEntryIds()
Get the object Ids (int) of the contents of the collection
|
Integer |
getCapacity()
Get the capacity of the collection
|
String |
getClassSpecificName()
Get class specific name of this object which depends on the availability
of the appropriate name resolver, e.g.
|
IClass |
getClazz()
Get class snapshot object this object is an instance of.
|
String |
getDisplayName()
Get concatenation of
IObject.getTechnicalName() and
IObject.getClassSpecificName() . |
Double |
getFillRatio()
Get the ratio to which the collection is filled (for collections which
preallocates a certain capacity)
|
GCRootInfo[] |
getGCRootInfo()
Get
GCRootInfo if the object is a garbage collection root or null
otherwise. |
long |
getObjectAddress()
Get address for the snapshot object.
|
int |
getObjectId()
Get id for the snapshot object.
|
List<NamedReference> |
getOutboundReferences()
Get list of snapshot objects referenced from this snapshot object with
the name of the field over which it was referenced.
|
long |
getRetainedHeapSize()
Get retained heap size of this object.
|
ISnapshot |
getSnapshot()
Returns the snapshot from which this object has been read.
|
String |
getTechnicalName()
Get technical name of this object which is something like class@address.
|
long |
getUsedHeapSize()
Get used heap size of just this object.
|
boolean |
hasCapacity()
Check if the collection has a capacity property, i.e.
|
boolean |
hasExtractableArray()
Check if the contents of the collection can be extracted as an array
(e.g.
|
boolean |
hasExtractableContents()
Check if the the contents of the collection can be extracted
|
boolean |
hasFillRatio()
Check if the collision ration can be calculated for the collection
|
boolean |
hasSize()
Check if the collection has a size property
|
Boolean |
isEmpty()
Check if the collection is empty
|
Object |
resolveValue(String field)
Resolves and returns the value of a field specified by a dot notation.
|
Integer |
size()
Get the size of the collection
|
String |
toString() |
public boolean hasSize()
public boolean hasExtractableContents()
public boolean hasExtractableArray()
public boolean hasCapacity()
public boolean hasFillRatio()
public Integer getCapacity()
public Integer size()
public Double getFillRatio()
public Boolean isEmpty()
public int[] extractEntryIds()
public IObjectArray extractEntries()
public long getRetainedHeapSize()
IObject
getRetainedHeapSize
in interface IObject
public long getUsedHeapSize()
IObject
getUsedHeapSize
in interface IObject
public int getObjectId()
IObject
int
(this helps
reducing the memory footprint of the snapshot considerably - addresses
are only used for visualization purposes).getObjectId
in interface IObject
public long getObjectAddress()
IObject
long
), have no consecutive order (with gaps), and are not
used for hashing.getObjectAddress
in interface IObject
public IClass getClazz()
IObject
public String getTechnicalName()
IObject
getTechnicalName
in interface IObject
public String getClassSpecificName()
IObject
getClassSpecificName
in interface IObject
public String getDisplayName()
IObject
IObject.getTechnicalName()
and
IObject.getClassSpecificName()
.getDisplayName
in interface IObject
IObject.getTechnicalName()
and
IObject.getClassSpecificName()
public List<NamedReference> getOutboundReferences()
IObject
getOutboundReferences
in interface IObject
public Object resolveValue(String field) throws SnapshotException
IObject
The field can be specified using the dot notation, i.e. object references are followed and its fields are evaluated. If any of the object references is null, null is returned.
resolveValue
in interface IObject
field
- the field name in dot notationSnapshotException
public GCRootInfo[] getGCRootInfo() throws SnapshotException
IObject
GCRootInfo
if the object is a garbage collection root or null
otherwise. An object may or may not be a garbage collection root, it may
even be one for multiple reasons (described in the GCRootInfo
object).getGCRootInfo
in interface IObject
GCRootInfo
if the object is a garbage collection root or
null otherwiseSnapshotException
public ISnapshot getSnapshot()
IObject
getSnapshot
in interface IObject