org.inria.ns.reflex.xml.operator
Class DefaultXOperator

java.lang.Object
  extended by org.inria.ns.reflex.xml.operator.AbstractXOperator
      extended by org.inria.ns.reflex.xml.operator.DefaultXOperator
All Implemented Interfaces:
XOperator
Direct Known Subclasses:
BooleanOperator, NullOperator, NumberOperator, StringOperator

public class DefaultXOperator
extends AbstractXOperator

A default implementation.

Author:
Philippe Poulard

Method Summary
 Map getAttributes(Object referent)
          This implementation returns an empty map.
 List getChildren(Object referent)
          This implementation returns an empty list.
 short getNodeType(Object referent)
          The referent doesn't behave like an element.
 QName getTypeName(Object referent)
          Return the type of the referent.
 
Methods inherited from class org.inria.ns.reflex.xml.operator.AbstractXOperator
append, append, booleanValueOf, clear, clear, clearAll, clearAll, clone, clone, getAttributeValue, getCommentAt, getElementAt, getElementById, getElementsByName, getFamilyIndex, getFamilySize, getIndex, getNamedElementAt, getNamedProcessingInstructionAt, getNameIndex, getNameSize, getNamespaces, getNext, getNodeAt, getNodeKind, getParent, getPrevious, getProcessingInstructionAt, getQName, getRoot, getSize, getStringAttributeValue, getStringName, getTextAt, getType, getTypeIndex, getTypeSize, getValue, getXFactory, getXMLType, getXOperator, insertAfter, insertAfter, insertBefore, insertBefore, isAttribute, isComment, isDocument, isElement, isParentNode, isProcessingInstruction, isText, numberValueOf, remove, remove, removeAttribute, rename, rename, replace, replace, setAttribute, stringValueOf, update, update, valueOf
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getChildren

public List getChildren(Object referent)
This implementation returns an empty list.

Parameters:
referent - Not used.
Returns:
An emtpy list.
See Also:
XOperator.getChildren(Object)

getAttributes

public Map getAttributes(Object referent)
This implementation returns an empty map.

Parameters:
referent - Not used.
Returns:
An emtpy map.
See Also:
XOperator.getAttributes(Object)

getNodeType

public short getNodeType(Object referent)
The referent doesn't behave like an element.

Specified by:
getNodeType in interface XOperator
Overrides:
getNodeType in class AbstractXOperator
Parameters:
referent - The referent object.
Returns:
This implementation returns "the not-a-node type".
See Also:
XType.NOT_A_NODE

getTypeName

public QName getTypeName(Object referent)
Return the type of the referent.

Parameters:
referent - An object.
Returns:
The class name of the object given, wrapped in a QName.