aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2006-08-14 14:48:47 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2006-08-14 14:48:47 +0000
commit7a730c89d7e58896d381dff5800c32a424c44b6b (patch)
tree38e9478bb90636fa7f895aea135c22afd5d96ed5
parent8a5fe21253fae4faa7746b9c81aac4db6e6c00c5 (diff)
downloadjavassist-7a730c89d7e58896d381dff5800c32a424c44b6b.tar.gz
javassist-7a730c89d7e58896d381dff5800c32a424c44b6b.zip
deprecated ClassPool#toClass(CtClass,ClassLoader).
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@310 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r--src/main/javassist/ClassPool.java13
-rw-r--r--src/main/javassist/CtClass.java3
-rw-r--r--src/main/javassist/util/proxy/FactoryHelper.java4
3 files changed, 11 insertions, 9 deletions
diff --git a/src/main/javassist/ClassPool.java b/src/main/javassist/ClassPool.java
index ba25f96e..1fb0082a 100644
--- a/src/main/javassist/ClassPool.java
+++ b/src/main/javassist/ClassPool.java
@@ -791,7 +791,9 @@ public class ClassPool {
* @see #getClassLoader()
*/
public Class toClass(CtClass clazz) throws CannotCompileException {
- return toClass(clazz, getClassLoader(), null);
+ // Some subclasses of ClassPool may override toClass(CtClass,ClassLoader).
+ // So we should call that method instead of toClass(.., ProtectionDomain).
+ return toClass(clazz, getClassLoader());
}
/**
@@ -825,13 +827,12 @@ public class ClassPool {
* work with a security manager or a signed jar file because a
* protection domain is not specified.
*
- * <p><b>Note:</b> A subclass of <code>ClassPool</code> that has been
- * overriding this method must be modified. It must override
+ * @deprecated Replaced by {@link #toClass(CtClass,ClassLoader,ProtectionDomain)}.
+ * A subclass of <code>ClassPool</code> that has been
+ * overriding this method should be modified. It should override
* {@link #toClass(CtClass,ClassLoader,ProtectionDomain)}.
- *
- * @deprecated Replaced by {@link #toClass(CtClass,ClassLoader,ProtectionDomain)}
*/
- public final Class toClass(CtClass ct, ClassLoader loader)
+ public Class toClass(CtClass ct, ClassLoader loader)
throws CannotCompileException
{
return toClass(ct, loader, null);
diff --git a/src/main/javassist/CtClass.java b/src/main/javassist/CtClass.java
index d7552002..91ad9968 100644
--- a/src/main/javassist/CtClass.java
+++ b/src/main/javassist/CtClass.java
@@ -1030,7 +1030,7 @@ public abstract class CtClass {
* work with a security manager or a signed jar file because a
* protection domain is not specified.
*
- * @see #toClass(java.lang.ClassLoader)
+ * @see #toClass(java.lang.ClassLoader,ProtectionDomain)
* @see ClassPool#toClass(CtClass)
*/
public Class toClass() throws CannotCompileException {
@@ -1066,6 +1066,7 @@ public abstract class CtClass {
* If it is null, the default domain created
* by <code>java.lang.ClassLoader</code> is used.
* @see ClassPool#toClass(CtClass,java.lang.ClassLoader)
+ * @since 3.3
*/
public Class toClass(ClassLoader loader, ProtectionDomain domain)
throws CannotCompileException
diff --git a/src/main/javassist/util/proxy/FactoryHelper.java b/src/main/javassist/util/proxy/FactoryHelper.java
index 21038fe9..4579f04e 100644
--- a/src/main/javassist/util/proxy/FactoryHelper.java
+++ b/src/main/javassist/util/proxy/FactoryHelper.java
@@ -24,7 +24,6 @@ import java.io.IOException;
import java.security.ProtectionDomain;
import javassist.CannotCompileException;
-import javassist.CtClass;
import javassist.bytecode.ClassFile;
/**
@@ -124,7 +123,7 @@ public class FactoryHelper {
* This method uses a default protection domain for the class
* but it may not work with a security manager or a sigend jar file.
*
- * @see #toClass(CtClass,ClassLoader,ProtectionDomain)
+ * @see #toClass(ClassFile,ClassLoader,ProtectionDomain)
*/
public static Class toClass(ClassFile cf, ClassLoader loader)
throws CannotCompileException
@@ -136,6 +135,7 @@ public class FactoryHelper {
* Loads a class file by a given class loader.
*
* @param domain if it is null, a default domain is used.
+ * @since 3.3
*/
public static Class toClass(ClassFile cf, ClassLoader loader, ProtectionDomain domain)
throws CannotCompileException