org.jboss.marshalling.cloner
Class ClassLoaderClassCloner
java.lang.Object
org.jboss.marshalling.cloner.ClassLoaderClassCloner
- All Implemented Interfaces:
- ClassCloner
public class ClassLoaderClassCloner
- extends Object
- implements ClassCloner
A class cloner which uses the given class loader to resolve classes.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassLoaderClassCloner
public ClassLoaderClassCloner(ClassLoader destClassLoader)
- Construct a new instance.
- Parameters:
destClassLoader - the class loader to use
clone
public Class<?> clone(Class<?> original)
throws IOException,
ClassNotFoundException
- Clone the given class.
- Specified by:
clone in interface ClassCloner
- Parameters:
original - the class to clone
- Returns:
- the cloned class
- Throws:
IOException - if cloning fails due to a serialization problem
ClassNotFoundException - if cloning fails due to an unavailable class
cloneProxy
public Class<?> cloneProxy(Class<?> proxyClass)
throws IOException,
ClassNotFoundException
- Clone the given reflection proxy class.
- Specified by:
cloneProxy in interface ClassCloner
- Parameters:
proxyClass - the proxy class to clone
- Returns:
- the cloned proxy class
- Throws:
IOException - if cloning fails due to a serialization problem
ClassNotFoundException - if cloning fails due to an unavailable class
Copyright © 2011 JBoss, a division of Red Hat, Inc.