public abstract class AbstractExtensionPointBean extends java.lang.Object implements PluginAware
Modifier and Type | Field and Description |
---|---|
protected PluginDescriptor |
myPluginDescriptor |
Constructor and Description |
---|
AbstractExtensionPointBean() |
Modifier and Type | Method and Description |
---|---|
<T> java.lang.Class<T> |
findClass(java.lang.String className)
Deprecated.
use
findExtensionClass(String) instead. It'll throw ExtensionInstantiationException instead of
ClassNotFoundException , which contains information about the plugin which registers the problematic extension so error reporters
will be able to report such exception as a plugin problem, not core problem. Also it isn't a checked exception so you won't need to wrap
it to unchecked exception in your code. |
static <T> java.lang.Class<T> |
findClass(java.lang.String className,
PluginDescriptor pluginDescriptor) |
<T> java.lang.Class<T> |
findClassNoExceptions(java.lang.String className) |
<T> java.lang.Class<T> |
findExtensionClass(java.lang.String className) |
java.lang.ClassLoader |
getLoaderForClass() |
PluginDescriptor |
getPluginDescriptor() |
PluginId |
getPluginId() |
static <T> T |
instantiate(java.lang.Class<T> aClass,
PicoContainer container) |
static <T> T |
instantiate(java.lang.Class<T> aClass,
PicoContainer container,
boolean allowNonPublicClasses) |
<T> T |
instantiate(java.lang.String className,
PicoContainer container)
Deprecated.
use
instantiateClass(String, PicoContainer) instead. It'll throw ExtensionInstantiationException instead of
ClassNotFoundException , which contains information about the plugin which registers the problematic extension so error reporters
will be able to report such exception as a plugin problem, not core problem. Also it isn't a checked exception so you won't need to wrap
it to unchecked exception in your code. |
<T> T |
instantiateClass(java.lang.String className,
PicoContainer container) |
void |
setPluginDescriptor(PluginDescriptor pluginDescriptor)
Called by extensions framework when extension is loaded from plugin.xml descriptor.
|
protected PluginDescriptor myPluginDescriptor
public PluginDescriptor getPluginDescriptor()
public final void setPluginDescriptor(PluginDescriptor pluginDescriptor)
PluginAware
If this method is implemented in a bean class
extension point and it also exposes the stored plugin description via getPluginDescriptor
method, you must annotate the latter
with @Transient
to ensure that serialization engine won't try to deserialize this property.
setPluginDescriptor
in interface PluginAware
pluginDescriptor
- descriptor of the plugin that provided this particular extension.public PluginId getPluginId()
@Deprecated public final <T> java.lang.Class<T> findClass(java.lang.String className) throws java.lang.ClassNotFoundException
findExtensionClass(String)
instead. It'll throw ExtensionInstantiationException
instead of
ClassNotFoundException
, which contains information about the plugin which registers the problematic extension so error reporters
will be able to report such exception as a plugin problem, not core problem. Also it isn't a checked exception so you won't need to wrap
it to unchecked exception in your code.java.lang.ClassNotFoundException
public final <T> java.lang.Class<T> findExtensionClass(java.lang.String className)
public static <T> java.lang.Class<T> findClass(java.lang.String className, PluginDescriptor pluginDescriptor) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public final <T> java.lang.Class<T> findClassNoExceptions(java.lang.String className)
public java.lang.ClassLoader getLoaderForClass()
@Deprecated public final <T> T instantiate(java.lang.String className, PicoContainer container) throws java.lang.ClassNotFoundException
instantiateClass(String, PicoContainer)
instead. It'll throw ExtensionInstantiationException
instead of
ClassNotFoundException
, which contains information about the plugin which registers the problematic extension so error reporters
will be able to report such exception as a plugin problem, not core problem. Also it isn't a checked exception so you won't need to wrap
it to unchecked exception in your code.java.lang.ClassNotFoundException
public final <T> T instantiateClass(java.lang.String className, PicoContainer container)
public static <T> T instantiate(java.lang.Class<T> aClass, PicoContainer container)
public static <T> T instantiate(java.lang.Class<T> aClass, PicoContainer container, boolean allowNonPublicClasses)