MCPcopy Create free account
hub / github.com/ReadyTalk/avian / getProxyClass

Method getProxyClass

classpath/java/lang/reflect/Proxy.java:50–71  ·  view source on GitHub ↗
(ClassLoader loader,
                                    Class ... interfaces)

Source from the content-addressed store, hash-verified

48 }
49
50 public static Class getProxyClass(ClassLoader loader,
51 Class ... interfaces)
52 {
53 for (Class c: interfaces) {
54 if (! c.isInterface()) {
55 throw new IllegalArgumentException();
56 }
57 }
58
59 int number;
60 synchronized (Proxy.class) {
61 number = nextNumber++;
62 }
63
64 try {
65 return makeClass(loader, interfaces, "Proxy-" + number);
66 } catch (IOException e) {
67 AssertionError error = new AssertionError();
68 error.initCause(e);
69 throw error;
70 }
71 }
72
73 public static boolean isProxyClass(Class c) {
74 return c.getName().startsWith("Proxy-");

Callers 2

testComplexAnnotationMethod · 0.95
newProxyInstanceMethod · 0.95

Calls 3

makeClassMethod · 0.95
initCauseMethod · 0.80
isInterfaceMethod · 0.45

Tested by 1

testComplexAnnotationMethod · 0.76