org.apache.commons.jelly.tags.bean
Class BeanPropertyTag

java.lang.Object
  |
  +--org.apache.commons.jelly.TagSupport
        |
        +--org.apache.commons.jelly.DynaTagSupport
              |
              +--org.apache.commons.jelly.MapTagSupport
                    |
                    +--org.apache.commons.jelly.tags.core.UseBeanTag
                          |
                          +--org.apache.commons.jelly.tags.bean.BeanTag
                                |
                                +--org.apache.commons.jelly.tags.bean.BeanPropertyTag
All Implemented Interfaces:
org.apache.commons.jelly.impl.BeanSource, org.apache.commons.jelly.DynaTag, org.apache.commons.jelly.Tag

public class BeanPropertyTag
extends BeanTag

Creates a nested property via calling a beans createFoo() method then either calling the setFoo(value) or addFoo(value) methods in a similar way to how Ant tags construct themselves.

Version:
$Revision: 1.9 $
Author:
James Strachan, Christian Sell

Fields inherited from class org.apache.commons.jelly.tags.bean.BeanTag
addMethodName, EMPTY_ARGUMENTS
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
BeanPropertyTag(java.lang.String tagName)
           
 
Method Summary
protected  java.lang.Class findAddMethodClass(java.lang.Class parentClass)
          finds the parameter type of the first public method in the parent class whose name matches the add{tag name} pattern, whose return type is void and which takes one argument only.
protected  java.lang.reflect.Method findCreateMethod(java.lang.Class theClass)
          Finds the Method to create a new property object
protected  java.lang.Object newInstance(java.lang.Class theClass, java.util.Map attributes, org.apache.commons.jelly.XMLOutput output)
          Creates a new instance by calling a create method on the parent bean
 
Methods inherited from class org.apache.commons.jelly.tags.bean.BeanTag
findAddMethod, getParentObject, getTagName, processBean
 
Methods inherited from class org.apache.commons.jelly.tags.core.UseBeanTag
addIgnoreProperty, convertToClass, doTag, getBean, getDefaultClass, getIgnorePropertySet, isIgnoreUnknownProperties, loadClass, setBean, setBeanProperties, setIgnoreUnknownProperties, validateBeanProperties
 
Methods inherited from class org.apache.commons.jelly.MapTagSupport
createAttributes, getAttributes, setAttribute
 
Methods inherited from class org.apache.commons.jelly.DynaTagSupport
getAttributeType
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.jelly.Tag
getBody, getContext, getParent, invokeBody, setBody, setContext, setParent
 

Constructor Detail

BeanPropertyTag

public BeanPropertyTag(java.lang.String tagName)
Method Detail

newInstance

protected java.lang.Object newInstance(java.lang.Class theClass,
                                       java.util.Map attributes,
                                       org.apache.commons.jelly.XMLOutput output)
                                throws org.apache.commons.jelly.JellyTagException
Creates a new instance by calling a create method on the parent bean
Overrides:
newInstance in class org.apache.commons.jelly.tags.core.UseBeanTag

findAddMethodClass

protected java.lang.Class findAddMethodClass(java.lang.Class parentClass)
finds the parameter type of the first public method in the parent class whose name matches the add{tag name} pattern, whose return type is void and which takes one argument only.
Parameters:
parentClass -  
Returns:
the class of the first and only parameter

findCreateMethod

protected java.lang.reflect.Method findCreateMethod(java.lang.Class theClass)
Finds the Method to create a new property object


Copyright © 2002-2004 Apache Software Foundation. All Rights Reserved.