org.apache.struts2.views.xslt
Class BeanAdapter

java.lang.Object
  extended by org.apache.struts2.views.xslt.AbstractAdapterNode
      extended by org.apache.struts2.views.xslt.AbstractAdapterElement
          extended by org.apache.struts2.views.xslt.BeanAdapter
All Implemented Interfaces:
AdapterNode, org.w3c.dom.Element, org.w3c.dom.Node

public class BeanAdapter
extends AbstractAdapterElement

This class is the most general type of adapter, utilizing reflective introspection to present a DOM view of all of the public properties of its value. For example, a property returning a JavaBean such as:

 public Person getMyPerson() { ... }
 ...
 class Person {
      public String getFirstName();
      public String getLastName();
 }
 
would be rendered as: ... ...


Field Summary
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
BeanAdapter()
           
BeanAdapter(AdapterFactory adapterFactory, AdapterNode parent, java.lang.String propertyName, java.lang.Object value)
           
 
Method Summary
protected  java.util.List<org.w3c.dom.Node> buildChildAdapters()
          subclasses override to produce their children
 org.w3c.dom.NodeList getChildNodes()
           
 java.lang.String getTagName()
           
 
Methods inherited from class org.apache.struts2.views.xslt.AbstractAdapterElement
buildAttributeAdapters, getAttribute, getAttributeAdapters, getAttributeNode, getAttributeNodeNS, getAttributeNS, getNodeName, getNodeType, getSchemaTypeInfo, hasAttribute, hasAttributeNS, hasChildNodes, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
 
Methods inherited from class org.apache.struts2.views.xslt.AbstractAdapterNode
appendChild, cloneNode, compareDocumentPosition, getAdapterFactory, getAttributes, getBaseURI, getChildAdapters, getChildAfter, getChildBefore, getChildBeforeOrAfter, getElementsByTagName, getElementsByTagNameNS, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParent, getParentNode, getPrefix, getPreviousSibling, getPropertyName, getPropertyValue, getTextContent, getUserData, hasAttributes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, operationNotSupported, removeChild, replaceChild, setAdapterFactory, setContext, setNodeValue, setParent, setPrefix, setPropertyName, setPropertyValue, setTextContent, setUserData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Element
getElementsByTagName, getElementsByTagNameNS
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Constructor Detail

BeanAdapter

public BeanAdapter()

BeanAdapter

public BeanAdapter(AdapterFactory adapterFactory,
                   AdapterNode parent,
                   java.lang.String propertyName,
                   java.lang.Object value)
Method Detail

getTagName

public java.lang.String getTagName()
Specified by:
getTagName in interface org.w3c.dom.Element
Overrides:
getTagName in class AbstractAdapterElement

getChildNodes

public org.w3c.dom.NodeList getChildNodes()
Specified by:
getChildNodes in interface org.w3c.dom.Node
Overrides:
getChildNodes in class AbstractAdapterNode

buildChildAdapters

protected java.util.List<org.w3c.dom.Node> buildChildAdapters()
Description copied from class: AbstractAdapterNode
subclasses override to produce their children

Overrides:
buildChildAdapters in class AbstractAdapterNode
Returns:
List of child adapters.


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.