|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ide.inspector.InspectorFactory
public class InspectorFactory
The InspectorFactory class is a singleton class that provides a registry for registering Inspectable implementations on a class by class basis.
Method Summary | |
---|---|
void |
addInspectableFactory(InspectableFactory factory) Register an InspectableFactory to be used when requesting an Inspectable for a given Context in its entirety. |
static java.beans.BeanInfo |
getBeanInfo(java.lang.Class beanType) Utility method to retrieve a BeanInfo for a given class. |
Inspectable |
getInspectable(Context context, Element e) Get an Inspectable implementation for the data referred to by the given Element within the given Context, else null if no Inspectable can be found for the given Element's data. |
java.util.List<Inspectable> |
getInspectables(Context context) Get an Inspectable implementation for the entire set of data referred to within the given Context, else null if no single Inspectable can be found to handle the entire contents. |
static InspectorFactory |
getInstance() |
MultiInspectable |
getMultiInspectable(Context context) Get a MultiInspectable instance for the given Context. |
java.lang.Class |
getPropertyModelType(java.lang.Class desiredType) Get the registered IdePropertyModel type for the data type provided, else the default type IdeMultiObjectModel.class. |
void |
register(PropertyModelFactory factory) |
void |
registerInspectable(java.lang.Class targetType, java.lang.Class inspectableType) Register an Inspectable type to be used when requesting the Inspectable for a given data type. |
void |
registerPropertyModel(java.lang.Class targetType, java.lang.Class modelType) Register an IdePropertyModel type to be used when requesting the model type for a given data type. |
void |
remove(PropertyModelFactory factory) |
void |
removeInspectableFactory(InspectableFactory factory) Remove a registered InspectableFactory. |
void |
setDefaultInspectable(java.lang.Class cls) Set the default Inspectable implementation to use when no other match can be found for any give Class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static InspectorFactory getInstance()
public MultiInspectable getMultiInspectable(Context context)
context
- the Context for which a MultiInspectable is desired.public java.util.List<Inspectable> getInspectables(Context context)
context
- the Context in which to interpret the Element.public Inspectable getInspectable(Context context, Element e)
context
- the Context in which to interpret the Element.e
- the Element holding the data to inspect.public void registerInspectable(java.lang.Class targetType, java.lang.Class inspectableType) throws java.lang.ClassCastException
Register an Inspectable type to be used when requesting the Inspectable for a given data type. Registering a null value for a given data type will remove any previous Inspectable registered for that data type.
By default any data type which implements SupportsInspection is already registered to use the DefaultInspectable and need not be registered by a call to this method.
Use this method when an instance of the targetClass could theoretically appear as the contents of a selection along with selected objects of some other data type. For example: A Node type for one kind of file could easily appear in a selection with a Node type of different kind of file within the Context of a NavigatorWindow or the Context of a UML Modeler. If the result of Node.getData() for each of those Node types both are available to inspection, then they each should be registered independantly via this method.
Typically, this is the method that most integrators would use, and still applies even if the targetClass is never expected to be intermixed in a selection with any other data types.
targetType
- the data type for which an Inspectable implementation is being registered.inspectableType
- the Inspectable implementation being registered.java.lang.ClassCastException
- Thrown when inspectableClass is not an instance of Inspectable.Element.getData()
public void register(PropertyModelFactory factory)
public void remove(PropertyModelFactory factory)
public void addInspectableFactory(InspectableFactory factory)
factory
- an InspectableFactory capable of handling a Context whose selection is made up of homogenous Elements of a unique data type.registerInspectable(java.lang.Class, java.lang.Class)
, Element.getData()
public void removeInspectableFactory(InspectableFactory factory)
factory
- the InspectableFactory to remove.public void setDefaultInspectable(java.lang.Class cls)
cls
- the Inspectable implementation to use as default.public java.lang.Class getPropertyModelType(java.lang.Class desiredType)
desiredType
- the data type for which a model type is desired.public void registerPropertyModel(java.lang.Class targetType, java.lang.Class modelType) throws java.lang.ClassCastException
targetType
- the data type for which an IdePropertyModel implementation is being registered.modelType
- the IdePropertyModel implementation being registered.java.lang.ClassCastException
- Thrown when modelClass does not extend IdePropertyModelgetPropertyModelType(java.lang.Class)
public static final java.beans.BeanInfo getBeanInfo(java.lang.Class beanType) throws java.beans.IntrospectionException
beanType
- the Class for which a BeanInfo is desired.java.beans.IntrospectionException
- if an exception occurs during introspection.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |