|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.java.plugin.extension.AnnotatedExtension
public class AnnotatedExtension
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.java.plugin.registry.Extension |
---|
Extension.Parameter |
Constructor Summary | |
---|---|
AnnotatedExtension(PluginDescriptor pluginDescriptor,
java.lang.String id,
java.lang.String plugin,
java.lang.String point,
java.util.List<ParameterContainer> parameters)
|
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 Extension.get(String) and
converts it into the given type. |
|
PluginDescriptor |
getDeclaringPluginDescriptor()
Returns plug-in descriptor, this element belongs to. |
|
PluginFragment |
getDeclaringPluginFragment()
Returns descriptor of plug-in fragment that contributes this element. |
|
java.lang.String |
getDocsPath()
|
|
Documentation<Extension> |
getDocumentation()
|
|
java.lang.String |
getExtendedPluginId()
|
|
java.lang.String |
getExtendedPointId()
|
|
java.lang.String |
getId()
|
|
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)
|
|
java.lang.String |
getUniqueId()
|
|
boolean |
isValid()
|
|
java.lang.String |
toString()
|
|
java.util.Collection<IntegrityCheckReport.ReportItem> |
validate()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AnnotatedExtension(PluginDescriptor pluginDescriptor, java.lang.String id, java.lang.String plugin, java.lang.String point, java.util.List<ParameterContainer> parameters)
Method Detail |
---|
public java.lang.String getExtendedPluginId()
getExtendedPluginId
in interface Extension
public java.lang.String getExtendedPointId()
getExtendedPointId
in interface Extension
public Extension.Parameter getParameter(java.lang.String id)
Extension
null
if no top
level parameters exist. If more than one top level parameters with given
ID found, the method should throw an IllegalArgumentException
.
getParameter
in interface Extension
id
- ID of parameter to look for
public java.util.Collection<Extension.Parameter> getParameters()
Extension
getParameters
in interface Extension
Extension.Parameter
objectspublic java.util.Collection<Extension.Parameter> getParameters(java.lang.String id)
getParameters
in interface Extension
id
- ID of parameter to look for
public java.lang.String getUniqueId()
getUniqueId
in interface UniqueIdentity
public java.lang.String getId()
getId
in interface Identity
public PluginDescriptor getDeclaringPluginDescriptor()
PluginElement
null
.
getDeclaringPluginDescriptor
in interface PluginElement<Extension>
public PluginFragment getDeclaringPluginFragment()
PluginElement
null
, if element is contributed by
plug-in directly.
getDeclaringPluginFragment
in interface PluginElement<Extension>
public java.lang.String getDocsPath()
getDocsPath
in interface Documentable<Extension>
public Documentation<Extension> getDocumentation()
getDocumentation
in interface Documentable<Extension>
null
if there is no documentation providedpublic boolean isValid()
isValid
in interface Extension
true
if extension is considered to be validpublic java.lang.String get(java.lang.String name)
Extension
get
in interface Extension
name
- of the parameter
public <T> T get(java.lang.String name, java.lang.Class<? extends T> type)
Extension
Extension.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.
get
in interface Extension
name
- the name of the parametertype
- the target type
public java.util.Collection<IntegrityCheckReport.ReportItem> validate()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object createInstance() throws JpfException
Extension
createInstance
in interface Extension
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 |