Package org.eigenbase.xom

## Class WrapperElementDef

- java.lang.Object
- - org.eigenbase.xom.ElementDef
  - - org.eigenbase.xom.WrapperElementDef

All Implemented Interfaces:
  `java.io.Serializable`, `java.lang.Cloneable`, `NodeDef`

    public class WrapperElementDef
    extends ElementDef

`WrapperElementDef` is an `ElementDef` which retains the underlying XML `DOMWrapper`. It is used when there is no specific class for this tag.

Since:
  31 October, 2001
Version:
  $Id: //open/util/resgen/src/org/eigenbase/xom/WrapperElementDef.java#3 $
Author:
  jhyde
See Also:
  Serialized Form

### Field Summary

Fields
`(package private) DOMWrapper` `_def`
`(package private) java.lang.Class` `enclosure`
`(package private) java.lang.String` `prefix`

### Constructor Summary

Constructors
`WrapperElementDef​(DOMWrapper def, java.lang.Class enclosure, java.lang.String prefix)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `display​(java.io.PrintWriter out, int indent)` Outputs this node to any PrintWriter, in a formatted fashion with automatic indenting.
`void` `displayXML​(XMLOutput out, int indent)` Outputs this element definition in XML to any XMLOutput.
`NodeDef[]` `getChildren()` Returns the children of this node.
`java.lang.String` `getName()` Returns the name of this node's tag.
`int` `getType()` Returns the type of this element.
`DOMWrapper` `getWrapper()` Retrieves the `DOMWrapper` which was used to create this node.

### Methods inherited from class org.eigenbase.xom.ElementDef

`addChild, addChildren, clone, constructElement, constructElement, deepCopy, diff, displayAttribute, displayAttributeDiff, displayDiff, displayElement, displayElementArray, displayElementArrayDiff, displayElementDiff, displayIndent, displayString, displayStringArray, displayStringArrayDiff, displayStringDiff, displayXML, displayXMLElement, displayXMLElementArray, displayXMLString, displayXMLStringArray, equals, getElementChildren, getElementClass, getLocation, getMixedChildren, getMixedChildren_new, getText, hashCode, toCompactXML, toString, toXML, verifyEqual`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### _def

    DOMWrapper _def

#### enclosure

    java.lang.Class enclosure

#### prefix

    java.lang.String prefix

### Constructor Detail

#### WrapperElementDef

    public WrapperElementDef​(DOMWrapper def,
                             java.lang.Class enclosure,
                             java.lang.String prefix)

### Method Detail

#### display

    public void display​(java.io.PrintWriter out,
                        int indent)

Description copied from interface: `NodeDef`
Outputs this node to any PrintWriter, in a formatted fashion with automatic indenting.

Parameters:
  `out` - the PrintWriter to which to write this NodeDef.
  `indent` - the indentation level for the printout.

#### displayXML

    public void displayXML​(XMLOutput out,
                           int indent)

Description copied from interface: `NodeDef`
Outputs this element definition in XML to any XMLOutput.

Specified by:
  `displayXML` in interface `NodeDef`
Overrides:
  `displayXML` in class `ElementDef`
Parameters:
  `out` - the XMLOutput class to display the XML

#### getType

    public int getType()

Description copied from interface: `NodeDef`
Returns the type of this element. Values are as for `DOMWrapper.getType()`.

Specified by:
  `getType` in interface `NodeDef`
Overrides:
  `getType` in class `ElementDef`

#### getName

    public java.lang.String getName()

Description copied from interface: `NodeDef`
Returns the name of this node's tag.

Specified by:
  `getName` in interface `NodeDef`
Overrides:
  `getName` in class `ElementDef`

#### getChildren

    public NodeDef[] getChildren()

Description copied from interface: `NodeDef`
Returns the children of this node.

Specified by:
  `getChildren` in interface `NodeDef`
Overrides:
  `getChildren` in class `ElementDef`

#### getWrapper

    public DOMWrapper getWrapper()

Description copied from interface: `NodeDef`
Retrieves the `DOMWrapper` which was used to create this node. Only works if this nodes's `MetaDef.Element.keepDef` was true (or, if it is not set, if the default `MetaDef.Model.defaultKeepDef` is true); otherwise, returns `null`.

Specified by:
  `getWrapper` in interface `NodeDef`
Overrides:
  `getWrapper` in class `ElementDef`
Returns:
  wrapper underlying this node