JBoss Marshalling 1.4.3.Final

org.jboss.marshalling.cloner
Class ClassLoaderClassCloner

java.lang.Object
  extended by 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.


Field Summary
 
Fields inherited from interface org.jboss.marshalling.cloner.ClassCloner
IDENTITY
 
Constructor Summary
ClassLoaderClassCloner(ClassLoader destClassLoader)
          Construct a new instance.
 
Method Summary
 Class<?> clone(Class<?> original)
          Clone the given class.
 Class<?> cloneProxy(Class<?> proxyClass)
          Clone the given reflection proxy class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassLoaderClassCloner

public ClassLoaderClassCloner(ClassLoader destClassLoader)
Construct a new instance.

Parameters:
destClassLoader - the class loader to use
Method Detail

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

JBoss Marshalling 1.4.3.Final

Copyright © 2011 JBoss, a division of Red Hat, Inc.