com.caucho.config.attribute
Class SetterAttribute<T>

java.lang.Object
  extended by com.caucho.config.attribute.Attribute
      extended by com.caucho.config.attribute.SetterAttribute<T>

public class SetterAttribute<T>
extends Attribute


Constructor Summary
SetterAttribute(java.lang.reflect.Method setter, java.lang.Class<T> type)
           
 
Method Summary
 java.lang.Object create(java.lang.Object parent, QName name)
          Creates the child bean.
 java.lang.Object create(java.lang.Object parent, QName name, ConfigType<?> configType)
          Creates the child bean.
 boolean equals(java.lang.Object o)
           
 ConfigType<T> getConfigType()
          Returns the config type of the attribute value.
 boolean isAllowInline()
          True if it allows inline beans
 boolean isAllowText()
          True if it allows text.
 boolean isAssignableFrom(Attribute attr)
           
 boolean isConfigurable()
          Returns true if the setter is marked with @Configurable
 boolean isInlineType(ConfigType<?> type)
          True if it allows inline beans
 void setText(java.lang.Object bean, QName name, java.lang.String value)
          Sets the value of the attribute
 void setValue(java.lang.Object bean, QName name, java.lang.Object value)
          Sets the value of the attribute
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.config.attribute.Attribute
getType, isAssignableFrom, isBean, isEL, isNode, isProgram, isSetter, replaceObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetterAttribute

public SetterAttribute(java.lang.reflect.Method setter,
                       java.lang.Class<T> type)
Method Detail

getConfigType

public ConfigType<T> getConfigType()
Returns the config type of the attribute value.

Specified by:
getConfigType in class Attribute

isAllowText

public boolean isAllowText()
Description copied from class: Attribute
True if it allows text.

Overrides:
isAllowText in class Attribute

isAllowInline

public boolean isAllowInline()
True if it allows inline beans

Overrides:
isAllowInline in class Attribute

isInlineType

public boolean isInlineType(ConfigType<?> type)
True if it allows inline beans

Overrides:
isInlineType in class Attribute

isConfigurable

public boolean isConfigurable()
Returns true if the setter is marked with @Configurable

Overrides:
isConfigurable in class Attribute

isAssignableFrom

public boolean isAssignableFrom(Attribute attr)
Overrides:
isAssignableFrom in class Attribute

setText

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

Overrides:
setText 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

create

public java.lang.Object create(java.lang.Object parent,
                               QName name,
                               ConfigType<?> configType)
                        throws ConfigException
Creates the child bean.

Overrides:
create in class Attribute
Throws:
ConfigException

create

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

Overrides:
create in class Attribute
Throws:
ConfigException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class Attribute