1 |
/* Proxy.java -- build a proxy class that implements reflected interfaces |
/* Proxy.java -- build a proxy class that implements reflected interfaces |
2 |
Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. |
Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
38 |
|
|
39 |
package java.lang.reflect; |
package java.lang.reflect; |
40 |
|
|
41 |
|
import gnu.classpath.Configuration; |
42 |
|
import gnu.java.lang.reflect.TypeSignature; |
43 |
|
|
44 |
import java.io.Serializable; |
import java.io.Serializable; |
45 |
import java.security.ProtectionDomain; |
import java.security.ProtectionDomain; |
|
import java.util.Map; |
|
46 |
import java.util.HashMap; |
import java.util.HashMap; |
|
import java.util.Set; |
|
47 |
import java.util.HashSet; |
import java.util.HashSet; |
48 |
import java.util.Iterator; |
import java.util.Iterator; |
49 |
import gnu.classpath.Configuration; |
import java.util.Map; |
50 |
import gnu.java.lang.reflect.TypeSignature; |
import java.util.Set; |
51 |
|
|
52 |
/** |
/** |
53 |
* This class allows you to dynamically create an instance of any (or |
* This class allows you to dynamically create an instance of any (or |
154 |
* @see InvocationHandler |
* @see InvocationHandler |
155 |
* @see UndeclaredThrowableException |
* @see UndeclaredThrowableException |
156 |
* @see Class |
* @see Class |
157 |
* @author Eric Blake <ebb9@email.byu.edu> |
* @author Eric Blake (ebb9@email.byu.edu) |
158 |
* @since 1.3 |
* @since 1.3 |
159 |
* @status updated to 1.4, except for the use of ProtectionDomain |
* @status updated to 1.4, except for the use of ProtectionDomain |
160 |
*/ |
*/ |
1303 |
* implies the bootstrap class loader |
* implies the bootstrap class loader |
1304 |
* @return the proxy class Class object |
* @return the proxy class Class object |
1305 |
*/ |
*/ |
1306 |
final Class generate(ClassLoader loader) |
Class generate(ClassLoader loader) |
1307 |
{ |
{ |
1308 |
byte[] bytecode = new byte[pool.length() + stream.length()]; |
byte[] bytecode = new byte[pool.length() + stream.length()]; |
1309 |
// More efficient to bypass calling charAt() repetitively. |
// More efficient to bypass calling charAt() repetitively. |