com.caucho.config.type
Class InlineBeanType<T>

java.lang.Object
  extended by com.caucho.config.type.ConfigType<T>
      extended by com.caucho.config.type.InlineBeanType<T>
Direct Known Subclasses:
AbstractBeanType, EnvironmentBeanType, FlowBeanType

public class InlineBeanType<T>
extends ConfigType<T>

Represents an inline bean type for configuration.


Field Summary
static QName TEXT
           
static QName VALUE
           
 
Constructor Summary
InlineBeanType(java.lang.Class<T> beanClass)
           
 
Method Summary
 void beforeConfigure(XmlConfigContext env, java.lang.Object bean, org.w3c.dom.Node node)
          Called before the children are configured.
 java.lang.Object create(java.lang.Object parent, QName name)
          Creates a new instance
 Attribute getAddAttribute(java.lang.Class<?> cl)
          Returns any add attributes to add arbitrary content
 Attribute getAddBeanAttribute(QName qName)
           
 Attribute getAttribute(QName name)
          Returns the attribute based on the given name.
protected  Attribute getAttributeImpl(QName name)
           
 java.lang.reflect.Constructor<T> getConstructor(int count)
          Returns a constructor with a given number of arguments
 Attribute getContentProgramAttribute()
          Returns the content program attribute (program excluding if, choose).
 Attribute getProgramAttribute()
          Returns the program attribute.
 java.lang.Class<T> getType()
          Returns the given type.
 void init(java.lang.Object bean)
          Initialize the type
 void inject(java.lang.Object bean)
          Initialize the type
 void introspect()
          Introspect the bean for configuration
 void introspectMethods(java.lang.reflect.Method[] methods)
          Introspect the beans methods for setters
 boolean isConstructableFromString()
           
 boolean isEL()
          Return true for EL evaluation
 boolean isReplace()
          Return true if the object is replaced
 java.lang.Object replaceObject(java.lang.Object bean)
          Replace the type with the generated object
protected  void setAddAnnotation(Attribute addAnnotation)
           
protected  void setAddCustomBean(Attribute addCustomBean)
           
 java.lang.String toString()
           
 java.lang.Object valueOf(java.lang.Object value)
          Converts the string to the given value.
 java.lang.Object valueOf(java.lang.String text)
          Converts the string to the given value.
 
Methods inherited from class com.caucho.config.type.ConfigType
afterConfigure, beforeConfigureBean, carefulIntrospect, createType, getComponentType, getDefaultAttribute, getType, getTypeName, isArray, isBean, isEnvBean, isInlineType, isNode, isNoTrim, isProgram, isQualifier, setEnvBean, setProperty, valueOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TEXT

public static final QName TEXT

VALUE

public static final QName VALUE
Constructor Detail

InlineBeanType

public InlineBeanType(java.lang.Class<T> beanClass)
Method Detail

getType

public java.lang.Class<T> getType()
Returns the given type.

Specified by:
getType in class ConfigType<T>

isEL

public boolean isEL()
Description copied from class: ConfigType
Return true for EL evaluation

Overrides:
isEL in class ConfigType<T>

setAddCustomBean

protected void setAddCustomBean(Attribute addCustomBean)

setAddAnnotation

protected void setAddAnnotation(Attribute addAnnotation)

create

public java.lang.Object create(java.lang.Object parent,
                               QName name)
Creates a new instance

Overrides:
create in class ConfigType<T>

getConstructor

public java.lang.reflect.Constructor<T> getConstructor(int count)
Returns a constructor with a given number of arguments

Overrides:
getConstructor in class ConfigType<T>

beforeConfigure

public void beforeConfigure(XmlConfigContext env,
                            java.lang.Object bean,
                            org.w3c.dom.Node node)
Called before the children are configured.

Overrides:
beforeConfigure in class ConfigType<T>

getAttribute

public Attribute getAttribute(QName name)
Returns the attribute based on the given name.

Overrides:
getAttribute in class ConfigType<T>

getAttributeImpl

protected Attribute getAttributeImpl(QName name)

getAddBeanAttribute

public Attribute getAddBeanAttribute(QName qName)
Overrides:
getAddBeanAttribute in class ConfigType<T>

getAddAttribute

public Attribute getAddAttribute(java.lang.Class<?> cl)
Returns any add attributes to add arbitrary content

Overrides:
getAddAttribute in class ConfigType<T>

getProgramAttribute

public Attribute getProgramAttribute()
Returns the program attribute.

Overrides:
getProgramAttribute in class ConfigType<T>

getContentProgramAttribute

public Attribute getContentProgramAttribute()
Returns the content program attribute (program excluding if, choose).

Overrides:
getContentProgramAttribute in class ConfigType<T>

inject

public void inject(java.lang.Object bean)
Initialize the type

Overrides:
inject in class ConfigType<T>

init

public void init(java.lang.Object bean)
Initialize the type

Overrides:
init in class ConfigType<T>

isReplace

public boolean isReplace()
Return true if the object is replaced

Overrides:
isReplace in class ConfigType<T>

replaceObject

public java.lang.Object replaceObject(java.lang.Object bean)
Replace the type with the generated object

Overrides:
replaceObject in class ConfigType<T>

valueOf

public java.lang.Object valueOf(java.lang.String text)
Converts the string to the given value.

Specified by:
valueOf in class ConfigType<T>

isConstructableFromString

public boolean isConstructableFromString()
Overrides:
isConstructableFromString in class ConfigType<T>

valueOf

public java.lang.Object valueOf(java.lang.Object value)
Converts the string to the given value.

Overrides:
valueOf in class ConfigType<T>

introspect

public void introspect()
Introspect the bean for configuration

Overrides:
introspect in class ConfigType<T>

introspectMethods

public void introspectMethods(java.lang.reflect.Method[] methods)
Introspect the beans methods for setters


toString

public java.lang.String toString()
Overrides:
toString in class ConfigType<T>