- All Known Implementing Classes:
ClassLoaderClassCloner
public interface ClassCloner
A cloner for class types. Used (for example) to load an equivalent class from an alternate classloader.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ClassClonerA class cloner which just returns the class it is given. -
Method Summary
-
Field Details
-
IDENTITY
A class cloner which just returns the class it is given. This cloner can be used in cases where an object must be deep-cloned within the same class loader.
-
-
Method Details
-
clone
Clone the given class.- Parameters:
original- the class to clone- Returns:
- the cloned class
- Throws:
IOException- if cloning fails due to a serialization problemClassNotFoundException- if cloning fails due to an unavailable class
-
cloneProxy
Clone the given reflection proxy class.- Parameters:
proxyClass- the proxy class to clone- Returns:
- the cloned proxy class
- Throws:
IOException- if cloning fails due to a serialization problemClassNotFoundException- if cloning fails due to an unavailable class
-