|
|||||||||
| 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 FloatHandler

java.lang.Objectgnu.java.beans.decoder.AbstractElementHandler
gnu.java.beans.decoder.SimpleHandler
gnu.java.beans.decoder.FloatHandler
- All Implemented Interfaces:
- ElementHandler
- class FloatHandler
- extends SimpleHandler
Creates a Float instance from the character data in a <float> tag.
| Constructor Summary | |
(package private) |
FloatHandler(ElementHandler parent)
|
| Method Summary | |
void |
characters(char[] ch,
int start,
int length)
Adds characters from the body of the XML tag to the buffer. |
void |
end(java.beans.ExceptionListener exceptionListener)
Post-processes the Context. |
void |
endElement(java.lang.String characters)
Processes the character data when the element ends. |
Context |
getContext()
Returns the Context instance this handler is working on. |
java.lang.Object |
getObject(java.lang.String objectId)
Returns a previously stored object. |
ElementHandler |
getParent()
|
boolean |
hasFailed()
Returns whether this handler has failed. |
java.lang.Class |
instantiateClass(java.lang.String className)
Returns the Class instance as if called Class.forName() but uses a ClassLoader given by the user. |
boolean |
isSubelementAllowed(java.lang.String subElementName)
Returns whether a subelement of the given name is allowed. |
void |
notifyContextFailed()
Marks this and any depending parent handlers as failed. |
void |
notifyStatement(java.beans.ExceptionListener exceptionListener)
Notifies the handler's Context that its child Context will not return a value back. |
protected java.lang.Object |
parse(java.lang.String number)
Returns an object that is created from the given characters. |
void |
putObject(java.lang.String objectId,
java.lang.Object o)
Stores an object globally under a unique id. |
void |
start(org.xml.sax.Attributes attributes,
java.beans.ExceptionListener exceptionListener)
Evaluates the attributes and creates a Context instance. |
protected Context |
startElement(org.xml.sax.Attributes attributes,
java.beans.ExceptionListener exceptionListener)
Analyses the content of the Attributes instance and creates a Context object accordingly. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
FloatHandler
FloatHandler(ElementHandler parent)
| Method Detail |
parse
protected java.lang.Object parse(java.lang.String number) throws java.lang.NumberFormatException
- Description copied from class:
SimpleHandler - Returns an object that is created from the given characters. If the string is
converted into a number a NumberFormatException is cathed and reported
appropriately.
- Specified by:
parsein classSimpleHandler
startElement
protected final Context startElement(org.xml.sax.Attributes attributes, java.beans.ExceptionListener exceptionListener) throws AssemblyException
- Description copied from class:
AbstractElementHandler - Analyses the content of the Attributes instance and creates a Context
object accordingly.
An AssemblerException is thrown when the Context instance could not
be created.
- Specified by:
startElementin classAbstractElementHandler
endElement
public void endElement(java.lang.String characters) throws AssemblyException, AssemblyException
- Description copied from class:
AbstractElementHandler - Processes the character data when the element ends.
The default implementation does nothing for convenience.
- Overrides:
endElementin classAbstractElementHandler
start
public final void start(org.xml.sax.Attributes attributes, java.beans.ExceptionListener exceptionListener)
- Evaluates the attributes and creates a Context instance.
If the creation of the Context instance fails the ElementHandler
is marked as failed which may affect the parent handler other.
- Specified by:
startin interfaceElementHandler
end
public final void end(java.beans.ExceptionListener exceptionListener)
- Post-processes the Context.
- Specified by:
endin interfaceElementHandler
notifyStatement
public void notifyStatement(java.beans.ExceptionListener exceptionListener)
- Notifies the handler's Context that its child Context will not return
a value back. Some Context variants need this information to know when
a method or a constructor call can be made.
This method is called by a child handler.
- Specified by:
notifyStatementin interfaceElementHandler
notifyContextFailed
public final void notifyContextFailed()
- Marks this and any depending parent handlers as failed. Which means that on their end
no result is calculated.
When a handler has failed no more handlers are accepted within it.
- Specified by:
notifyContextFailedin interfaceElementHandler
hasFailed
public final boolean hasFailed()
- Returns whether this handler has failed.
This is used to skip child elements.
- Specified by:
hasFailedin interfaceElementHandler
characters
public final void characters(char[] ch,
int start,
int length)
- Adds characters from the body of the XML tag to the buffer.
- Specified by:
charactersin interfaceElementHandler
putObject
public void putObject(java.lang.String objectId, java.lang.Object o)
- Stores an object globally under a unique id. If the id is
null the object is not stored.
- Specified by:
putObjectin interfaceElementHandler
getObject
public java.lang.Object getObject(java.lang.String objectId) throws AssemblyException
- Returns a previously stored object. If the id is null the
result is null, too.
- Specified by:
getObjectin interfaceElementHandler
instantiateClass
public java.lang.Class instantiateClass(java.lang.String className) throws java.lang.ClassNotFoundException
- Returns the Class instance as if called Class.forName() but
uses a ClassLoader given by the user.
- Specified by:
instantiateClassin interfaceElementHandler
isSubelementAllowed
public final boolean isSubelementAllowed(java.lang.String subElementName)
- Description copied from interface:
ElementHandler - Returns whether a subelement of the given name is allowed. The rules
for evaluating this are derived from the javabeans.dtd which can be found
here: Java Persistence Article.
- Specified by:
isSubelementAllowedin interfaceElementHandler
getContext
public final Context getContext()
- Description copied from interface:
ElementHandler - Returns the Context instance this handler is working on.
- Specified by:
getContextin interfaceElementHandler
getParent
public final ElementHandler getParent()
- Specified by:
getParentin interfaceElementHandler
|
|||||||||
| Home >> All >> gnu >> java >> beans >> [ decoder overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC