FileDocCategorySizeDatePackage
RootObj.javaAPI DocAndroid 5.1 API2720Thu Mar 12 22:18:30 GMT 2015com.android.hit

RootObj

public class RootObj extends Instance

Fields Summary
RootType
mType
int
mIndex
int
mThread
long
mParent
String
mComment
Constructors Summary
public RootObj(RootType type)


       
        this(type, 0, 0, null);
    
public RootObj(RootType type, long id)

        this(type, id, 0, null);
    
public RootObj(RootType type, long id, int thread, StackTrace stack)

        mType = type;
        mId = id;
        mThread = thread;
        mStack = stack;
    
Methods Summary
public final java.lang.StringgetClassName(State state)

        ClassObj theClass;

        if (mType == RootType.SYSTEM_CLASS) {
            theClass = state.findClass(mId);
        } else {
            Instance instance = state.findReference(mId);

            theClass = state.findClass(instance.mClassId);
        }

        if (theClass == null) {
            return "no class defined!!";
        }

        return theClass.mClassName;
    
public final intgetSize()

        Instance instance = null;

        if (mType == RootType.SYSTEM_CLASS) {
            instance = mHeap.mState.findClass(mId);
        } else {
            instance = mHeap.mState.findReference(mId);
        }

        if (instance == null) {
            return 0;
        }

        return instance.getSize();
    
public final java.lang.StringgetTypeName()

        return "root " + mType.getName();
    
public final voidresolveReferences(State state)

        //  Nothing to do here
    
public final java.lang.StringtoString()

        return String.format("%s@0x08x", mType.getName(), mId);
    
public final voidvisit(java.util.Set resultSet, Filter filter)

        if (resultSet.contains(this)) {
            return;
        }

        if (filter != null) {
            if (filter.accept(this)) {
                resultSet.add(this);
            }
        } else {
            resultSet.add(this);
        }