|
|||||||||
| Home >> All >> gnu >> java >> beans >> [ decoder overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
gnu.java.beans.decoder
Class DecoderContext

java.lang.Objectgnu.java.beans.decoder.AbstractContext
gnu.java.beans.decoder.DecoderContext
- All Implemented Interfaces:
- Context
- public class DecoderContext
- extends AbstractContext
DecoderContext is a Context implementation which allows access to the XMLDecoder instance itself. This is used for the <java> tag.
| Field Summary | |
private java.beans.XMLDecoder |
decoder
|
private java.util.ArrayList |
objects
|
| Constructor Summary | |
DecoderContext(java.beans.XMLDecoder xmlDecoder)
|
|
| Method Summary | |
void |
addParameterObject(java.lang.Object o)
Adds a parameter object to the context. |
java.lang.Object |
endContext(Context outerContext)
Notifies that the context ends and the returns the appropriate result object. |
java.lang.Object |
get(int index)
Calls an appropriate indexed get method if it is available or throws an AssemblerException if that is not allowed on this Context. |
java.lang.String |
getId()
Returns this Context's unique id or null if does not have such an id. |
java.lang.Object |
getResult()
Returns the result which was calculated by calling endContext() or reportStatement(). |
boolean |
isStatement()
Returns whether this Context is a statement (not returning result back to parent handler's Context) or not (= expression). |
java.util.Iterator |
iterator()
Returns an Iterator that retrieves the assembled objects. |
void |
notifyStatement(Context outerContext)
Notifies that the next element is a statement. |
void |
set(int index,
java.lang.Object o)
Calls an appropriate indexed set method if it is available or throws an AssemblerException if that is not allowed on this Context. |
void |
setId(java.lang.String newId)
Gives this Context a unique id. |
void |
setStatement(boolean b)
Sets whether this Context is a statement or not. |
boolean |
subContextFailed()
Notifies that the assembly of a subcontext failed and returns whether this Context is affected in a way that it fails too. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
decoder
private java.beans.XMLDecoder decoder
objects
private java.util.ArrayList objects
| Constructor Detail |
DecoderContext
public DecoderContext(java.beans.XMLDecoder xmlDecoder)
| Method Detail |
addParameterObject
public void addParameterObject(java.lang.Object o) throws AssemblyException
- Description copied from interface:
Context - Adds a parameter object to the context. This method is used when
sub-Contexts return their result.
Some Contexts do not accept more than a certain amount of objects
and throw an AssemblerException if the amount is exceeded.
notifyStatement
public void notifyStatement(Context outerContext) throws AssemblyException
- Description copied from interface:
Context - Notifies that the next element is a statement. This can mean
that an argument list is complete to be called.
endContext
public java.lang.Object endContext(Context outerContext) throws AssemblyException
- Description copied from interface:
Context - Notifies that the context ends and the returns the appropriate result
object.
subContextFailed
public boolean subContextFailed()
- Description copied from interface:
Context - Notifies that the assembly of a subcontext failed and returns
whether this Context is affected in a way that it fails too.
set
public void set(int index,
java.lang.Object o)
throws AssemblyException
- Description copied from interface:
Context - Calls an appropriate indexed set method if it is available or
throws an AssemblerException if that is not allowed on this Context.
The behaviour of this method is equal to List.set(int, Object).
get
public java.lang.Object get(int index) throws AssemblyException
- Description copied from interface:
Context - Calls an appropriate indexed get method if it is available or
throws an AssemblerException if that is not allowed on this Context.
The behaviour of this method is equal to List.get(int).
getResult
public java.lang.Object getResult()
- Description copied from interface:
Context - Returns the result which was calculated by calling endContext() or reportStatement().
Its the handler's responsibility to care that any of these two methods was called.
This is used by sub-Contexts to access this Context's result.
iterator
public java.util.Iterator iterator()
- Returns an Iterator that retrieves the assembled objects.
getId
public java.lang.String getId()
- Description copied from interface:
Context - Returns this Context's unique id or null if does not have such an id.
setId
public void setId(java.lang.String newId)
- Description copied from interface:
Context - Gives this Context a unique id. For convenience the id may be null which means
that no id exists at all.
isStatement
public boolean isStatement()
- Description copied from interface:
Context - Returns whether this Context is a statement (not returning result back
to parent handler's Context) or not (= expression).
- Specified by:
isStatementin interfaceContext
setStatement
public void setStatement(boolean b)
- Description copied from interface:
Context - Sets whether this Context is a statement or not.
- Specified by:
setStatementin interfaceContext
|
|||||||||
| Home >> All >> gnu >> java >> beans >> [ decoder overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC