IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.patterns.core
Class AbstractPatternInstanceProvider

java.lang.Object
  extended bycom.ibm.xtools.common.core.service.AbstractProvider
      extended bycom.ibm.xtools.patterns.core.AbstractPatternInstanceProvider
All Implemented Interfaces:
IProvider
Direct Known Subclasses:
AbstractPatternLibrary

public abstract class AbstractPatternInstanceProvider
extends AbstractProvider

Defines the operations that must be implemented by a pattern library plugin in order to create instances of patterns.


Constructor Summary
AbstractPatternInstanceProvider()
          The default constructor for an abstract pattern instance provider.
 
Method Summary
abstract  AbstractPatternInstance createContainedPatternInstance(IPatternDescriptor pattern, Object container, PatternInstanceOption[] options, AbstractPatternResult results, MultiStatus status)
          Creates an instance of the pattern represented by the given pattern descriptor using the given object as the container for the instance.
abstract  AbstractPatternInstance createPatternInstance(IPatternDescriptor pattern, IParameterDescriptor parameter, Object targetObject, PatternInstanceOption[] options, AbstractPatternResult results, MultiStatus status)
          Creates an instance of the pattern represented by the given pattern descriptor using the given object as an argument for the given parameter of the instance.
abstract  AbstractPatternInstance createPatternInstance(IPatternDescriptor pattern, Object targetObject, PatternInstanceOption[] options, AbstractPatternResult results, MultiStatus status)
          Creates an instance of the pattern represented by the given pattern descriptor using the given object as the bound element for the instance.
abstract  AbstractPatternInstance getAppliedPatternInstance(IPatternApplication pattern, EObject applicationObject, MultiStatus status)
          Returns the instance of an application of the given pattern to the given object.
abstract  IPatternApplication[] getAppliedPatterns(EObject applicationObject, MultiStatus status)
          Returns a collection of pattern application objects for all known instances of patterns applied to the given object.
 
Methods inherited from class com.ibm.xtools.common.core.service.AbstractProvider
addProviderChangeListener, fireProviderChange, removeProviderChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.xtools.common.core.service.IProvider
provides
 

Constructor Detail

AbstractPatternInstanceProvider

public AbstractPatternInstanceProvider()
The default constructor for an abstract pattern instance provider.

Method Detail

createPatternInstance

public abstract AbstractPatternInstance createPatternInstance(IPatternDescriptor pattern,
                                                              Object targetObject,
                                                              PatternInstanceOption[] options,
                                                              AbstractPatternResult results,
                                                              MultiStatus status)
Creates an instance of the pattern represented by the given pattern descriptor using the given object as the bound element for the instance.

Parameters:
pattern - The pattern to be instantiated.
targetObject - The candidate object for the bound element of the instance.
options - The options to use when creating the instance.
results - The results of the operation.
status - The status produced by the operation.
Returns:
Returns the created pattern instance.

createPatternInstance

public abstract AbstractPatternInstance createPatternInstance(IPatternDescriptor pattern,
                                                              IParameterDescriptor parameter,
                                                              Object targetObject,
                                                              PatternInstanceOption[] options,
                                                              AbstractPatternResult results,
                                                              MultiStatus status)
Creates an instance of the pattern represented by the given pattern descriptor using the given object as an argument for the given parameter of the instance.

Parameters:
pattern - The pattern to be instantiated.
targetObject - The candidate object the argument.
parameter - The parameter of the pattern for which the object will be an argument.
options - The options to use when creating the instance.
results - The results of the operation.
status - The status produced by the operation.
Returns:
Returns the created pattern instance.

createContainedPatternInstance

public abstract AbstractPatternInstance createContainedPatternInstance(IPatternDescriptor pattern,
                                                                       Object container,
                                                                       PatternInstanceOption[] options,
                                                                       AbstractPatternResult results,
                                                                       MultiStatus status)
Creates an instance of the pattern represented by the given pattern descriptor using the given object as the container for the instance.

Parameters:
pattern - The pattern to be instantiated.
container - The container of the pattern instance.
options - The options to use when creating the instance.
results - The results of the operation.
status - The status produced by the operation.
Returns:
Returns the created pattern instance.

getAppliedPatterns

public abstract IPatternApplication[] getAppliedPatterns(EObject applicationObject,
                                                         MultiStatus status)
Returns a collection of pattern application objects for all known instances of patterns applied to the given object.

The instance information must be stored with the object in a way that makes it accessible to the pattern service, so the object must be an EObject.

Parameters:
applicationObject - The ecore object to which the patterns have been applied.
status - The status produced by the operation.
Returns:
Returns the applications for the pattern.

getAppliedPatternInstance

public abstract AbstractPatternInstance getAppliedPatternInstance(IPatternApplication pattern,
                                                                  EObject applicationObject,
                                                                  MultiStatus status)
Returns the instance of an application of the given pattern to the given object.

Parameters:
pattern - The pattern definition which was instantiated.
applicationObject - The ecore object to which the pattern was applied.
status - The status produced by the operation.
Returns:
Returns the applied pattern instance.

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.