public abstract static class AtomicSerial.GetArg extends ObjectInputStream.GetField implements ObjectStreamContext
| Modifier | Constructor and Description |
|---|---|
protected |
GetArg()
Not intended for general construction, however may be extended
by an ObjectInput implementation or for testing purposes.
|
| Modifier and Type | Method and Description |
|---|---|
abstract <T> T |
get(String name,
T val,
Class<T> type)
Get the value of the named Object field from the persistent field.
|
abstract AtomicSerial.ReadObject |
getReader()
If an AtomicSerial implementation annotates a static method that returns
a Reader instance, with
AtomicSerial.ReadInput, then the stream will provide
the ReadObject access to the stream at a time that suits the stream. |
abstract Class[] |
serialClasses()
Provides access to stream classes that belong to the Object under
construction, ordered from superclass to child class.
|
abstract AtomicSerial.GetArg |
validateInvariants(String[] fields,
Class[] types,
boolean[] nonNull) |
defaulted, get, get, get, get, get, get, get, get, get, getObjectStreamClassclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetObjectStreamContextprotected GetArg()
SecurityException - if caller doesn't have permission java.io.SerializablePermission "enableSubclassImplementation";public abstract Class[] serialClasses()
public abstract AtomicSerial.ReadObject getReader()
AtomicSerial.ReadInput, then the stream will provide
the ReadObject access to the stream at a time that suits the stream.
This method provides a way for an object under construction to
retrieve information from the stream. This is provided to retain
compatibility with writeObject methods that write directly to the
stream.public abstract <T> T get(String name, T val, Class<T> type) throws IOException
Instances of java.util.Collection will be replaced in the stream by a safe limited functionality immutable Collection instance that must be passed to a collection instance constructor. It is advisable to pass a Collections empty collection instance for the val parameter, to prevent a NullPointerException, in this case.
T - Type of object, note if T is an instance of Class<? extends SomeClass>
the you must validate it, as this method can't.name - the name of the fieldval - the default value to use if name does not
have a valuetype - check to be performed, prior to returning.Object fieldIOException - if there are I/O errors while reading from the
underlying InputStreamIllegalArgumentException - if type of name is
not serializable or if the field type is incorrectInvalidObjectException - containing a ClassCastException cause
if object to be returned is not an instance of type.NullPointerException - if type is null.public abstract AtomicSerial.GetArg validateInvariants(String[] fields, Class[] types, boolean[] nonNull) throws IOException
IOExceptionCopyright © 2016–2018 The Apache Software Foundation. All rights reserved.