* gnu/classpath/jdwp/util/Signature.java
authorAaron Luchko <aluchko@redhat.com>
Thu, 7 Jul 2005 23:16:37 +0000 (23:16 +0000)
committerAaron Luchko <aluchko@gcc.gnu.org>
Thu, 7 Jul 2005 23:16:37 +0000 (23:16 +0000)
        (computeFieldSignature): New Method.

From-SVN: r101745

libjava/ChangeLog
libjava/gnu/classpath/jdwp/util/Signature.java

index adb8e0d256ab016e81ad60e57dff6f0ff04315af..14c9a23563341fbff9b0b34ceb39a7dd2d334eee 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-07  Aaron Luchko  <aluchko@redhat.com>
+
+       * gnu/classpath/jdwp/util/Signature.java
+       (computeFieldSignature): New Method.
+
 2005-07-07  Aaron Luchko  <aluchko@redhat.com>
 
        * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java:New
index e65095b855d667a04f0a939e33c874eac14a334d..36445c318415934d68690f2ce6dd4d741b48c6ca 100644 (file)
@@ -39,6 +39,7 @@ exception statement from your version. */
 
 package gnu.classpath.jdwp.util;
 
+import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 
 /**
@@ -63,6 +64,19 @@ public class Signature
     return sb.toString ();
   }
 
+  /**
+   * Computes the field signature which is just the class signature of the
+   * field's type, ie a Field of type java.lang.String this will return
+   * "Ljava/lang/String;".
+   *
+   * @param field  the field for which to compute the signature
+   * @return       the field's type signature
+   */
+  public static String computeFieldSignature (Field field)
+  {
+    return computeClassSignature (field.getType());
+  }
+
   /**
    * Computes the method signature, i.e., java.lang.String.split (String, int)
    * returns "(Ljava/lang/String;I)[Ljava/lang/String;"