[jboss-cvs] JBoss Profiler SVN: r440 - branches/JBossProfiler2/src/main/org/jboss/profiler/as.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun May 11 10:38:57 EDT 2008


Author: jesper.pedersen
Date: 2008-05-11 10:38:57 -0400 (Sun, 11 May 2008)
New Revision: 440

Modified:
   branches/JBossProfiler2/src/main/org/jboss/profiler/as/Profiler.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/as/ProfilerMBean.java
Log:
Changed ProfilerMBean::addClasses(String,Visibility) to ProfilerMBean::addClasses(String,String)

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/as/Profiler.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/as/Profiler.java	2008-05-11 14:05:39 UTC (rev 439)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/as/Profiler.java	2008-05-11 14:38:57 UTC (rev 440)
@@ -160,9 +160,25 @@
    * @param classes The classes
    * @param v The visibility
    */
-  public void addClasses(String classes, Visibility v) {
+  public void addClasses(String classes, String v) {
     LocalHandler lh = new LocalHandler();
-    lh.handleCommand(new Command(CommandType.ADD_CLASSES, new Object[] { classes, v }));
+
+    if (v == null || v.trim().equals("")) {
+      v = "public";
+    }
+
+    Visibility vi = null;
+    if (v.equalsIgnoreCase("private")) {
+      vi = Visibility.PRIVATE;
+    } else if (v.equalsIgnoreCase("protected")) {
+      vi = Visibility.PROTECTED;
+    } else if (v.equalsIgnoreCase("package")) {
+      vi = Visibility.PACKAGE;
+    } else {
+      vi = Visibility.PUBLIC;
+    }
+
+    lh.handleCommand(new Command(CommandType.ADD_CLASSES, new Object[] { classes, vi }));
   }
 
   /**

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/as/ProfilerMBean.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/as/ProfilerMBean.java	2008-05-11 14:05:39 UTC (rev 439)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/as/ProfilerMBean.java	2008-05-11 14:38:57 UTC (rev 440)
@@ -114,7 +114,7 @@
    * @param classes The classes
    * @param v The visibility
    */
-  public void addClasses(String classes, Visibility v);
+  public void addClasses(String classes, String v);
 
   /**
    * Remove classes




More information about the jboss-cvs-commits mailing list