summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authoraluchko <aluchko@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-07 23:16:37 +0000
committeraluchko <aluchko@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-07 23:16:37 +0000
commitde9e987fd382e6c56f004ad11a1c4d24a2fe4210 (patch)
tree62f6582249c1c11ed8cd4a2efba11a93188e67a4 /libjava
parentaabb1479c12b400626663b0ed8b4bd9ea5bb6102 (diff)
downloadgcc-de9e987fd382e6c56f004ad11a1c4d24a2fe4210.tar.gz
* gnu/classpath/jdwp/util/Signature.java
(computeFieldSignature): New Method. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101745 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/gnu/classpath/jdwp/util/Signature.java14
2 files changed, 19 insertions, 0 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index adb8e0d256a..14c9a235633 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,5 +1,10 @@
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
file.
diff --git a/libjava/gnu/classpath/jdwp/util/Signature.java b/libjava/gnu/classpath/jdwp/util/Signature.java
index e65095b855d..36445c31841 100644
--- a/libjava/gnu/classpath/jdwp/util/Signature.java
+++ b/libjava/gnu/classpath/jdwp/util/Signature.java
@@ -39,6 +39,7 @@ exception statement from your version. */
package gnu.classpath.jdwp.util;
+import java.lang.reflect.Field;
import java.lang.reflect.Method;
/**
@@ -64,6 +65,19 @@ public class Signature
}
/**
+ * 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;"
*