Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
java.beans.Encoder
Constructor Summary | |
|
Method Summary | |
Object | |
ExceptionListener |
|
PersistenceDelegate |
|
Object | |
void |
|
void |
|
void |
|
protected void | |
void |
|
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public Object get(Object oldInstance)
Returns the replacement object which has been created by the encoder during the instantiation sequence ornull
if the object has not been processed yet.Note: The
String
class acts as an endpoint for the inherently recursive algorithm of theEncoder
. Therefore instances ofString
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 benull
.
public ExceptionListener getExceptionListener()
Returns the currently activeExceptionListener
instance.
public void setExceptionListener(ExceptionListener listener)
Sets theExceptionListener
instance to be used for reporting recorable exceptions in the instantiation and initialization sequence. If the argument isnull
a default instance will be used that prints the thrown exception toSystem.err
.
public void setPersistenceDelegate(Class type, PersistenceDelegate delegate)
Sets thePersistenceDelegate
instance for the given class.Note: Throws a
NullPointerException
if the argument isnull
.Note: Silently ignores PersistenceDelegates for Array types and primitive wrapper classes.
Note: Although this method is not declared
static
changes to thePersistenceDelegate
s affect allEncoder
instances. In this implementation the access is thread safe.
public void writeExpression(Expression expr)
Note: If you call this method not from within an object instantiation and initialization sequence it will be silently ignored.
public void writeStatement(Statement stmt)
Note: If you call this method not from within an object instantiation and initialization sequence it will be silently ignored.