|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.managed.api.factory.ManagedObjectFactory
org.jboss.managed.plugins.factory.AbstractManagedObjectFactory
public class AbstractManagedObjectFactory
AbstractManagedObjectFactory.
| Field Summary | |
|---|---|
static org.jboss.metatype.api.types.GenericMetaType |
MANAGED_OBJECT_META_TYPE
The managed object meta type |
| Constructor Summary | |
|---|---|
AbstractManagedObjectFactory()
|
|
| Method Summary | ||
|---|---|---|
ManagedObject |
buildManagedObject(Class<? extends Serializable> clazz)
The ManagedObjectBuilder.buildManagedObject implementation. |
|
protected ManagedProperty |
createDefaultManagedProperty(Fields fields)
Create default MangedProperty instance. |
|
|
createManagedObject(Class<T> clazz)
Create a shell managed object from the given class |
|
static ManagedProperty |
createManagedProperty(Class<? extends ManagedProperty> factory,
Fields fields)
Create a ManagedProperty by looking to the factory for ctor(Fields) |
|
void |
createObject(ManagedObject managedObject,
Class<? extends Serializable> clazz)
Create a new underlying object |
|
protected
|
createSkeletonManagedObject(Class<T> clazz)
Create a skeleton managed object |
|
protected Serializable |
createUnderlyingObject(ManagedObjectImpl managedObject,
Class<? extends Serializable> clazz)
Create the underlying object |
|
protected Collection<?> |
getAsCollection(Object value)
|
|
protected ManagedObjectBuilder |
getBuilder(Class<?> clazz)
Get the builder for a class |
|
Object |
getComponentName(org.jboss.beans.info.spi.BeanInfo beanInfo,
ManagedProperty property,
Serializable object,
org.jboss.metatype.api.values.MetaValue value)
Get the runtime component name. |
|
protected RuntimeComponentNameTransformer |
getComponentNameTransformer(org.jboss.reflect.spi.TypeInfo type)
Get component name transformer. |
|
|
getInstanceClassFactory(Class<T> clazz)
Get the instance factory for a class |
|
Class<? extends Serializable> |
getManagedObjectClass(Serializable instance)
Default InstanceClassFactory implementation simply returns the instance class. |
|
protected ManagedOperation |
getManagedOperation(org.jboss.reflect.spi.MethodInfo methodInfo,
ManagementOperation opAnnotation)
|
|
protected ManagedProperty |
getManagedProperty(Class<? extends ManagedProperty> factory,
Fields fields)
Look for ctor(Fields) |
|
protected ManagedObjectPopulator<Serializable> |
getPopulator(Class<?> clazz)
Get the populator for a class |
|
protected String |
getPropertyName(ManagedProperty property)
Get the property name. |
|
org.jboss.metatype.api.values.MetaValue |
getValue(org.jboss.beans.info.spi.BeanInfo beanInfo,
ManagedProperty property,
Serializable object)
Get a value |
|
ManagedObject |
initManagedObject(Serializable object,
String name,
String nameType)
Create a managed object from the given object |
|
void |
populateManagedObject(ManagedObject managedObject,
Serializable object)
Populate the managed object |
|
protected void |
populateValues(ManagedObjectImpl managedObject,
Serializable object)
Populate the values |
|
void |
setBuilder(Class<?> clazz,
ManagedObjectBuilder builder)
Set a managed object builder |
|
|
setInstanceClassFactory(Class<T> clazz,
InstanceClassFactory<T> factory)
Set the InstanceClassFactory for an instance type. |
|
void |
setNameTransformers(Class<?> clazz,
RuntimeComponentNameTransformer transformer)
|
|
void |
setNameTransformers(org.jboss.reflect.spi.TypeInfo type,
RuntimeComponentNameTransformer transformer)
|
|
void |
setValue(org.jboss.beans.info.spi.BeanInfo beanInfo,
ManagedProperty property,
Serializable object,
org.jboss.metatype.api.values.MetaValue value)
Set a value |
|
| Methods inherited from class org.jboss.managed.api.factory.ManagedObjectFactory |
|---|
getInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.jboss.metatype.api.types.GenericMetaType MANAGED_OBJECT_META_TYPE
| Constructor Detail |
|---|
public AbstractManagedObjectFactory()
| Method Detail |
|---|
public static ManagedProperty createManagedProperty(Class<? extends ManagedProperty> factory,
Fields fields)
factory - - the ManagedProperty implementation classfields - - the fields to pass to the ctor
public <T extends Serializable> ManagedObject createManagedObject(Class<T> clazz)
ManagedObjectFactory
createManagedObject in class ManagedObjectFactoryT - the classclazz - the class
public ManagedObject initManagedObject(Serializable object,
String name,
String nameType)
ManagedObjectFactory
initManagedObject in class ManagedObjectFactoryobject - the objectname - - the name of the managed object. If null, the name will
be derived from the object annotations or attachment name.nameType - - the name of the managed object. If null, the name will
be derived from the object annotations or default to "".
ManagementObjectID
public void setBuilder(Class<?> clazz,
ManagedObjectBuilder builder)
ManagedObjectFactory
setBuilder in class ManagedObjectFactoryclazz - the classbuilder - the builder (null to remove the builder)
public <T extends Serializable> void setInstanceClassFactory(Class<T> clazz,
InstanceClassFactory<T> factory)
ManagedObjectFactory
setInstanceClassFactory in class ManagedObjectFactoryT - the class typeclazz - the classfactory - - the factory used to obtain the class to scan for
management annotations.
public void setNameTransformers(Class<?> clazz,
RuntimeComponentNameTransformer transformer)
public void setNameTransformers(org.jboss.reflect.spi.TypeInfo type,
RuntimeComponentNameTransformer transformer)
public Class<? extends Serializable> getManagedObjectClass(Serializable instance)
getManagedObjectClass in interface InstanceClassFactory<Serializable>instance - - the instance a ManagedObject is to be created for.
protected <T extends Serializable> ManagedObject createSkeletonManagedObject(Class<T> clazz)
T - the typeclazz - the clazz
public ManagedObject buildManagedObject(Class<? extends Serializable> clazz)
buildManagedObject in interface ManagedObjectBuilderclazz - the attachment class
protected ManagedProperty createDefaultManagedProperty(Fields fields)
fields - the fields
public void createObject(ManagedObject managedObject,
Class<? extends Serializable> clazz)
ManagedObjectPopulator
createObject in interface ManagedObjectPopulator<Serializable>managedObject - the managed objectclazz - the class
public void populateManagedObject(ManagedObject managedObject,
Serializable object)
ManagedObjectPopulator
populateManagedObject in interface ManagedObjectPopulator<Serializable>managedObject - the managed objectobject - the object used to populate the managed object
protected Serializable createUnderlyingObject(ManagedObjectImpl managedObject,
Class<? extends Serializable> clazz)
managedObject - the managed objectclazz - the class
protected void populateValues(ManagedObjectImpl managedObject,
Serializable object)
managedObject - the managed objectobject - the objectprotected String getPropertyName(ManagedProperty property)
property - managed property
public Object getComponentName(org.jboss.beans.info.spi.BeanInfo beanInfo,
ManagedProperty property,
Serializable object,
org.jboss.metatype.api.values.MetaValue value)
InstanceClassFactory
getComponentName in interface InstanceClassFactory<Serializable>beanInfo - managed object's bean infoproperty - managed propertyobject - attachmentvalue - original value
public org.jboss.metatype.api.values.MetaValue getValue(org.jboss.beans.info.spi.BeanInfo beanInfo,
ManagedProperty property,
Serializable object)
getValue in interface InstanceClassFactory<Serializable>beanInfo - the bean infoproperty - the propertyobject - the object
public void setValue(org.jboss.beans.info.spi.BeanInfo beanInfo,
ManagedProperty property,
Serializable object,
org.jboss.metatype.api.values.MetaValue value)
setValue in interface InstanceClassFactory<Serializable>beanInfo - the bean infoproperty - the propertyobject - the objectvalue - the meta value
protected ManagedOperation getManagedOperation(org.jboss.reflect.spi.MethodInfo methodInfo,
ManagementOperation opAnnotation)
methodInfo - opAnnotation -
protected ManagedObjectBuilder getBuilder(Class<?> clazz)
clazz - the class
public <T extends Serializable> InstanceClassFactory<T> getInstanceClassFactory(Class<T> clazz)
getInstanceClassFactory in class ManagedObjectFactoryT - the class typeclazz - the class
protected RuntimeComponentNameTransformer getComponentNameTransformer(org.jboss.reflect.spi.TypeInfo type)
throws Throwable
type - the type info
Throwable - for any errorprotected ManagedObjectPopulator<Serializable> getPopulator(Class<?> clazz)
clazz - the class
protected Collection<?> getAsCollection(Object value)
protected ManagedProperty getManagedProperty(Class<? extends ManagedProperty> factory,
Fields fields)
factory - - the ManagedProperty implementation classfields - - the fields to pass to the ctor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||