Update of /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/nodes
In directory usw-pr-cvs1:/tmp/cvs-serv2847
Modified Files:
InterfaceRepository.java
Log Message:
hasAlloc, hasCPU and hasMon
Index: InterfaceRepository.java
===================================================================
RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/nodes/InterfaceRepository.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** InterfaceRepository.java 28 Aug 2002 18:02:38 -0000 1.1
--- InterfaceRepository.java 31 Aug 2002 08:41:42 -0000 1.2
***************
*** 38,45 ****
import net.sourceforge.javaprofiler.jpi.*;
! class InterfaceRepository {
private static boolean isInit=false;
private static Map class2Type=null;
public static int objectType(Object sample) {
init();
--- 38,51 ----
import net.sourceforge.javaprofiler.jpi.*;
! /** This class provides static methods that describe JPI objects. It is used for
! * higher-order working with JPI objects and for presenting these objects to
! * end use.
! * @author Lukas Petru
! */
! public class InterfaceRepository {
private static boolean isInit=false;
private static Map class2Type=null;
+ /** Returns a JPI constant which describes an object instance. */
public static int objectType(Object sample) {
init();
***************
*** 54,57 ****
--- 60,64 ----
}
+ /** Returns a list of child types which a selected object type provides. */
public static int[] getChildTypes(int type) {
switch(type) {
***************
*** 89,92 ****
--- 96,102 ----
}
+ /** Returns a name of a list which holds children of selected method. The
+ * concrete getter method name is expressed as "get"+getListName().
+ */
public static String getListName(int type) {
switch(type) {
***************
*** 121,124 ****
--- 131,135 ----
}
+ /** Returns an icon base for graphical list selector. */
public static String getSelectorIconBase(int type) {
switch(type) {
***************
*** 127,132 ****
"FramesNodeIcon";
default:
! return "/org/openide/resources/localFS";
}
}
--- 138,188 ----
"FramesNodeIcon";
default:
! return "/net/sourceforge/javaprofiler/module/resources/" +
! "PSelectorIcon";
! }
! }
!
! /** Tells if it makes sense to sort children of this type. */
! public static boolean canSort(int type) {
! switch(type) {
! case Constants.FRAME:
! return false;
! }
! return true;
! }
!
! /** Tells if a type provides Alloc statistic information. */
! public static boolean hasAlloc(int type) {
! switch(type) {
! case Constants.THREAD:
! case Constants.TYPE:
! case Constants.ALLOC_TRACE:
! case Constants.ALLOC_TYPE_TRACE:
! case Constants.METHOD:
! return true;
! }
! return false;
! }
!
! /** Tells if a type provides CPU statistic information. */
! public static boolean hasCPU(int type) {
! switch(type) {
! case Constants.CPU_TRACE:
! case Constants.CPU_THREAD_TRACE:
! case Constants.METHOD:
! return true;
! }
! return false;
! }
!
! /** Tells if a type provides Mon statistic information. */
! public static boolean hasMon(int type) {
! switch(type) {
! case Constants.MON_TRACE:
! case Constants.MON_THREAD_TRACE:
! case Constants.METHOD:
! return true;
}
+ return false;
}
***************
*** 166,169 ****
--- 222,228 ----
/*
* $Log$
+ * Revision 1.2 2002/08/31 08:41:42 petrul
+ * hasAlloc, hasCPU and hasMon
+ *
* Revision 1.1 2002/08/28 18:02:38 petrul
* nodes, version 2
|