From 466bb25416b88fabd5d4387b7c7e5cc1ece78b8c Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Fri, 14 Oct 2011 03:29:56 -0700 Subject: Proxy implementation This rounds out the proxy implementation by adding missing pieces to the class linker, extending tests and fixing issues in the runtime support. There are also some tweaks for performance and to clean up Method/Object a little. A unit test of the functionality is "art/test/run-test 044" Change-Id: Id94102d10b81cd9b12b95ba8618f6187490204c4 --- test/044-proxy/src/BasicTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/044-proxy/src/BasicTest.java') diff --git a/test/044-proxy/src/BasicTest.java b/test/044-proxy/src/BasicTest.java index 2a453c47f7..fa1896fd9a 100644 --- a/test/044-proxy/src/BasicTest.java +++ b/test/044-proxy/src/BasicTest.java @@ -22,6 +22,7 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Arrays; +import java.util.Comparator; /** * Do some basic tests. @@ -70,6 +71,11 @@ public class BasicTest { */ System.out.println(""); Method[] methods = proxy.getClass().getDeclaredMethods(); + Arrays.sort(methods, new Comparator() { + public int compare(Method o1, Method o2) { + return o1.getName().compareTo(o2.getName()); + } + }); System.out.println("Proxy methods: " + Arrays.deepToString(methods)); Method meth = methods[methods.length -1]; System.out.println("Decl annos: " + Arrays.deepToString(meth.getDeclaredAnnotations())); @@ -77,6 +83,11 @@ public class BasicTest { System.out.println("Param annos (" + paramAnnos.length + ") : " + Arrays.deepToString(paramAnnos)); Field[] fields = proxy.getClass().getDeclaredFields(); + Arrays.sort(fields, new Comparator() { + public int compare(Field o1, Field o2) { + return o1.getName().compareTo(o2.getName()); + } + }); System.out.println("Proxy fields: " + Arrays.deepToString(fields)); } -- cgit v1.2.3-59-g8ed1b