|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Extension
This interface abstracts an extension - particular functionality, the plug-in contribute to the system.
Extension UID is a combination of declaring plug-in ID and extension ID that is unique within whole set of registered plug-ins.
Nested Class Summary | |
---|---|
static interface |
Extension.Parameter
This interface abstracts extension parameter according to extension declaration in manifest. |
Method Summary | ||
---|---|---|
java.lang.Object |
createInstance()
If this extension provides a parameter "class", this will create a new instance of that class. |
|
java.lang.String |
get(java.lang.String name)
Returns the raw value of a given parameter if set. |
|
|
get(java.lang.String name,
java.lang.Class<? extends T> type)
Gets the raw value for the given parameter using get(String) and
converts it into the given type. |
|
java.lang.String |
getExtendedPluginId()
|
|
java.lang.String |
getExtendedPointId()
|
|
Extension.Parameter |
getParameter(java.lang.String id)
Returns top level parameter with given ID or null if no top
level parameters exist. |
|
java.util.Collection<Extension.Parameter> |
getParameters()
Returns collection of all top level parameters defined in this extension. |
|
java.util.Collection<Extension.Parameter> |
getParameters(java.lang.String id)
|
|
boolean |
isValid()
|
Methods inherited from interface org.java.plugin.registry.UniqueIdentity |
---|
getUniqueId |
Methods inherited from interface org.java.plugin.registry.Identity |
---|
getId |
Methods inherited from interface org.java.plugin.registry.PluginElement |
---|
getDeclaringPluginDescriptor, getDeclaringPluginFragment |
Methods inherited from interface org.java.plugin.registry.Identity |
---|
getId |
Methods inherited from interface org.java.plugin.registry.Documentable |
---|
getDocsPath, getDocumentation |
Method Detail |
---|
java.util.Collection<Extension.Parameter> getParameters()
Extension.Parameter
objectsExtension.Parameter getParameter(java.lang.String id)
null
if no top
level parameters exist. If more than one top level parameters with given
ID found, the method should throw an IllegalArgumentException
.
id
- ID of parameter to look for
java.util.Collection<Extension.Parameter> getParameters(java.lang.String id)
id
- ID of parameter to look for
java.lang.String getExtendedPluginId()
java.lang.String getExtendedPointId()
boolean isValid()
true
if extension is considered to be validjava.lang.String get(java.lang.String name)
name
- of the parameter
<T> T get(java.lang.String name, java.lang.Class<? extends T> type)
get(String)
and
converts it into the given type. This returns null if the parameter is null
and throws a RuntimException if the conversion fails.
name
- the name of the parametertype
- the target type
java.lang.RuntimeException
- if the conversion failsjava.lang.Object createInstance() throws JpfException
JpfException
- if the class was not found, could not be isntanciated or the extension does not provide a class parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |