java.beans
public class Encoder extends Object
Since: 1.4
Constructor Summary | |
---|---|
Encoder() |
Method Summary | |
---|---|
Object | get(Object oldInstance)
Returns the replacement object which has been created by the encoder during
the instantiation sequence or null if the object has not
been processed yet.
|
ExceptionListener | getExceptionListener()
Returns the currently active {@link ExceptionListener} instance. |
PersistenceDelegate | getPersistenceDelegate(Class<?> type) |
Object | remove(Object oldInstance) |
void | setExceptionListener(ExceptionListener listener)
Sets the {@link ExceptionListener} instance to be used for reporting
recorable exceptions in the instantiation and initialization sequence. |
void | setPersistenceDelegate(Class<?> type, PersistenceDelegate delegate)
Sets the {@link PersistenceDelegate} instance for the given class.
|
void | writeExpression(Expression expr) Note: If you call this method not from within an object instantiation and initialization sequence it will be silently ignored. |
protected void | writeObject(Object o) |
void | writeStatement(Statement stmt) Note: If you call this method not from within an object instantiation and initialization sequence it will be silently ignored. |
null
if the object has not
been processed yet.
Note: The String
class acts as an endpoint for the
inherently recursive algorithm of the {@link Encoder}. Therefore instances
of String
will always be returned by this method. In other
words the assertion:
assert (anyEncoder.get(anyString) == anyString)
Note: If null
is requested, the result will
always be null
.
null
a default instance will be used that
prints the thrown exception to System.err
.
Note: Throws a NullPointerException
if the argument is
null
.
Note: Silently ignores PersistenceDelegates for Array types and primitive wrapper classes.
Note: Although this method is not declared static
changes to
the {@link PersistenceDelegate}s affect all
{@link Encoder} instances. In this implementation the
access is thread safe.
Note: If you call this method not from within an object instantiation and initialization sequence it will be silently ignored.
Note: If you call this method not from within an object instantiation and initialization sequence it will be silently ignored.