@@ -115,7 +115,7 @@ private static class JSClass {
115115 public String __CLASS_NAME__ ;
116116 }
117117 private JSClass $clazz$ ; // BH SwingJS
118- private String [] $methodList$ ; // BH SwingJS for proxy interfaces
118+ public String [] $methodList$ ; // BH see j2sClazz.js Clazz.getClass, from interface parameters
119119
120120// private static native void registerNatives();
121121//
@@ -139,6 +139,7 @@ private Class() {
139139 *
140140 * @return a string representation of this class object.
141141 */
142+ @ Override
142143 public String toString () {
143144 return (isInterface () ? "interface " : (isPrimitive () ? "" : "class " )) + getName ();
144145 }
@@ -769,7 +770,7 @@ ClassLoader getClassLoader0() {
769770 * Specification, 3rd edition
770771 * @since 1.5
771772 */
772- @ SuppressWarnings ( "unchecked" )
773+ @ Override
773774 public TypeVariable <Class <T >>[] getTypeParameters () {
774775// if (getGenericSignature() != null)
775776// return (TypeVariable<Class<T>>[]) getGenericInfo().getTypeParameters();
@@ -1811,7 +1812,7 @@ private void addField(Field[] fields, String m, int modifiers) {
18111812 *
18121813 * @param name
18131814 * the name of the method
1814- * @param parameterTypes
1815+ * @param paramTypes
18151816 * the list of parameters
18161817 * @return the {@code Method} object that matches the specified {@code name}
18171818 * and {@code parameterTypes}
@@ -1852,7 +1853,7 @@ public Method getMethod(String name, Class<?>... paramTypes) throws NoSuchMethod
18521853 Method m = new Method (this , name , paramTypes , null , null , 0 );
18531854 if (!isInterface ()) {
18541855 Object o = null ;
1855- String qname = name + argumentTypesToString ( paramTypes );
1856+ String qname = m . getSignature ( );
18561857 /**
18571858 * @j2sNative
18581859 *
@@ -1925,15 +1926,11 @@ public Method getMethod(String name, Class<?>... paramTypes) throws NoSuchMethod
19251926 *
19261927 * @since JDK1.1
19271928 */
1928- @ SuppressWarnings ("unchecked" )
19291929 public Constructor <T > getConstructor (Class <?>... parameterTypes ) throws NoSuchMethodException , SecurityException {
19301930 // be very careful not to change the stack depth of this
19311931 // checkMemberAccess call for security reasons
19321932 // see java.lang.SecurityManager.checkMemberAccess
19331933// checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader());
1934- Class <?>[] x = parameterTypes ;
1935- if (parameterTypes == null )
1936- parameterTypes = new Class <?>[0 ];
19371934 return new Constructor (this , parameterTypes , new Class <?>[0 ], Member .PUBLIC );
19381935// return getConstructor0(parameterTypes, Member.PUBLIC);
19391936 }
@@ -3218,6 +3215,8 @@ public static String argumentTypesToString(Class<?>[] parameterTypes) {
32183215// */
32193216// private static final ObjectStreamField[] serialPersistentFields = new ObjectStreamField[0];
32203217
3218+ public static final Class <?>[] NO_PARAMETERS = new Class <?>[0 ];
3219+
32213220// /**
32223221// * Returns the assertion status that would be assigned to this class if it
32233222// * were to be initialized at the time this method is invoked. If this class
@@ -3295,7 +3294,7 @@ public boolean isEnum() {
32953294// private static ReflectionFactory reflectionFactory;
32963295//
32973296 // To be able to query system properties as soon as they're available
3298- private static boolean initted = false ;
3297+ // private static boolean initted = false;
32993298
33003299// private static void checkInitted() {
33013300// if (initted)
@@ -3558,8 +3557,9 @@ public boolean equals(Object o) {
35583557 /**
35593558 * A SwingJS method for Constructor and Method
35603559 *
3561- * @param parameterTypes
3560+ * @param types
35623561 * @param args
3562+ * @param isProxy
35633563 * @return
35643564 */
35653565 public static Object [] getArgumentArray (Class <?>[] types , Object [] args , boolean isProxy ) {
0 commit comments