|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.1.0) E17493-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.ide.extension.ElementVisitor javax.ide.extension.ExtensionHook javax.ide.extension.DynamicHook
public class DynamicHook
An implementation of ExtensionHook that automatically populates model objects using reflection.
This class now strongly encourages delayed classloading through the
definition of MetaClass
handling set/add methods on model
classes.
In future, DynamicHook will be moved over to a strict classloading
policy requiring that any application objects whose classes are not
accessible to the classloader of the hook handler implementation must
be set on the model through new MetaClass signature
methods.
Currently, the Boolean system property DynamicHook.strict is
provided to allow implementors to ensure that their handlers and models
operate correctly under strict classloading. Note that this policy will
soon become the default behavior, and later the only supported behavior
of DynamicHook. The use of this option is recommended in the interests
of determining future compliance. In strict mode, any failures will be
reported to the Logger
of the ElementContext
.
Nested Class Summary | |
---|---|
static interface |
DynamicHook.ElementTypeResolver
An object which can resolve an ElementName into a Class type for that element. |
Nested classes/interfaces inherited from class javax.ide.extension.ExtensionHook |
---|
ExtensionHook.URIResource |
Nested classes/interfaces inherited from class javax.ide.extension.ElementVisitor |
---|
ElementVisitor.ResourceBundleProvider |
Field Summary | |
---|---|
java.lang.String |
sApplicationObjectKey
|
Fields inherited from class javax.ide.extension.ExtensionHook |
---|
KEY_EXTENSION, KEY_RSBUNDLE_CLASS, MANIFEST_XMLNS |
Fields inherited from class javax.ide.extension.ElementVisitor |
---|
KEY_LOCATOR |
Constructor Summary | |
---|---|
DynamicHook(java.lang.Object rootObject)
|
|
DynamicHook(java.lang.Object rootObject,
java.lang.ClassLoader classLoader)
|
|
DynamicHook(java.lang.Object rootObject,
java.lang.ClassLoader classLoader,
DynamicHook.ElementTypeResolver resolver)
|
Method Summary | ||
---|---|---|
protected void |
attachClass(java.lang.Object parent,
MetaClass metaClass,
ElementEndContext context)
|
|
protected void |
attachData(java.lang.Object parent,
java.lang.String data,
ElementEndContext context)
|
|
protected void |
attachObject(java.lang.Object parent,
java.lang.Object child,
ElementEndContext context)
|
|
protected ElementVisitorFactory |
createVisitorFactory()
If the hook implementation and its associated model use delayed classloading (as recommended), any ElementVisitorFactory
being attached to a handled context must created by this method. |
|
void |
end(ElementEndContext context)
Visit the end tag of an xml element. |
|
protected java.lang.reflect.Method |
findMethod(ElementContext context,
java.lang.Object o,
java.lang.String elementName,
java.lang.Class[] paramTypes)
|
|
protected java.lang.Object |
getApplicationObject(java.lang.Class runtimeType,
ElementStartContext context)
Deprecated. replaced by getApplicationObject(MetaClass,ElementStartContext) |
|
protected
|
getApplicationObject(MetaClass<T> runtimeMetaType,
ElementStartContext context)
|
|
protected java.lang.String |
getHookNamespaceURI()
|
|
protected java.lang.String |
getMethodName(java.lang.String prefix,
java.lang.String elementName)
|
|
protected
|
getRuntimeMetaType(ElementStartContext context)
|
|
protected java.lang.Class |
getRuntimeType(ElementStartContext context)
Deprecated. replaced by getRuntimeMetaType(ElementStartContext) |
|
protected void |
handleComplexElementEnd(ElementEndContext context)
|
|
protected void |
handleComplexElementStart(java.lang.Object applicationObject,
ElementStartContext context)
|
|
protected void |
handleSimpleElementEnd(ElementEndContext context)
|
|
protected void |
handleSimpleElementStart(ElementStartContext context)
|
|
protected void |
invokePostInitialize(java.lang.Object target)
|
|
protected void |
invokePreInitialize(java.lang.Object parent,
java.lang.Object target)
|
|
void |
registerElementTypeResolver(DynamicHook.ElementTypeResolver resolver)
|
|
void |
start(ElementStartContext context)
Visit the start tag of an xml element. |
Methods inherited from class javax.ide.extension.ExtensionHook |
---|
findPath, getExtension, getProvider, getRSBundleClass, getSchemaLocation, resolvePath, setProvider, setSchemaLocation |
Methods inherited from class javax.ide.extension.ElementVisitor |
---|
getAttributeHelper, getClassLoader, getMetaClassLoader, getResourceBundle, getResourceBundleProvider, getTextHelper, log, log, setResourceBundleProvider |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final java.lang.String sApplicationObjectKey
Constructor Detail |
---|
public DynamicHook(java.lang.Object rootObject)
public DynamicHook(java.lang.Object rootObject, java.lang.ClassLoader classLoader)
public DynamicHook(java.lang.Object rootObject, java.lang.ClassLoader classLoader, DynamicHook.ElementTypeResolver resolver)
Method Detail |
---|
public void registerElementTypeResolver(DynamicHook.ElementTypeResolver resolver)
protected ElementVisitorFactory createVisitorFactory()
ElementVisitorFactory
being attached to a handled context must created by this method.
That means either; overriding this method to return the visitor
factory instance, or; enabling this method to create a default
visitor factory by overriding getHookNamespaceURI()
to
return a non-null namespace value that applies to all handled
elements.
protected java.lang.String getHookNamespaceURI()
public void start(ElementStartContext context)
ElementVisitor
This implementation does nothing.
start
in class ElementVisitor
context
- information about the xml start tag.public void end(ElementEndContext context)
ElementVisitor
This implementation does nothing.
end
in class ElementVisitor
context
- information about the xml end tag.protected void handleComplexElementStart(java.lang.Object applicationObject, ElementStartContext context)
protected void handleComplexElementEnd(ElementEndContext context)
protected void handleSimpleElementStart(ElementStartContext context)
protected void handleSimpleElementEnd(ElementEndContext context)
protected <T> MetaClass<T> getRuntimeMetaType(ElementStartContext context)
@Deprecated protected java.lang.Class getRuntimeType(ElementStartContext context)
getRuntimeMetaType(ElementStartContext)
protected <T> T getApplicationObject(MetaClass<T> runtimeMetaType, ElementStartContext context) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
@Deprecated protected java.lang.Object getApplicationObject(java.lang.Class runtimeType, ElementStartContext context)
getApplicationObject(MetaClass,ElementStartContext)
protected void attachClass(java.lang.Object parent, MetaClass metaClass, ElementEndContext context)
protected void attachObject(java.lang.Object parent, java.lang.Object child, ElementEndContext context)
protected void attachData(java.lang.Object parent, java.lang.String data, ElementEndContext context)
protected void invokePreInitialize(java.lang.Object parent, java.lang.Object target)
protected void invokePostInitialize(java.lang.Object target)
protected java.lang.reflect.Method findMethod(ElementContext context, java.lang.Object o, java.lang.String elementName, java.lang.Class[] paramTypes)
protected java.lang.String getMethodName(java.lang.String prefix, java.lang.String elementName)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.1.0) E17493-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |