com.jrockit.memleak
Interface IMemleakValueFactory

All Known Implementing Classes:
DelegatingValueFactory, InfoCachingFactory, NameMappingCacheFactory, ValueFactory

public interface IMemleakValueFactory

Factory interface for creating memleak value objects.

Author:
Markus Persson 2008

Method Summary
 IArrayInfo createArrayInfo(int objectID, IClassInfo classInfo, int length)
          Create an IArrayInfo value object.
 IArraySizeInfo createArraySizeInfo(IArrayInfo arrayInfo, long size)
          Create IArraySizeInfo value object.
 IClassInfo createClassInfo(int classID, java.lang.String name, int modifiers, int numDeclaredStaticFields, int numInstanceFields, java.lang.String srcFileName, IObjectSpecifier classLoaderSpec)
          Create IClassInfo value object.
 IFieldInfo createFieldInfo(IClassInfo declaringClassInfo, java.lang.String name, int modifiers)
          Create IFieldInfo value object.
 IHeapHistogram createHeapHistogram(int numInstances, long size, float growthRate, long creationMillis, java.util.List<ITypeHeapInfo<IClassInfo>> heapInfos, java.util.Collection<ITypeHeapInfo<? extends INamedType>> groupedHeapInfos)
          Create IHeapHistogram value object.
 IInstanceReferrers createInstanceReferrers(IObjectInfo targetInfo, IObjectInfo[] ois, IStaticField[] staticFields, IThreadRoot[] threadRoots, int globalHandles)
          Create IInstanceReferrers value object.
 ILocation createLocation(IMethodInfo methodInfo, int line)
          Create a ILocation value object.
 IMethodInfo createMethodInfo(IClassInfo declaringClassInfo, java.lang.String name, java.lang.String descriptor, int modifiers)
          Create a IMethodInfo value object.
 IObjectInfo createObjectInfo(int objectID, IClassInfo classInfo)
          Create a IObjectInfo value object.
 IPointToTypeInfo createPointToTypeInfo(IClassInfo referredType, int refInstances, int[] instances, IClassInfo[] referrers, int totalRef)
          Create IPointToTypeInfo value object.
 IFieldValue createPrimitiveFieldValue(IFieldInfo info, java.lang.Object valueWrapper)
          Create IFieldValue primitive value object.
 IValue createPrimitiveValue(java.lang.Object valueWrapper)
          Create IValue primitive value object.
 IFieldValue createReferenceFieldValue(IFieldInfo info, IObjectInfo value)
          Create IFieldValue reference value object.
 IValue createReferenceValue(IObjectInfo value)
          Create IValue reference value object.
 IRelationshipInfo createRelationshipInfo(IObjectInfo fromInfo, long keepalive_size)
          Create IRelationshipInfo value object.
 IStaticField createStaticField(IClassInfo declaringClassInfo, java.lang.String fieldName, int modifiers)
          Create IStaticField value object.
 IThreadRoot createThreadRoot(java.lang.String name, IMethodInfo methodInfo)
          Create IThreadRoot value object.
 ITrace createTrace(int count, ILocation[] stack)
          Create ITrace value object.
 ITypeHeapInfo<IClassInfo> createTypeHeapInfo(IClassInfo classInfo, int numInstances, long size, float growthRate, long creationMillis)
          Create ITypeHeapInfo value object.
 boolean markDiscarded(IObjectInfo objectInfo)
          Mark the given objectInfo as discarded, if possible and if (it is likely that) the objectInfo was created by this factory.
 

Method Detail

createArrayInfo

IArrayInfo createArrayInfo(int objectID,
                           IClassInfo classInfo,
                           int length)
Create an IArrayInfo value object.

IClassInfo.isArrayClass() for classInfo must be true, or IllegalArgumentException will be thrown.

Note that if length is unknown (-1), createObjectInfo(int, IClassInfo) may be called instead.

Parameters:
objectID -
classInfo -
length -
Returns:
IArrayInfo
See Also:
createObjectInfo(int, IClassInfo)

createArraySizeInfo

IArraySizeInfo createArraySizeInfo(IArrayInfo arrayInfo,
                                   long size)
Create IArraySizeInfo value object.

Parameters:
arrayInfo -
size -
Returns:
IArraySizeInfo

createFieldInfo

IFieldInfo createFieldInfo(IClassInfo declaringClassInfo,
                           java.lang.String name,
                           int modifiers)
Create IFieldInfo value object.

Parameters:
declaringClassInfo - the class which defines this field
name -
modifiers - access modifiers, per Modifier
Returns:
IFieldInfo

createReferenceFieldValue

IFieldValue createReferenceFieldValue(IFieldInfo info,
                                      IObjectInfo value)
Create IFieldValue reference value object.

Parameters:
info -
value -
Returns:
IFieldValue

createPrimitiveFieldValue

