IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.patterns.framework.uml2
Class AbstractPatternDefinition

java.lang.Object
  extended bycom.ibm.xtools.patterns.framework.AbstractPatternElement
      extended bycom.ibm.xtools.patterns.framework.AbstractPatternDefinition
          extended bycom.ibm.xtools.patterns.framework.uml2.AbstractPatternDefinition
All Implemented Interfaces:
Comparable, IPatternDescriptor, ITransformationDescriptor, ITransformationItem, Visitable

public class AbstractPatternDefinition
extends AbstractPatternDefinition

This class (a subclass of the abstract pattern definition) is the primary class that UML2 specific pattern implementations will extend. A UML2 specific pattern is one that defines parameters having UML2 metatypes and/or needs to manipulate UML2 models as the result of the pattern exection. The UML2 specific version of the abstract pattern definition, this class extends from the base framework abstract pattern definition class. The main purpose of having a UML2 specific subclass of the base class is to override the factory method that creates pattern instances and have it return a type of the UML2 specific pattern instance instead of the base one.


Field Summary
 
Fields inherited from interface com.ibm.xtools.patterns.core.IPatternDescriptor
DIAGRAM, DIAGRAM_DELIMITERS, DOCUMENTATION, MANIFEST, MODEL, OVERVIEW_DIAGRAM, PLUGIN_NAME, PLUGIN_URL, TARGET_TYPE, TARGET_TYPE_DELIMITERS, TEMPLATE, TYPE
 
Fields inherited from interface com.ibm.xtools.transform.core.ITransformationDescriptor
AUTHOR, DESCRIPTION, DOCUMENT, EXTENSIBLE, GROUP_PATH, GROUP_PATH_DELIMITERS, ICON, ID, KEYWORDS, KEYWORDS_DELIMITERS, NAME, PROFILES, PROFILES_DELIMITERS, PROVIDER, PUBLIC, SOURCE_MODEL_TYPE, SOURCE_MODEL_TYPE_DELIMITERS, TARGET_MODEL_TYPE, TARGET_MODEL_TYPE_DELIMITERS, TRANSFORM_GUI, VERSION
 
Constructor Summary
protected AbstractPatternDefinition(PatternIdentity identity)
          Constructs an abstract pattern definition given only a pattern identity.
 
Method Summary
protected  AbstractPatternInstance createPatternInstance(Object targetObject, AbstractPatternResult results, MultiStatus status)
          A method that is called when a new pattern instance is requested to be created.
protected  AbstractPatternInstance reconstitutePatternInstance(AbstractPatternDefinition owningDefinition, Object representation)
          A method that is called when an existing pattern instance is requested to be reconstituted.
 
Methods inherited from class com.ibm.xtools.patterns.framework.AbstractPatternDefinition
accept, compareTo, equals, getAdaptableProperty, getAssignedGroups, getContainerTypes, getDescription, getId, getIdentity, getKeywords, getName, getParameters, getProperties, getProperty, getPropertyIds, getTargetTypes, getType, getVersion, hashCode, initialize, initializeInstance, isGroupMember, isPublic, isValid, isValidInstanceTarget
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPatternDefinition

protected AbstractPatternDefinition(PatternIdentity identity)
Constructs an abstract pattern definition given only a pattern identity. The pattern identity will be used to hook up the pattern descriptor with this abstract pattern definition. This constructor is used for statically described patterns rather than dynamically described patterns. Dynamically described patterns would use the constructor that takes the additional information that describes that particular pattern.

Parameters:
identity - the identity of the pattern, used to associate descriptor with this instance of a pattern definition
Method Detail

createPatternInstance

protected AbstractPatternInstance createPatternInstance(Object targetObject,
                                                        AbstractPatternResult results,
                                                        MultiStatus status)
A method that is called when a new pattern instance is requested to be created. This is a factory method and can be overridden in subclasses, the default behavior is to create a default instance.

Overrides:
createPatternInstance in class AbstractPatternDefinition
Parameters:
targetObject - the target object or context of the instantiation
results - any additional model elements that are created are returned here
status - the status generated by creating the patter instance is returned here
Returns:
the new abstract pattern instance is returned

reconstitutePatternInstance

protected AbstractPatternInstance reconstitutePatternInstance(AbstractPatternDefinition owningDefinition,
                                                              Object representation)
A method that is called when an existing pattern instance is requested to be reconstituted. This can be overridden by subclasses.

Overrides:
reconstitutePatternInstance in class AbstractPatternDefinition
Parameters:
owningDefinition - the definition governing the representation instance
representation - the persistent store representation of the pattern instance
Returns:
the reconstituted pattern instance

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

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