On Sun, 2006-03-26 at 18:42 -0700, Tom Tromey wrote: > >>>>> "Tom" == Tom Tromey <[EMAIL PROTECTED]> writes: > > Tom> This is the patch to change Method/Field/Constructor to have a > Tom> 'getModifiersInternal' method, which returns the un-masked modifiers > Tom> as read from the .class file. This lets us implement the new > Tom> 1.5 reflection predicates such as isSynthetic. > > I'm checking this in now. > > VM folks, you will need some updates now, as Constructor et all will > now inherit an abstract isSynthetic method.
Since builder.classpath.org tries to build jamvm from CVS I have temporarily applied the attached patch there to get us dummy isSynthetic() methods till jamvm gets a real implementation. > I updated NEWS. Thanks, Mark
Index: lib/java/lang/reflect/Constructor.java
===================================================================
RCS file: /cvsroot/jamvm/jamvm/lib/java/lang/reflect/Constructor.java,v
retrieving revision 1.3
diff -u -r1.3 Constructor.java
--- lib/java/lang/reflect/Constructor.java 14 Nov 2005 03:15:08 -0000 1.3
+++ lib/java/lang/reflect/Constructor.java 27 Mar 2006 15:47:39 -0000
@@ -270,4 +270,10 @@
boolean noAccessCheck)
throws InstantiationException, IllegalAccessException,
InvocationTargetException;
+
+ public boolean isSynthetic()
+ {
+ return false;
+ }
+
}
Index: lib/java/lang/reflect/Field.java
===================================================================
RCS file: /cvsroot/jamvm/jamvm/lib/java/lang/reflect/Field.java,v
retrieving revision 1.3
diff -u -r1.3 Field.java
--- lib/java/lang/reflect/Field.java 14 Nov 2005 03:15:08 -0000 1.3
+++ lib/java/lang/reflect/Field.java 27 Mar 2006 15:47:39 -0000
@@ -647,4 +647,9 @@
private native void setCField(Object o, Class declaringClass, Class type, int slot, boolean noAccessCheck, int type_no, char c);
private native void setSField(Object o, Class declaringClass, Class type, int slot, boolean noAccessCheck, int type_no, short s);
private native void setBField(Object o, Class declaringClass, Class type, int slot, boolean noAccessCheck, int type_no, byte b);
+
+ public boolean isSynthetic()
+ {
+ return false;
+ }
}
Index: lib/java/lang/reflect/Method.java
===================================================================
RCS file: /cvsroot/jamvm/jamvm/lib/java/lang/reflect/Method.java,v
retrieving revision 1.3
diff -u -r1.3 Method.java
--- lib/java/lang/reflect/Method.java 14 Nov 2005 03:15:08 -0000 1.3
+++ lib/java/lang/reflect/Method.java 27 Mar 2006 15:47:39 -0000
@@ -363,4 +363,9 @@
Class[] parameterTypes, Class returnType,
int slot, boolean noAccessCheck)
throws IllegalAccessException, InvocationTargetException;
+
+ public boolean isSynthetic()
+ {
+ return false;
+ }
}
signature.asc
Description: This is a digitally signed message part
