|
JBoss Managed Parent POM 2.1.1.SP2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.managed.plugins.factory.AbstractInstanceClassFactory<T>
T
- the instance typepublic abstract class AbstractInstanceClassFactory<T>
A base InstanceClassFactory implementation that uses jboss reflection to get/set values on the underlying property object. Runtime component names are handled via a mapping from TypeInfo to RuntimeComponentNameTransformer using property ManagementRuntimeRef information.
Constructor Summary | |
---|---|
AbstractInstanceClassFactory()
|
|
AbstractInstanceClassFactory(ManagedObjectFactory mof)
Create an AbstractInstanceClassFactory with a ManagedObjectFactory. |
Method Summary | |
---|---|
protected Collection<?> |
getAsCollection(Object value)
|
Object |
getComponentName(org.jboss.beans.info.spi.BeanInfo beanInfo,
ManagedProperty property,
T attachment,
MetaValue value)
Get the runtime component name. |
protected RuntimeComponentNameTransformer |
getComponentNameTransformer(org.jboss.reflect.spi.TypeInfo type)
Get component name transformer. |
org.jboss.config.spi.Configuration |
getConfiguration()
|
protected List<GenericValue> |
getManagedObjectArray(org.jboss.beans.info.spi.BeanInfo beanInfo,
ManagedProperty property,
org.jboss.metadata.spi.MetaData metaData,
Object value)
|
Class<?> |
getManagedObjectClass(T attachment)
Default InstanceClassFactory implementation simply returns the attachment class. |
protected GenericValue |
getManagedObjectValue(org.jboss.beans.info.spi.BeanInfo beanInfo,
ManagedProperty property,
org.jboss.metadata.spi.MetaData metaData,
Object value)
|
GenericValue |
getManagedObjectValue(ManagedProperty property,
ManagedObject value)
|
GenericValue |
getManagedObjectValue(ManagedProperty property,
org.jboss.metadata.spi.MetaData metaData,
ManagedObject value)
|
MetaValueFactory |
getMetaValueFactory()
|
ManagedObjectFactory |
getMof()
|
protected MetaValue |
getNonManagedObjectValue(org.jboss.beans.info.spi.BeanInfo beanInfo,
ManagedProperty property,
org.jboss.beans.info.spi.PropertyInfo propertyInfo,
Object value)
|
protected String |
getPropertyName(ManagedProperty property)
Get the property name. |
Map<org.jboss.reflect.spi.TypeInfo,RuntimeComponentNameTransformer> |
getTransformers()
|
MetaValue |
getValue(org.jboss.beans.info.spi.BeanInfo beanInfo,
ManagedProperty property,
org.jboss.metadata.spi.MetaData metaData,
T object)
Get the value from object. |
void |
setConfiguration(org.jboss.config.spi.Configuration configuration)
|
protected void |
setManagedObject(org.jboss.beans.info.spi.BeanInfo beanInfo,
org.jboss.beans.info.spi.PropertyInfo propertyInfo,
T object,
ManagedObject mo)
Currently just a stub method subclasses have to override to avoid the NotImplementedException. |
void |
setMetaValueFactory(MetaValueFactory metaValueFactory)
|
void |
setMof(ManagedObjectFactory mof)
|
void |
setNameTransformers(Class<?> clazz,
RuntimeComponentNameTransformer transformer)
|
void |
setNameTransformers(org.jboss.reflect.spi.TypeInfo type,
RuntimeComponentNameTransformer transformer)
|
void |
setTransformers(Map<org.jboss.reflect.spi.TypeInfo,RuntimeComponentNameTransformer> transformers)
|
void |
setValue(org.jboss.beans.info.spi.BeanInfo beanInfo,
ManagedProperty property,
T object,
MetaValue value)
Set a value |
protected void |
setValue(org.jboss.beans.info.spi.BeanInfo beanInfo,
org.jboss.beans.info.spi.PropertyInfo propertyInfo,
Object object,
Object unwrapValue)
|
protected Object |
unwrapValue(org.jboss.beans.info.spi.BeanInfo beanInfo,
ManagedProperty property,
MetaValue value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.managed.spi.factory.InstanceClassFactory |
---|
getType |
Constructor Detail |
---|
public AbstractInstanceClassFactory()
public AbstractInstanceClassFactory(ManagedObjectFactory mof)
mof
- - the ManagedObjectFactory delegated to for GenericValue handling.#getManagedObjectValue(BeanInfo, ManagedProperty, Object)
,
#getManagedObjectArray(BeanInfo, ManagedProperty, Object)
Method Detail |
---|
public Map<org.jboss.reflect.spi.TypeInfo,RuntimeComponentNameTransformer> getTransformers()
public void setTransformers(Map<org.jboss.reflect.spi.TypeInfo,RuntimeComponentNameTransformer> transformers)
public void setNameTransformers(Class<?> clazz, RuntimeComponentNameTransformer transformer)
public void setNameTransformers(org.jboss.reflect.spi.TypeInfo type, RuntimeComponentNameTransformer transformer)
public org.jboss.config.spi.Configuration getConfiguration()
public void setConfiguration(org.jboss.config.spi.Configuration configuration)
public MetaValueFactory getMetaValueFactory()
public void setMetaValueFactory(MetaValueFactory metaValueFactory)
public ManagedObjectFactory getMof()
public void setMof(ManagedObjectFactory mof)
public Class<?> getManagedObjectClass(T attachment) throws ClassNotFoundException
getManagedObjectClass
in interface InstanceClassFactory<T>
attachment
- - the instance a ManagedObject is to be created for.
ClassNotFoundException
- if MO class not foundpublic Object getComponentName(org.jboss.beans.info.spi.BeanInfo beanInfo, ManagedProperty property, T attachment, MetaValue value)
InstanceClassFactory
getComponentName
in interface InstanceClassFactory<T>
beanInfo
- managed object's bean infoproperty
- managed property being setattachment
- - the object which own's the propertyvalue
- - the meta value form of the property value
public MetaValue getValue(org.jboss.beans.info.spi.BeanInfo beanInfo, ManagedProperty property, org.jboss.metadata.spi.MetaData metaData, T object)
InstanceClassFactory
getValue
in interface InstanceClassFactory<T>
beanInfo
- managed object's bean infoproperty
- managed property being setobject
- - the object which own's the property
public void setValue(org.jboss.beans.info.spi.BeanInfo beanInfo, ManagedProperty property, T object, MetaValue value)
setValue
in interface InstanceClassFactory<T>
beanInfo
- the bean infoproperty
- the propertyobject
- the objectvalue
- the meta valuepublic GenericValue getManagedObjectValue(ManagedProperty property, ManagedObject value)
public GenericValue getManagedObjectValue(ManagedProperty property, org.jboss.metadata.spi.MetaData metaData, ManagedObject value)
protected GenericValue getManagedObjectValue(org.jboss.beans.info.spi.BeanInfo beanInfo, ManagedProperty property, org.jboss.metadata.spi.MetaData metaData, Object value)
protected List<GenericValue> getManagedObjectArray(org.jboss.beans.info.spi.BeanInfo beanInfo, ManagedProperty property, org.jboss.metadata.spi.MetaData metaData, Object value)
protected MetaValue getNonManagedObjectValue(org.jboss.beans.info.spi.BeanInfo beanInfo, ManagedProperty property, org.jboss.beans.info.spi.PropertyInfo propertyInfo, Object value)
protected void setManagedObject(org.jboss.beans.info.spi.BeanInfo beanInfo, org.jboss.beans.info.spi.PropertyInfo propertyInfo, T object, ManagedObject mo)
beanInfo
- propertyInfo
- object
- mo
- protected RuntimeComponentNameTransformer getComponentNameTransformer(org.jboss.reflect.spi.TypeInfo type) throws Throwable
type
- the type info
Throwable
- for any errorprotected Object unwrapValue(org.jboss.beans.info.spi.BeanInfo beanInfo, ManagedProperty property, MetaValue value)
protected void setValue(org.jboss.beans.info.spi.BeanInfo beanInfo, org.jboss.beans.info.spi.PropertyInfo propertyInfo, Object object, Object unwrapValue) throws Throwable
Throwable
protected Collection<?> getAsCollection(Object value)
protected String getPropertyName(ManagedProperty property)
property
- managed property
|
JBoss Managed Parent POM 2.1.1.SP2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |