|
JPF 1.5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.java.plugin.tools.mocks.MockIdentity org.java.plugin.tools.mocks.MockPluginElement<Extension.Parameter> org.java.plugin.tools.mocks.MockParameter
public class MockParameter
Constructor Summary | |
---|---|
MockParameter()
No-arguments constructor. |
|
MockParameter(java.lang.String id,
java.lang.String aRawValue,
java.lang.Object aTypedValue)
|
|
MockParameter(java.lang.String id,
java.lang.String aRawValue,
java.lang.Object aTypedValue,
Extension aDeclaringExtension)
|
Method Summary | |
---|---|
MockParameter |
addParameter(Extension.Parameter parameter)
|
Extension |
getDeclaringExtension()
|
ExtensionPoint.ParameterDefinition |
getDefinition()
Returns definition for this extension parameter. |
Extension.Parameter |
getSubParameter(java.lang.String id)
Returns sub-parameter with given ID or null if no
sub-parameters exist. |
java.util.Collection<Extension.Parameter> |
getSubParameters()
Returns collection of all sub-parameters defined in this parameter. |
java.util.Collection<Extension.Parameter> |
getSubParameters(java.lang.String id)
|
Extension.Parameter |
getSuperParameter()
|
java.lang.String |
rawValue()
|
MockParameter |
setDeclaringExtension(Extension value)
|
MockParameter |
setDefinition(ExtensionPoint.ParameterDefinition value)
|
MockParameter |
setSuperParameter(Extension.Parameter value)
|
MockParameter |
setValue(java.lang.String raw,
java.lang.Object typed)
|
java.lang.Boolean |
valueAsBoolean()
Returns "typed" value of parameter. |
java.util.Date |
valueAsDate()
Returns "typed" value of parameter. |
Extension |
valueAsExtension()
Returns "typed" value of parameter. |
ExtensionPoint |
valueAsExtensionPoint()
Returns "typed" value of parameter. |
java.lang.Number |
valueAsNumber()
Returns "typed" value of parameter. |
PluginDescriptor |
valueAsPluginDescriptor()
Returns "typed" value of parameter. |
java.lang.String |
valueAsString()
Returns "typed" value of parameter. |
java.net.URL |
valueAsUrl()
Returns "typed" value of parameter. |
java.net.URL |
valueAsUrl(PathResolver pathResolver)
Returns "typed" value of parameter. |
Methods inherited from class org.java.plugin.tools.mocks.MockPluginElement |
---|
getDeclaringPluginDescriptor, getDeclaringPluginFragment, getDocsPath, getDocumentation, setDeclaringPluginDescriptor, setDeclaringPluginFragment, setDocsPath, setDocumentation |
Methods inherited from class org.java.plugin.tools.mocks.MockIdentity |
---|
getId, setId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 |
Constructor Detail |
---|
public MockParameter()
public MockParameter(java.lang.String id, java.lang.String aRawValue, java.lang.Object aTypedValue)
id
- parameter IDaRawValue
- raw parameter valueaTypedValue
- typed parameter valuepublic MockParameter(java.lang.String id, java.lang.String aRawValue, java.lang.Object aTypedValue, Extension aDeclaringExtension)
id
- parameter IDaRawValue
- raw parameter valueaTypedValue
- typed parameter valueaDeclaringExtension
- declaring extensionMethod Detail |
---|
public Extension getDeclaringExtension()
getDeclaringExtension
in interface Extension.Parameter
Extension.Parameter.getDeclaringExtension()
public MockParameter setDeclaringExtension(Extension value)
value
- the declaring extension to set
public ExtensionPoint.ParameterDefinition getDefinition()
Extension.Parameter
null
for "invalid" parameters.
getDefinition
in interface Extension.Parameter
null
, if this parameter
is "invalid"Extension.Parameter.getDefinition()
public MockParameter setDefinition(ExtensionPoint.ParameterDefinition value)
value
- the parameter definition to set
public Extension.Parameter getSubParameter(java.lang.String id)
Extension.Parameter
null
if no
sub-parameters exist. If more than one sub-parameters with given ID
found, the method should throw an IllegalArgumentException
.
getSubParameter
in interface Extension.Parameter
id
- ID of sub-parameter to look for
Extension.Parameter.getSubParameter(
java.lang.String)
public java.util.Collection<Extension.Parameter> getSubParameters()
Extension.Parameter
getSubParameters
in interface Extension.Parameter
Extension.Parameter
objectsExtension.Parameter.getSubParameters()
public java.util.Collection<Extension.Parameter> getSubParameters(java.lang.String id)
getSubParameters
in interface Extension.Parameter
id
- ID of sub-parameter to look for
Extension.Parameter.getSubParameters(
java.lang.String)
public MockParameter addParameter(Extension.Parameter parameter)
parameter
- sub-parameter to add
public Extension.Parameter getSuperParameter()
getSuperParameter
in interface Extension.Parameter
null
if
this is top level parameterExtension.Parameter.getSuperParameter()
public MockParameter setSuperParameter(Extension.Parameter value)
value
- the super parameter to set
public java.lang.String rawValue()
rawValue
in interface Extension.Parameter
Extension.Parameter.rawValue()
public MockParameter setValue(java.lang.String raw, java.lang.Object typed)
raw
- raw parameter valuetyped
- typed parameter value
public java.lang.Boolean valueAsBoolean()
Extension.Parameter
ParameterType.BOOLEAN
, this method
should throw an UnsupportedOperationException
.
valueAsBoolean
in interface Extension.Parameter
Extension.Parameter.valueAsBoolean()
public java.util.Date valueAsDate()
Extension.Parameter
ParameterType.DATE
, ParameterType.TIME
or ParameterType.DATE_TIME
, this method should throw an
UnsupportedOperationException
.
valueAsDate
in interface Extension.Parameter
Extension.Parameter.valueAsDate()
public Extension valueAsExtension()
Extension.Parameter
ParameterType.EXTENSION_ID
, this
method should throw an UnsupportedOperationException
.
valueAsExtension
in interface Extension.Parameter
Extension.Parameter.valueAsExtension()
public ExtensionPoint valueAsExtensionPoint()
Extension.Parameter
ParameterType.EXTENSION_POINT_ID
,
this method should throw an UnsupportedOperationException
.
valueAsExtensionPoint
in interface Extension.Parameter
Extension.Parameter.valueAsExtensionPoint()
public java.lang.Number valueAsNumber()
Extension.Parameter
ParameterType.NUMBER
, this method
should throw an UnsupportedOperationException
.
valueAsNumber
in interface Extension.Parameter
Extension.Parameter.valueAsNumber()
public PluginDescriptor valueAsPluginDescriptor()
Extension.Parameter
ParameterType.PLUGIN_ID
, this
method should throw an UnsupportedOperationException
.
valueAsPluginDescriptor
in interface Extension.Parameter
Extension.Parameter.valueAsPluginDescriptor()
public java.lang.String valueAsString()
Extension.Parameter
ParameterType.STRING
, this method
should throw an UnsupportedOperationException
.
valueAsString
in interface Extension.Parameter
Extension.Parameter.valueAsString()
public java.net.URL valueAsUrl()
Extension.Parameter
ParameterType.RESOURCE
, this
method should throw an UnsupportedOperationException
.
valueAsUrl
in interface Extension.Parameter
Extension.Parameter.valueAsUrl()
public java.net.URL valueAsUrl(PathResolver pathResolver)
Extension.Parameter
ParameterType.RESOURCE
, this
method should throw an UnsupportedOperationException
.
valueAsUrl
in interface Extension.Parameter
pathResolver
- path resolver to make URL absolute
Extension.Parameter.valueAsUrl(
org.java.plugin.PathResolver)
|
JPF 1.5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |