public final class SerializableClass extends Object
Modifier and Type | Field and Description |
---|---|
static SerializableField[] |
NOFIELDS
An empty array of fields.
|
Modifier and Type | Method and Description |
---|---|
Object |
callNoArgConstructor()
Invoke the public no-arg constructor on this class.
|
Object |
callNonInitConstructor()
Invoke the non-init constructor on this class.
|
Object |
callObjectInputConstructor(ObjectInput objectInput)
Invoke the public constructor accepting an ObjectInput.
|
void |
callReadObject(Object object,
ObjectInputStream inputStream)
Invoke the
readObject() method for an object. |
void |
callReadObjectNoData(Object object)
Invoke the
readObjectNoData() method for an object. |
Object |
callReadResolve(Object object)
Invoke the
readResolve() method for an object. |
void |
callWriteObject(Object object,
ObjectOutputStream outputStream)
Invoke the
writeObject() method for an object. |
Object |
callWriteReplace(Object object)
Invoke the
writeReplace() method for an object. |
long |
getEffectiveSerialVersionUID()
Get the effective serial version UID of this class.
|
SerializableField[] |
getFields()
Get the serializable fields of this class.
|
SerializableField |
getSerializableField(String name,
Class<?> fieldType,
boolean unshared)
Create a synthetic field for this object class.
|
Class<?> |
getSubjectClass()
Get the
Class of this class. |
boolean |
hasNoArgConstructor()
Determine whether this class has a public no-arg constructor.
|
boolean |
hasNoInitConstructor()
Determine whether this class has a non-init constructor.
|
boolean |
hasObjectInputConstructor()
Determine whether this class has a public constructor accepting an ObjectInput.
|
boolean |
hasReadObject()
Determine whether this class has a
readObject() method. |
boolean |
hasReadObjectNoData()
Determine whether this class has a
readObjectNoData() method. |
boolean |
hasReadResolve()
Determine whether this class has a
readResolve() method. |
boolean |
hasWriteObject()
Determine whether this class has a
writeObject() method. |
boolean |
hasWriteReplace()
Determine whether this class has a
writeReplace() method. |
String |
toString() |
public static final SerializableField[] NOFIELDS
public SerializableField[] getFields()
public SerializableField getSerializableField(String name, Class<?> fieldType, boolean unshared) throws ClassNotFoundException
name
- the name of the fieldfieldType
- the field typeunshared
- true
if the field should be unsharedClassNotFoundException
- if a class was not found while looking up the subject classpublic boolean hasWriteObject()
writeObject()
method.true
if there is a writeObject()
methodpublic void callWriteObject(Object object, ObjectOutputStream outputStream) throws IOException
writeObject()
method for an object.object
- the object to invoke onoutputStream
- the object output stream to pass inIOException
- if an I/O error occurspublic boolean hasReadObject()
readObject()
method.true
if there is a readObject()
methodpublic void callReadObject(Object object, ObjectInputStream inputStream) throws IOException, ClassNotFoundException
readObject()
method for an object.object
- the object to invoke oninputStream
- the object input stream to pass inIOException
- if an I/O error occursClassNotFoundException
- if a class was not able to be loadedpublic boolean hasReadObjectNoData()
readObjectNoData()
method.true
if there is a readObjectNoData()
methodpublic void callReadObjectNoData(Object object) throws ObjectStreamException
readObjectNoData()
method for an object.object
- the object to invoke onObjectStreamException
- if an I/O error occurspublic boolean hasWriteReplace()
writeReplace()
method.true
if there is a writeReplace()
methodpublic Object callWriteReplace(Object object) throws ObjectStreamException
writeReplace()
method for an object.object
- the object to invoke onObjectStreamException
- if an I/O error occurspublic boolean hasReadResolve()
readResolve()
method.true
if there is a readResolve()
methodpublic Object callReadResolve(Object object) throws ObjectStreamException
readResolve()
method for an object.object
- the object to invoke onObjectStreamException
- if an I/O error occurspublic boolean hasNoArgConstructor()
true
if there is such a constructorpublic Object callNoArgConstructor() throws IOException
IOException
- if an I/O error occurspublic boolean hasObjectInputConstructor()
true
if there is such a constructorpublic Object callObjectInputConstructor(ObjectInput objectInput) throws IOException
objectInput
- the ObjectInput to pass to the constructorIOException
- if an I/O error occurspublic boolean hasNoInitConstructor()
public Object callNonInitConstructor()
public long getEffectiveSerialVersionUID()
public Class<?> getSubjectClass()
Class
of this class.Copyright © 2018 JBoss by Red Hat. All rights reserved.