ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boisv...@apache.org
Subject svn commit: r545262 - in /incubator/ode/trunk: bpel-obj/src/main/java/org/apache/ode/bpel/o/ jacob/src/main/java/org/apache/ode/jacob/soup/ utils/src/main/java/org/apache/ode/utils/
Date Thu, 07 Jun 2007 18:36:16 GMT
Author: boisvert
Date: Thu Jun  7 11:36:15 2007
New Revision: 545262

URL: http://svn.apache.org/viewvc?view=rev&rev=545262
Log:
Use Class.getSimpleName()

Modified:
    incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OActivity.java
    incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OBase.java
    incubator/ode/trunk/jacob/src/main/java/org/apache/ode/jacob/soup/CommChannel.java
    incubator/ode/trunk/utils/src/main/java/org/apache/ode/utils/ObjectPrinter.java

Modified: incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OActivity.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OActivity.java?view=diff&rev=545262&r1=545261&r2=545262
==============================================================================
--- incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OActivity.java (original)
+++ incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OActivity.java Thu Jun
 7 11:36:15 2007
@@ -39,7 +39,7 @@
     private OActivity parent;
 
     public String getType() {
-        return ObjectPrinter.getShortClassName(getClass());
+        return getClass().getSimpleName();
     }
 
     public OActivity(OProcess owner, OActivity parent) {

Modified: incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OBase.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OBase.java?view=diff&rev=545262&r1=545261&r2=545262
==============================================================================
--- incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OBase.java (original)
+++ incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OBase.java Thu Jun  7
11:36:15 2007
@@ -68,7 +68,7 @@
     }
 
     public String toString() {
-        StringBuffer buf = new StringBuffer(ObjectPrinter.getShortClassName(this));
+        StringBuffer buf = new StringBuffer(getClass().getSimpleName());
         buf.append('#');
         buf.append(_id);
         return buf.toString();

Modified: incubator/ode/trunk/jacob/src/main/java/org/apache/ode/jacob/soup/CommChannel.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/jacob/src/main/java/org/apache/ode/jacob/soup/CommChannel.java?view=diff&rev=545262&r1=545261&r2=545262
==============================================================================
--- incubator/ode/trunk/jacob/src/main/java/org/apache/ode/jacob/soup/CommChannel.java (original)
+++ incubator/ode/trunk/jacob/src/main/java/org/apache/ode/jacob/soup/CommChannel.java Thu
Jun  7 11:36:15 2007
@@ -39,7 +39,7 @@
     }
 
     public String toString() {
-        StringBuffer buf = new StringBuffer(ObjectPrinter.getShortClassName(_type));
+        StringBuffer buf = new StringBuffer(_type.getSimpleName());
         if (getDescription() != null) {
             buf.append(':').append(getDescription());
         }

Modified: incubator/ode/trunk/utils/src/main/java/org/apache/ode/utils/ObjectPrinter.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/utils/src/main/java/org/apache/ode/utils/ObjectPrinter.java?view=diff&rev=545262&r1=545261&r2=545262
==============================================================================
--- incubator/ode/trunk/utils/src/main/java/org/apache/ode/utils/ObjectPrinter.java (original)
+++ incubator/ode/trunk/utils/src/main/java/org/apache/ode/utils/ObjectPrinter.java Thu Jun
 7 11:36:15 2007
@@ -29,35 +29,6 @@
  * @author Maciej Szefler <a href="mailto:mbs@fivesight.com">mbs</a>
  */
 public class ObjectPrinter {
-  /**
-   * Get a the short (without package) class name.
-   *
-   * @param o some non-null object
-   *
-   * @return short class name of given object
-   */
-  public static String getShortClassName(Object o) {
-    return getShortClassName(o.getClass());
-  }
-
-  /**
-   * Get a the short (without package) class name.
-   *
-   * @param clazz some {@link Class} object
-   *
-   * @return short class name of given class
-   */
-  public static String getShortClassName(Class clazz) {
-    String clsName = clazz.getName();
-    String pkgName = clazz.getPackage()
-                          .getName();
-
-    if ((pkgName != null) && (pkgName.length() > 0)) {
-      clsName = clsName.substring(pkgName.length() + 1);
-    }
-
-    return clsName;
-  }
 
   /**
    * Generate a default trace message for method entry.
@@ -124,7 +95,7 @@
    */
   public static String toString(Object thiz, Object[] objects) {
     StringBuffer buf = new StringBuffer("{");
-    buf.append(getShortClassName(thiz));
+    buf.append(thiz.getClass().getSimpleName());
     buf.append(' ');
     buf.append(stringifyNvList(objects));
     buf.append('}');



Mime
View raw message