Package org.jboss.marshalling.serial
Class ExternalizedObject
java.lang.Object
org.jboss.marshalling.serial.ExternalizedObject
- All Implemented Interfaces:
Externalizable
,Serializable
,Creator
An externalized object. This wrapper allows an object that was written with an
Externalizer
to be read by
standard Java serialization. Note that if an externalized object's child object graph ever refers to the original
object, there will be an error in the reconstructed object graph such that those references will refer to this
wrapper object rather than the properly externalized object.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
Create an object instance.void
protected Object
Return the externalized object afterreadExternal()
completes.void
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
externalizer
-
obj
-
-
Constructor Details
-
ExternalizedObject
public ExternalizedObject() -
ExternalizedObject
-
-
Method Details
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
readResolve
Return the externalized object afterreadExternal()
completes.- Returns:
- the externalized object
- Throws:
ObjectStreamException
- never
-
create
Create an object instance.- Specified by:
create
in interfaceCreator
- Parameters:
clazz
- the type of object to create- Returns:
- the object instance
- Throws:
InvalidClassException
- if an instance of the class could not be instantiated for some reason
-