cookxml.core.adder
Class DoNothingAdder

java.lang.Object
  extended by cookxml.core.adder.DoNothingAdder
All Implemented Interfaces:
Adder

public class DoNothingAdder
extends Object
implements Adder

As the name implies, this adder does exactly nothing. The children can be anything.

Since:
CookXml 1.0
Version:
$Id: DoNothingAdder.java 223 2007-06-06 06:51:30Z coconut $

Method Summary
 boolean add(String ns, String parentTag, Object parent, Object child, cookxml.core.DecodeEngine decodeEngine)
          Add the child to the parent.
static Adder getInstance()
          This is a frequently used adder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Adder getInstance()
This is a frequently used adder. So use singleton.

Returns:
the singleton instance of this adder.

add

public boolean add(String ns,
                   String parentTag,
                   Object parent,
                   Object child,
                   cookxml.core.DecodeEngine decodeEngine)
Description copied from interface: Adder
Add the child to the parent. The function should return true if it is the right adder for the request. False if it is not. Throw exceptions for errors.

Specified by:
add in interface Adder
Parameters:
ns - the parent tag namespace.
parentTag - the parent tag name.
parent - the parent object.
child - the child object.
decodeEngine - the DecodeEngine instance being used.
Returns:
whether or not the adder can handle the request.