Java API ReferenceClass Hierarchy | All Classes | All Fields and Methods

com.ibm.xtools.patterns.framework

Class PatternParameterDelegate

+-- AbstractPatternDelegate
      +-- PatternParameterDelegate

public Class PatternParameterDelegate
extends AbstractPatternDelegate

Specializes the abstract pattern delegate abstract class.

A pattern parameter delegate enables a pattern parameter to delegate some of its behavior to another pattern definition. This class acts as an adapter, adapting the pattern parameter expand-related method interface to the pattern service's pattern manipulation interfaces.


Constructor summary
PatternParameterDelegate(AbstractPatternParameter parameter, PatternDefinitionUsage usage)

Constructs a pattern parameter delegate given a pattern parameter and a pattern definition usage.

PatternParameterDelegate(AbstractPatternParameter parameter, PatternDefinitionUsage usage, PatternParameterMapping.Provider provider)

Constructs a pattern parameter delegate given a pattern parameter and a pattern definition usage.

Method summary
booleanexpand(PatternParameterValue.Added value)

Invokes another expand method variant that takes the more general pattern parameter value.

booleanexpand(PatternParameterValue.Maintained value)

Invokes another expand method variant that takes the more general pattern parameter value.

booleanexpand(PatternParameterValue.Removed value)

The removed variant of the expand method takes a single pattern parameter value object and adapts this call into the appropriate pattern service interface calls.

booleanexpand(PatternParameterValue.Replaced value)

The replaced variant of the expand method takes a single pattern parameter value object and adapts this call into the appropriate pattern service interface calls.

booleanexpand(PatternParameterValue value)

Represents the general expand method that takes a single pattern parameter value object, and adapts this call into the appropriate pattern service interface calls.

Constructor detail

PatternParameterDelegate

public PatternParameterDelegate(AbstractPatternParameter parameter, PatternDefinitionUsage usage)

Constructs a pattern parameter delegate given a pattern parameter and a pattern definition usage.

Parameters:

parameter
- The pattern parameter to be associated with this pattern parameter delegate.
usage
- The pattern definition usage that defines the pattern definition to use for delegation.

PatternParameterDelegate

public PatternParameterDelegate(AbstractPatternParameter parameter, PatternDefinitionUsage usage, PatternParameterMapping.Provider provider)

Constructs a pattern parameter delegate given a pattern parameter and a pattern definition usage.

A mapping provider instance is also given as the last parameter. The expand methods are delegated to parameter delegates as detailed by a pattern parameter internal behavior.

Parameters:

parameter
- The pattern parameter to be associated with this pattern parameter.
usage
- The pattern definition usage that defines the pattern definition to use for delegation.
provider
- The mapping provider that will be called back for mapping to take place.

Method detail

expand

public boolean expand(PatternParameterValue.Added value)

Invokes another expand method variant that takes the more general pattern parameter value.

This is typically the behavior needed by the pattern implementation.

Parameters:

value
- The value to be forwarded to the more general expand(final PatternParameterValue) method.

Returns:

A boolean value of true if the expand method completes all notifications. Otherwise, it returns a value of false.

expand

public boolean expand(PatternParameterValue.Maintained value)

Invokes another expand method variant that takes the more general pattern parameter value.

This is typically the behavior needed by the pattern implementation.

Parameters:

value
- The value to be forwarded to the more general expand(final PatternParameterValue) method.

Returns:

A boolean value of true if the expand method completes all notifications. Otherwise, it returns a value of false.

expand

public boolean expand(PatternParameterValue.Removed value)

The removed variant of the expand method takes a single pattern parameter value object and adapts this call into the appropriate pattern service interface calls.

The value is passed in to the remove parameter value method within the service and the expand pattern method is called on the newly acquired pattern instance.

Parameters:

value
- The value involved in the pattern expansion.

Returns:

A boolean value of true if the expand method of the used pattern definition does not stop in the middle of expanding the pattern. Otherwise, it returns a value of false. If false is returned on the internal expand then it will be send back through this return value.

expand

public boolean expand(PatternParameterValue.Replaced value)

The replaced variant of the expand method takes a single pattern parameter value object and adapts this call into the appropriate pattern service interface calls.

The value is passed (both original value and replacement) into the replaced parameter value method within the service and the expand pattern method is called on the newly acquired pattern instance.

Parameters:

value
- The value involved in the pattern expansion.

Returns:

A boolean value of true if the expand method of the used pattern definition does not stop in the middle of expanding the pattern. Otherwise, it returns a value of false. If false is returned on the internal expand then it will be send back through this return value.

expand

public boolean expand(PatternParameterValue value)

Represents the general expand method that takes a single pattern parameter value object, and adapts this call into the appropriate pattern service interface calls.

The value is passed in to the add parameter value method within the service and the expand pattern method is called on the newly acquired pattern instance.

Parameters:

value
- The value involved in the pattern expansion.

Returns:

A boolean value of true if the expand method of the used pattern definition does not stop in the middle of expanding the pattern. Otherwise, it returns a value of false. If false is returned on the internal expand, then it will be send back through this return value.


Feedback