|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILoader
An adapter to a real world object. This interface is used to describe the
behavior of a model. Implementors should extend
com.ibm.commons.iloader.node.loaders.AbstractLoader
.
Method Summary | |
---|---|
IClassDef |
getClassOf(java.lang.Object object)
Get the class for a particular object. |
java.util.Iterator<IClassDef> |
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 |
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. |
void |
setObject(java.lang.Object instance,
IAttribute attribute,
java.lang.Object value,
DataChangeNotifier notifier)
Sets an object value for the given attribute. |
void |
setValue(java.lang.Object instance,
IAttribute attribute,
java.lang.String value,
DataChangeNotifier notifier)
Sets the given attribute's value. |
Method Detail |
---|
java.lang.String[] getNamespaces()
boolean handleNamespace(java.lang.String namespace)
boolean isNativeClass(java.lang.Object o)
IClassDef loadClass(java.lang.String namespace, java.lang.String className) throws com.ibm.commons.iloader.node.NodeException
namespace
- the namespace that the IClassDef is to correspond toclassName
- the desired class
com.ibm.commons.iloader.node.NodeException
IClassDef getClassOf(java.lang.Object object) throws com.ibm.commons.iloader.node.NodeException
object
- an object whose IClassDef is required
NodeException
- throws a NodeException if the provided object is supported
by the ILoader.java.util.Iterator<IClassDef> getInheritingClassesOf(IClassDef classDef)
classDef
-
boolean isNativeObject(java.lang.Object o)
java.lang.String getValue(java.lang.Object instance, IAttribute attribute) throws com.ibm.commons.iloader.node.NodeException
instance
- an instance of the model that contains the given attributeattribute
- the attribute whose value is sought
com.ibm.commons.iloader.node.NodeException
IAttribute
void setValue(java.lang.Object instance, IAttribute attribute, java.lang.String value, DataChangeNotifier notifier) throws com.ibm.commons.iloader.node.NodeException
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 toDataChangeNodifier
- a notifier that is to be notified when the value change occurs in the attribute
NodeException
- throws a NodeException if the given attribute is not supported by the ILoaderIAttribute
java.lang.Object getObject(java.lang.Object instance, IAttribute attribute) throws com.ibm.commons.iloader.node.NodeException
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
void setObject(java.lang.Object instance, IAttribute attribute, java.lang.Object value, DataChangeNotifier notifier) throws com.ibm.commons.iloader.node.NodeException
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 IAttributenotifier
- 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
IValueCollection getValueCollection(java.lang.Object instance, ICollection collection) throws com.ibm.commons.iloader.node.NodeException
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
IObjectCollection getObjectCollection(java.lang.Object instance, ICollection collection) throws com.ibm.commons.iloader.node.NodeException
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |