From: Pavel V. <va...@us...> - 2002-03-22 11:25:30
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv22446/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data Modified Files: AllocTypeData.java Log Message: name of type added Index: AllocTypeData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTypeData.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** AllocTypeData.java 4 Mar 2002 23:59:54 -0000 1.6 --- AllocTypeData.java 22 Mar 2002 11:25:23 -0000 1.7 *************** *** 37,40 **** --- 37,45 ---- */ private int arrayType; //PENDING + + private String name; //PENDING methods that retutn this + private boolean isArray; + private boolean isPrimitiveArray; + /** * Map of methods where instance of this type (class or array of classes) were allocated. *************** *** 62,65 **** --- 67,109 ---- methods=Collections.EMPTY_MAP; threads=Collections.EMPTY_MAP; + + isArray = true; + isPrimitiveArray = classData == null; + switch ( arrayType ) { + case IProf.JVMPI_NORMAL_OBJECT: + name = classData.getName(); + isArray = false; + break; + case IProf.JVMPI_CLASS: + name = "[" + classData.getName(); + break; + case IProf.JVMPI_BOOLEAN: + name = "[Z"; + break; + case IProf.JVMPI_BYTE: + name = "[B"; + break; + case IProf.JVMPI_CHAR: + name = "[C"; + break; + case IProf.JVMPI_SHORT: + name = "[S"; + break; + case IProf.JVMPI_INT: + name = "[I"; + break; + case IProf.JVMPI_LONG: + name = "[J"; + break; + case IProf.JVMPI_FLOAT: + name = "[F"; + break; + case IProf.JVMPI_DOUBLE: + name = "[D"; + break; + default: + name = ""; + } + } *************** *** 157,164 **** --- 201,219 ---- } + public String getName() { + return name; + } + + public boolean isArray() { + return isArray; + } + } /* * $Log$ + * Revision 1.7 2002/03/22 11:25:23 vachis + * name of type added + * * Revision 1.6 2002/03/04 23:59:54 vachis * removed/delayed allocation, use of Collections.EMPTY_MAP |