com.android.ddmlib
Class AllocationInfo

java.lang.Object
  extended by com.android.ddmlib.AllocationInfo
All Implemented Interfaces:
IStackTraceInfo

public class AllocationInfo
extends java.lang.Object
implements IStackTraceInfo

Holds an Allocation information.


Nested Class Summary
static class AllocationInfo.AllocationSorter
           
static class AllocationInfo.SortMode
           
 
Method Summary
 boolean allocatedClassMatches(java.lang.String pattern, java.util.Locale locale)
           
 int compareTo(AllocationInfo otherAlloc)
           
 boolean filter(java.lang.String filter, boolean fullTrace, java.util.Locale locale)
          Returns true if the given filter matches case insensitively (according to the given locale) this allocation info.
 java.lang.String getAllocatedClass()
          Returns the name of the allocated class.
 java.lang.String getAllocationSite()
           
 int getAllocNumber()
          Returns the allocation number.
 java.lang.String getFirstTraceClassName()
           
 java.lang.String getFirstTraceMethodName()
           
 java.util.List<java.lang.String> getMatchingStackFrames(java.lang.String filter, boolean fullTrace, java.util.Locale locale)
           
 int getSize()
          Returns the size of the allocation.
 java.lang.StackTraceElement[] getStackTrace()
          Returns the stack trace.
 short getThreadId()
          Returns the id of the thread that performed the allocation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAllocNumber

public int getAllocNumber()
Returns the allocation number. Allocations are numbered as they happen with the most recent one having the highest number


getAllocatedClass

public java.lang.String getAllocatedClass()
Returns the name of the allocated class.


getSize

public int getSize()
Returns the size of the allocation.


getThreadId

public short getThreadId()
Returns the id of the thread that performed the allocation.


getStackTrace

public java.lang.StackTraceElement[] getStackTrace()
Description copied from interface: IStackTraceInfo
Returns the stack trace. This can be null.

Specified by:
getStackTrace in interface IStackTraceInfo

compareTo

public int compareTo(AllocationInfo otherAlloc)

getAllocationSite

@Nullable
public java.lang.String getAllocationSite()

getFirstTraceClassName

public java.lang.String getFirstTraceClassName()

getFirstTraceMethodName

public java.lang.String getFirstTraceMethodName()

filter

public boolean filter(java.lang.String filter,
                      boolean fullTrace,
                      java.util.Locale locale)
Returns true if the given filter matches case insensitively (according to the given locale) this allocation info.


allocatedClassMatches

public boolean allocatedClassMatches(@NonNull
                                     java.lang.String pattern,
                                     @NonNull
                                     java.util.Locale locale)

getMatchingStackFrames

@NonNull
public java.util.List<java.lang.String> getMatchingStackFrames(@NonNull
                                                                       java.lang.String filter,
                                                                       boolean fullTrace,
                                                                       @NonNull
                                                                       java.util.Locale locale)