com.caucho.config.xml
Class XmlBeanFieldAttribute

java.lang.Object
  extended by com.caucho.config.attribute.Attribute
      extended by com.caucho.config.xml.XmlBeanFieldAttribute

public class XmlBeanFieldAttribute
extends Attribute

Attribute for configuring an XML CanDI bean's field. The equivalent of mybean.setFoo("stuff") is

 <mypkg:MyBean>
   <foo>stuff</foo>
 </mypkg:MyBean>
 


Constructor Summary
XmlBeanFieldAttribute(java.lang.Class cl, java.lang.reflect.Field field)
           
 
Method Summary
 java.lang.Object create(java.lang.Object parent, QName qName)
          Creates the child bean.
 ConfigType getConfigType()
          Returns the config type of the attribute value.
 void setText(java.lang.Object parent, QName name, java.lang.String text)
          Sets the value of the attribute
 void setValue(java.lang.Object bean, QName name, java.lang.Object value)
          Sets the value of the attribute
 
Methods inherited from class com.caucho.config.attribute.Attribute
create, getType, isAllowInline, isAllowText, isAssignableFrom, isAssignableFrom, isBean, isConfigurable, isEL, isInlineType, isNode, isProgram, isSetter, replaceObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmlBeanFieldAttribute

public XmlBeanFieldAttribute(java.lang.Class cl,
                             java.lang.reflect.Field field)
Method Detail

getConfigType

public ConfigType getConfigType()
Description copied from class: Attribute
Returns the config type of the attribute value.

Specified by:
getConfigType in class Attribute

create

public java.lang.Object create(java.lang.Object parent,
                               QName qName)
                        throws ConfigException
Creates the child bean.

Overrides:
create in class Attribute
Throws:
ConfigException

setValue

public void setValue(java.lang.Object bean,
                     QName name,
                     java.lang.Object value)
              throws ConfigException
Sets the value of the attribute

Specified by:
setValue in class Attribute
Throws:
ConfigException

setText

public void setText(java.lang.Object parent,
                    QName name,
                    java.lang.String text)
             throws ConfigException
Sets the value of the attribute

Overrides:
setText in class Attribute
Throws:
ConfigException