IFieldValue createPrimitiveFieldValue(IFieldInfo info,
                                      java.lang.Object valueWrapper)
Create IFieldValue primitive value object.

Parameters:
info -
valueWrapper -
Returns:
IFieldValue

createHeapHistogram

IHeapHistogram createHeapHistogram(int numInstances,
                                   long size,
                                   float growthRate,
                                   long creationMillis,
                                   java.util.List<ITypeHeapInfo<IClassInfo>> heapInfos,
                                   java.util.Collection<ITypeHeapInfo<? extends INamedType>> groupedHeapInfos)
Create IHeapHistogram value object.

Parameters:
numInstances -
size -
growthRate -
creationMillis -
heapInfos -
groupedHeapInfos -
Returns:
IHeapHistogram

createInstanceReferrers

IInstanceReferrers createInstanceReferrers(IObjectInfo targetInfo,
                                           IObjectInfo[] ois,
                                           IStaticField[] staticFields,
                                           IThreadRoot[] threadRoots,
                                           int globalHandles)
Create IInstanceReferrers value object.

Parameters:
targetInfo -
ois -
staticFields -
threadRoots -
globalHandles -
Returns:
IInstanceReferrers

createLocation

ILocation createLocation(IMethodInfo methodInfo,
                         int line)
Create a ILocation value object.

Parameters:
methodInfo -
line -
Returns:
ILocation

createMethodInfo

IMethodInfo createMethodInfo(IClassInfo declaringClassInfo,
                             java.lang.String name,
                             java.lang.String descriptor,
                             int modifiers)
Create a IMethodInfo value object.

Parameters:
declaringClassInfo -
name -
descriptor -
modifiers -
Returns:
IMethodInfo

createObjectInfo

IObjectInfo createObjectInfo(int objectID,
                             IClassInfo classInfo)
Create a IObjectInfo value object.

If IClassInfo.isArrayClass() for classInfo is true, an IArrayInfo must be returned, with the length set to the uninitialized value -1. The instance should preferably also implement IModifyOnce.

Parameters:
objectID -
classInfo -
Returns:
IObjectInfo

createClassInfo

IClassInfo createClassInfo(int classID,
                           java.lang.String name,
                           int modifiers,
                           int numDeclaredStaticFields,
                           int numInstanceFields,
                           java.lang.String srcFileName,
                           IObjectSpecifier classLoaderSpec)
Create IClassInfo value object.

Parameters:
classID -
name -
modifiers -
numDeclaredStaticFields -
numInstanceFields -
srcFileName -
classLoaderSpec - or null if unknown
Returns:
IClassInfo

createPointToTypeInfo

IPointToTypeInfo createPointToTypeInfo(IClassInfo referredType,
                                       int refInstances,
                                       int[] instances,
                                       IClassInfo[] referrers,
                                       int totalRef)
Create IPointToTypeInfo value object.

Parameters:
referredType -
refInstances -
instances -
referrers -
totalRef -
Returns:
IPointToTypeInfo

createRelationshipInfo

IRelationshipInfo createRelationshipInfo(IObjectInfo fromInfo,
                                         long keepalive_size)
Create IRelationshipInfo value object.

Parameters:
fromInfo -
keepalive_size -
Returns:
IRelationshipInfo

createStaticField

IStaticField createStaticField(IClassInfo declaringClassInfo,
                               java.lang.String fieldName,
                               int modifiers)
Create IStaticField value object.

Parameters:
declaringClassInfo -
fieldName -
modifiers -
Returns:
IStaticField

createThreadRoot

IThreadRoot createThreadRoot(java.lang.String name,
                             IMethodInfo methodInfo)
Create IThreadRoot value object.

Parameters:
name -
methodInfo -
Returns:
IThreadRoot

createTrace

ITrace createTrace(int count,
                   ILocation[] stack)
Create ITrace value object.

Parameters:
count -
stack -
Returns:
ITrace

createTypeHeapInfo

ITypeHeapInfo<IClassInfo> createTypeHeapInfo(IClassInfo classInfo,
                                             int numInstances,
                                             long size,
                                             float growthRate,
                                             long creationMillis)
Create ITypeHeapInfo value object.

Parameters:
classInfo -
numInstances -
size -
growthRate -
creationMillis -
Returns:
ITypeHeapInfo

createReferenceValue

IValue createReferenceValue(IObjectInfo value)
Create IValue reference value object.

Parameters:
value -
Returns:
IValue

createPrimitiveValue

IValue createPrimitiveValue(java.lang.Object valueWrapper)
Create IValue primitive value object.

Parameters:
valueWrapper -
Returns:
IValue

markDiscarded

boolean markDiscarded(IObjectInfo objectInfo)
Mark the given objectInfo as discarded, if possible and if (it is likely that) the objectInfo was created by this factory. This method is here and not in IObjectInfo in order to require access to the factory.

Parameters:
objectInfo -
Returns:
true if the state changed


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.