|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.commons.iloader.node.loaders.AbstractLoader com.ibm.commons.iloader.node.loaders.JavaBeanLoader
public class JavaBeanLoader
An ILoader that adapts to a JavaBean model.
Constructor Summary | |
---|---|
JavaBeanLoader(JavaBeanLoader parent,
java.lang.String namespace)
Creates a new instance of this class. |
|
JavaBeanLoader(java.lang.String namespace)
Creates a new instance of this class. |
Method Summary | |
---|---|
protected boolean |
acceptClass(java.lang.Class c)
|
protected boolean |
acceptProperty(java.lang.Class clazz,
java.beans.PropertyDescriptor pd)
|
protected IMember |
createMember(IClassDef parent,
java.lang.Class clazz,
java.beans.PropertyDescriptor pd)
|
java.lang.ClassLoader |
getClassLoader()
Returns the class loader that is used by this JavaBeanLoader |
IClassDef |
getClassOf(java.lang.Object object)
Get the class for a particular object. |
static JavaBeanLoader |
getDefault()
|
java.util.Iterator |
getInheritingClassesOf(IClassDef classDef)
Returns a iterator of all of the classes that inherit from the provided IClassDef. |
java.lang.String[] |
getNamespaces()
Get the list of namespaces handled by this loader. |
java.lang.Object |
getObject(java.lang.Object instance,
IAttribute attribute)
Get an object value for the given attribute. |
IObjectCollection |
getObjectCollection(java.lang.Object instance,
ICollection collection)
Get an object collection based on the provided property (ICollection). |
java.lang.String |
getValue(java.lang.Object instance,
IAttribute attribute)
Returns a string value for the given attribute. |
IValueCollection |
getValueCollection(java.lang.Object instance,
ICollection collection)
Get a value collection based on the provided property (ICollection). |
boolean |
handleNamespace(java.lang.String namespace)
Check if the loader is using a particular namespace |
boolean |
isInstanceOf(java.lang.Object object,
IClassDef classDef)
Returns whether or not the provided object is an instance of the given classdef object. |
boolean |
isNativeClass(java.lang.Object o)
Check is an object is a native class. |
boolean |
isNativeObject(java.lang.Object o)
Determines if the provided object is supported by the current ILoader instance. |
IClassDef |
loadClass(java.lang.String namespace,
java.lang.String className)
Load a class giving a name. |
IClassDef |
loadNativeClass(java.lang.Class nativeClass)
Loads a IClassDef object for the given native class. |
void |
setClassLoader(java.lang.ClassLoader classLoader)
Sets the class loader to be used by this JavaBeanLoader |
void |
setObject(java.lang.Object instance,
IAttribute attribute,
java.lang.Object value,
DataChangeNotifier dataChangeNotifier)
Sets an object value for the given attribute. |
void |
setValue(java.lang.Object instance,
IAttribute attribute,
java.lang.String value,
DataChangeNotifier dataChangeNotifier)
Sets the given attribute's value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaBeanLoader(JavaBeanLoader parent, java.lang.String namespace)
parent
- the parent JavaBeanLoader of this loader.namespace
- the namespace that this loader can handlepublic JavaBeanLoader(java.lang.String namespace)
namespace
- the namespace that this loader can handleMethod Detail |
---|
public static JavaBeanLoader getDefault()
public java.lang.ClassLoader getClassLoader()
public void setClassLoader(java.lang.ClassLoader classLoader)
classLoader
- protected boolean acceptClass(java.lang.Class c)
protected boolean acceptProperty(java.lang.Class clazz, java.beans.PropertyDescriptor pd)
protected IMember createMember(IClassDef parent, java.lang.Class clazz, java.beans.PropertyDescriptor pd) throws com.ibm.commons.iloader.node.NodeException
com.ibm.commons.iloader.node.NodeException
public boolean handleNamespace(java.lang.String namespace)
ILoader
public java.lang.String[] getNamespaces()
ILoader
public boolean isNativeClass(java.lang.Object o)
ILoader
public IClassDef loadClass(java.lang.String namespace, java.lang.String className) throws com.ibm.commons.iloader.node.NodeException
ILoader
namespace
- the namespace that the IClassDef is to correspond toclassName
- the desired class
com.ibm.commons.iloader.node.NodeException
public IClassDef getClassOf(java.lang.Object object) throws com.ibm.commons.iloader.node.NodeException
ILoader
object
- an object whose IClassDef is required
NodeException
- throws a NodeException if the provided object is supported
by the ILoader.public boolean isInstanceOf(java.lang.Object object, IClassDef classDef) throws com.ibm.commons.iloader.node.NodeException
object
- the object under testclassDef
- the classdef to test against
com.ibm.commons.iloader.node.NodeException
public IClassDef loadNativeClass(java.lang.Class nativeClass) throws com.ibm.commons.iloader.node.NodeException
nativeClass
-
com.ibm.commons.iloader.node.NodeException
- throws a NodeException if a IClassDef object cannot be loaded for the given nativeClasspublic boolean isNativeObject(java.lang.Object o)
ILoader
public java.lang.String getValue(java.lang.Object instance, IAttribute attribute) throws com.ibm.commons.iloader.node.NodeException
ILoader
instance
- an instance of the model that contains the given attributeattribute
- the attribute whose value is sought
com.ibm.commons.iloader.node.NodeException
IAttribute
public void setValue(java.lang.Object instance, IAttribute attribute, java.lang.String value, DataChangeNotifier dataChangeNotifier) throws com.ibm.commons.iloader.node.NodeException
ILoader
instance
- an instance of the model that contains the given attributeattribute
- the attribute whose value is to be setvalue
- the value to set the attribute to
NodeException
- throws a NodeException if the given attribute is not supported by the ILoaderIAttribute
public java.lang.Object getObject(java.lang.Object instance, IAttribute attribute) throws com.ibm.commons.iloader.node.NodeException
ILoader
instance
- an instance of the model that contains the given attributeattribute
- the attribute whose value is to be set
NodeException
- throws a NodeException if the particular object/attribute is not supported by the current ILoaderIAttribute
public void setObject(java.lang.Object instance, IAttribute attribute, java.lang.Object value, DataChangeNotifier dataChangeNotifier) throws com.ibm.commons.iloader.node.NodeException
ILoader
instance
- an instance of the model that contains the given attributeattribute
- the attribute whose value is to be setvalue
- the value that is to be set on the IAttributedataChangeNotifier
- a notifier that should be notified when the value changes
NodeException
- throws a NodeException if the particular object/attribute is not supported by the current ILoaderIAttribute
public IValueCollection getValueCollection(java.lang.Object instance, ICollection collection) throws com.ibm.commons.iloader.node.NodeException
ILoader
instance
- an instance of the model that contains the given collectioncollection
- the ICollection whose value is sought
NodeException
- throws a NodeException if the particular object/attribute is not supported by the current ILoaderICollection
public IObjectCollection getObjectCollection(java.lang.Object instance, ICollection collection) throws com.ibm.commons.iloader.node.NodeException
ILoader
instance
- an instance of the model that contains the given collectioncollection
- the ICollection whose value is sought
NodeException
- throws a NodeException if the particular object/attribute is not supported by the current ILoaderICollection
public java.util.Iterator getInheritingClassesOf(IClassDef classDef)
ILoader
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |