JPF 1.5.1

org.java.plugin.tools.mocks
Class MockParameterDefinition

java.lang.Object
  extended by org.java.plugin.tools.mocks.MockIdentity
      extended by org.java.plugin.tools.mocks.MockPluginElement<ExtensionPoint.ParameterDefinition>
          extended by org.java.plugin.tools.mocks.MockParameterDefinition
All Implemented Interfaces:
Documentable<ExtensionPoint.ParameterDefinition>, ExtensionPoint.ParameterDefinition, Identity, PluginElement<ExtensionPoint.ParameterDefinition>

public class MockParameterDefinition
extends MockPluginElement<ExtensionPoint.ParameterDefinition>
implements ExtensionPoint.ParameterDefinition

Version:
$Id$

Constructor Summary
MockParameterDefinition()
           
 
Method Summary
 MockParameterDefinition addSubDefinition(ExtensionPoint.ParameterDefinition parameterDefinition)
           
 java.lang.String getCustomData()
           
 ExtensionPoint getDeclaringExtensionPoint()
           
 java.lang.String getDefaultValue()
           
 ParameterMultiplicity getMultiplicity()
           
 ExtensionPoint.ParameterDefinition getSubDefinition(java.lang.String id)
           
 java.util.Collection<ExtensionPoint.ParameterDefinition> getSubDefinitions()
          Returns collection of all parameter sub-definitions declared in this parameter definition.
 ExtensionPoint.ParameterDefinition getSuperDefinition()
           
 ParameterType getType()
           
 MockParameterDefinition setCustomData(java.lang.String value)
           
 MockParameterDefinition setDeclaringExtensionPoint(ExtensionPoint value)
           
 MockParameterDefinition setDefaultValue(java.lang.String value)
           
 MockParameterDefinition setMultiplicity(ParameterMultiplicity value)
           
 MockParameterDefinition setSuperDefinition(ExtensionPoint.ParameterDefinition value)
           
 MockParameterDefinition setType(ParameterType value)
           
 
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

MockParameterDefinition

public MockParameterDefinition()
Method Detail

getCustomData

public java.lang.String getCustomData()
Specified by:
getCustomData in interface ExtensionPoint.ParameterDefinition
Returns:
custom data for additional customization of some types
See Also:
ExtensionPoint.ParameterDefinition.getCustomData()

setCustomData

public MockParameterDefinition setCustomData(java.lang.String value)
Parameters:
value - the custom data to set
Returns:
this instance

getDeclaringExtensionPoint

public ExtensionPoint getDeclaringExtensionPoint()
Specified by:
getDeclaringExtensionPoint in interface ExtensionPoint.ParameterDefinition
Returns:
extension point, this definition belongs to
See Also:
ExtensionPoint.ParameterDefinition.getDeclaringExtensionPoint()

setDeclaringExtensionPoint

public MockParameterDefinition setDeclaringExtensionPoint(ExtensionPoint value)
Parameters:
value - the declaring extension point to set
Returns:
this instance

getDefaultValue

public java.lang.String getDefaultValue()
Specified by:
getDefaultValue in interface ExtensionPoint.ParameterDefinition
Returns:
default parameter value as it is defined in manifest
See Also:
ExtensionPoint.ParameterDefinition.getDefaultValue()

setDefaultValue

public MockParameterDefinition setDefaultValue(java.lang.String value)
Parameters:
value - the default value to set
Returns:
this instance

getMultiplicity

public ParameterMultiplicity getMultiplicity()
Specified by:
getMultiplicity in interface ExtensionPoint.ParameterDefinition
Returns:
multiplicity of parameter, that can be defined according to this definition
See Also:
ExtensionPoint.ParameterDefinition.getMultiplicity()

setMultiplicity

public MockParameterDefinition setMultiplicity(ParameterMultiplicity value)
Parameters:
value - the multiplicity to set
Returns:
this instance

getSubDefinition

public ExtensionPoint.ParameterDefinition getSubDefinition(java.lang.String id)
Specified by:
getSubDefinition in interface ExtensionPoint.ParameterDefinition
Parameters:
id - ID of parameter sub-definition to look for
Returns:
parameter sub-definition with given ID
See Also:
ExtensionPoint.ParameterDefinition.getSubDefinition(java.lang.String)

getSubDefinitions

public java.util.Collection<ExtensionPoint.ParameterDefinition> getSubDefinitions()
Description copied from interface: ExtensionPoint.ParameterDefinition
Returns collection of all parameter sub-definitions declared in this parameter definition.

Specified by:
getSubDefinitions in interface ExtensionPoint.ParameterDefinition
Returns:
collection of ExtensionPoint.ParameterDefinition objects
See Also:
ExtensionPoint.ParameterDefinition.getSubDefinitions()

addSubDefinition

public MockParameterDefinition addSubDefinition(ExtensionPoint.ParameterDefinition parameterDefinition)
Parameters:
parameterDefinition - sub-parameter definition to add
Returns:
this instance

getSuperDefinition

public ExtensionPoint.ParameterDefinition getSuperDefinition()
Specified by:
getSuperDefinition in interface ExtensionPoint.ParameterDefinition
Returns:
parameter definition, of which this one is child or null if this is top level parameter definition
See Also:
ExtensionPoint.ParameterDefinition.getSuperDefinition()

setSuperDefinition

public MockParameterDefinition setSuperDefinition(ExtensionPoint.ParameterDefinition value)
Parameters:
value - the super definition to set
Returns:
this instance

getType

public ParameterType getType()
Specified by:
getType in interface ExtensionPoint.ParameterDefinition
Returns:
value type of parameter, that can be defined according to this definition
See Also:
ExtensionPoint.ParameterDefinition.getType()

setType

public MockParameterDefinition setType(ParameterType value)
Parameters:
value - the type to set
Returns:
this instance

JPF 1.5.1

Copyright © 2004-2007 Dmitry Olshansky. All Rights Reserved.