Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.java.beans.decoder
Class DummyHandler  view DummyHandler download DummyHandler.java

java.lang.Object
  extended bygnu.java.beans.decoder.DummyHandler
All Implemented Interfaces:
ElementHandler

class DummyHandler
extends java.lang.Object
implements ElementHandler

An ElementHandler implementation that is used as an artificial root element. This avoids having to check for a null element.


Constructor Summary
(package private) DummyHandler()
           
 
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.
private  void fail()
           
 Context getContext()
          Returns the Context instance this handler is working on.
 java.lang.Object getObject(java.lang.String objectId)
           
 ElementHandler getParent()
           
 boolean hasFailed()
          Returns whether this handler has failed.
 java.lang.Class instantiateClass(java.lang.String className)
          Provides the same functionality as Class.forName() but allows the decoder to use a different class loader.
 boolean isSubelementAllowed(java.lang.String subElementName)
          Returns whether a subelement of the given name is allowed.
 void notifyContextFailed()
          Notifies the handler that its Context failed and starts a recursive invocation of the parent handler if it is affected by that failure.
 void notifyStatement(java.beans.ExceptionListener exceptionListener)
          Notifies the handler's Context that its child Context will not return a value back.
 void putObject(java.lang.String objectId, java.lang.Object o)
          Stores the object under the given id.
 void start(org.xml.sax.Attributes attributes, java.beans.ExceptionListener exceptionListener)
          Evaluates the attributes and creates a Context instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyHandler

DummyHandler()
Method Detail

start

public void start(org.xml.sax.Attributes attributes,
                  java.beans.ExceptionListener exceptionListener)
Description copied from interface: ElementHandler
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:
start in interface ElementHandler

end

public void end(java.beans.ExceptionListener exceptionListener)
Description copied from interface: ElementHandler
Post-processes the Context.

Specified by:
end in interface ElementHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
Description copied from interface: ElementHandler
Adds characters from the body of the XML tag to the buffer.

Specified by:
characters in interface ElementHandler

isSubelementAllowed

public 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:
isSubelementAllowed in interface ElementHandler

instantiateClass

public java.lang.Class instantiateClass(java.lang.String className)
                                 throws java.lang.ClassNotFoundException
Description copied from interface: ElementHandler
Provides the same functionality as Class.forName() but allows the decoder to use a different class loader.

Specified by:
instantiateClass in interface ElementHandler

notifyStatement

public void notifyStatement(java.beans.ExceptionListener exceptionListener)
Description copied from interface: ElementHandler
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:
notifyStatement in interface ElementHandler

hasFailed

public boolean hasFailed()
Description copied from interface: ElementHandler
Returns whether this handler has failed. This is used to skip child elements.

Specified by:
hasFailed in interface ElementHandler

getContext

public Context getContext()
Description copied from interface: ElementHandler
Returns the Context instance this handler is working on.

Specified by:
getContext in interface ElementHandler

notifyContextFailed

public void notifyContextFailed()
Description copied from interface: ElementHandler
Notifies the handler that its Context failed and starts a recursive invocation of the parent handler if it is affected by that failure. Although the method is a public API member it is only used internally.

Specified by:
notifyContextFailed in interface ElementHandler

putObject

public void putObject(java.lang.String objectId,
                      java.lang.Object o)
Description copied from interface: ElementHandler
Stores the object under the given id. The object is not stored if the id is null.

Specified by:
putObject in interface ElementHandler

getObject

public java.lang.Object getObject(java.lang.String objectId)
Specified by:
getObject in interface ElementHandler

getParent

public ElementHandler getParent()
Specified by:
getParent in interface ElementHandler

fail

private void fail()