IBM Rational Software Modeler
Release 6.0

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

java.lang.Object
  extended bycom.ibm.xtools.patterns.core.AbstractPatternInstance
      extended bycom.ibm.xtools.patterns.framework.AbstractPatternInstance
          extended bycom.ibm.xtools.patterns.framework.uml2.AbstractPatternInstance
All Implemented Interfaces:
Visitable

public abstract class AbstractPatternInstance
extends AbstractPatternInstance

This is the UML2-specific abstract pattern instance. All UML2-specific state and behavior will be encapsulated in this language-specific abstract pattern instance. An abstract pattern instance is used in conjunction with an abstract pattern definition from this package. Both definition and instance will be the UML2-specific variants or neither of them will. The abstract pattern definition in this package has a factory method implementation that creates the default abstract pattern instance as included by the default inner-class in this class.

See Also:
AbstractPatternInstance.Default

Nested Class Summary
 
Nested classes inherited from class com.ibm.xtools.patterns.framework.AbstractPatternInstance
AbstractPatternInstance.PatternParameterValueQueue
 
Field Summary
 
Fields inherited from class com.ibm.xtools.patterns.framework.AbstractPatternInstance
store
 
Constructor Summary
protected AbstractPatternInstance(AbstractPatternDefinition owningDefinition, Object representation)
          Pass-through to super constructor
protected AbstractPatternInstance(AbstractPatternDefinition owningPatternDefinition, Object targetObject, AbstractPatternResult createdElements, org.eclipse.core.runtime.MultiStatus status)
          Pass-through to super constructor
 
Method Summary
 org.eclipse.uml2.Operation ensureAtLeastOneStaticOperation(org.eclipse.uml2.Interface owningInterface, String name)
          Ensure at least one static operation exists.
 org.eclipse.uml2.Association ensureDirectedAssociation(org.eclipse.uml2.Class owningClass, org.eclipse.uml2.Classifier associatedClassifier, String roleName, org.eclipse.uml2.AggregationKind aggregationKind, int multiplicityLowerBound, int multiplicityUpperBound)
          Ensure a directed association exists.
 org.eclipse.uml2.Association ensureDirectedAssociation(org.eclipse.uml2.Class owningClass, String roleName1, org.eclipse.uml2.Classifier associatedClassifier, String roleName2)
          Ensure a directed association exists.
 org.eclipse.uml2.Implementation ensureInterfaceImplementation(org.eclipse.uml2.Interface realizedInterface, org.eclipse.uml2.Class realizingClass)
          Ensure an interface implementation exists.
 void ensureInterfaceOperations(org.eclipse.uml2.Interface realizedInterface, org.eclipse.uml2.Class realizingClass)
          Ensure that operations that are defined on the interface are realized by the class.
 org.eclipse.uml2.Operation ensureOperation(org.eclipse.uml2.Class owningClass, String name)
          Ensure an operation exists within the given class.
 org.eclipse.uml2.Operation ensureOperation(org.eclipse.uml2.Class owningClass, String name, org.eclipse.uml2.VisibilityKind visibilityKind)
          Ensure an operation exists within the given class.
 org.eclipse.uml2.Operation ensureOperation(org.eclipse.uml2.Class owningClass, String name, org.eclipse.uml2.VisibilityKind visibilityKind, boolean isStatic)
          Ensure an operation exists within the given class.
 org.eclipse.uml2.Parameter ensureParameter(org.eclipse.uml2.Operation owningOperation, String name, org.eclipse.uml2.Type type, org.eclipse.uml2.ParameterDirectionKind directionKind)
          Ensure a parameter exists within the given operation.
 org.eclipse.uml2.Parameter ensureParameter(org.eclipse.uml2.Operation owningOperation, org.eclipse.uml2.Type type, org.eclipse.uml2.ParameterDirectionKind directionKind)
          Ensure a parameter exists within the given operation.
 org.eclipse.uml2.Association ensureSharedAggregateAssociation(org.eclipse.uml2.Class owningClass, String roleName1, org.eclipse.uml2.Classifier ownedClassifier, String roleName2)
          Ensure a shared aggregation association exists.
 org.eclipse.uml2.Property ensureStaticAttribute(org.eclipse.uml2.Class owningClass, String name, org.eclipse.uml2.Type type)
          Ensure a static attribute exists within the given class.
 org.eclipse.uml2.Property ensureStaticAttribute(org.eclipse.uml2.Class owningClass, String name, org.eclipse.uml2.Type type, org.eclipse.uml2.VisibilityKind visibilityKind)
          Ensure a static attribute exists within the given class.
 org.eclipse.uml2.Operation ensureStaticOperation(org.eclipse.uml2.Class owningClass, String name)
          Ensure a static operation exists within the given class.
 org.eclipse.uml2.Operation ensureStaticOperation(org.eclipse.uml2.Class owningClass, String name, org.eclipse.uml2.VisibilityKind visibilityKind)
          Ensure a static operation exists within the given class.
 org.eclipse.uml2.Operation ensureStaticOperation(org.eclipse.uml2.Interface owningInterface, String name)
          Ensure a static operation exists within the given interface.
 org.eclipse.uml2.Usage ensureUsageRelationship(org.eclipse.uml2.Class owningClass, org.eclipse.uml2.Classifier usedClassifier)
           
 boolean unapplyPattern(org.eclipse.uml2.TemplateableElement tinstance, ArrayList pae_list)
          Unapply pattern; not fully implemented yet, part of patterns traceability features
 
Methods inherited from class com.ibm.xtools.patterns.framework.AbstractPatternInstance
accept, addArgument, addArguments, addParameterValue, addParameterValues, canCompletePattern, createArguments, createArgumentsUsingPairs, createSomeArguments, expand, expandPattern, expandPattern, getBoundElement, getCreationTime, getDefaultArguments, getFirstArgumentCandidates, getLastExpansionTime, getOwningPatternDefinition, getParameterArguments, getParameterValueCount, getParameterValues, getPatternDescriptor, getRepresentation, getRepresentationName, getSecondArgumentCandidates, getTraceabilityEnabled, initialize, reapplyPattern, removeAllParameterValues, removeArgument, removeArguments, removeParameterValue, removeParameterValues, replaceArgument, replaceArguments, resetDefaultParameterValues, resetDefaultParameterValues, setTraceabilityEnabled, unapplyPattern, unapplyPattern, usesPairsToCreateArguments, validatePattern, validatePattern, validToAddArgument, validToAddArguments, validToCreateArguments, validToCreateSomeArguments, validToRemoveArgument, validToRemoveArguments, validToReplaceArgument, validToReplaceArguments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPatternInstance

protected AbstractPatternInstance(AbstractPatternDefinition owningDefinition,
                                  Object representation)
Pass-through to super constructor

Parameters:
owningDefinition - the owning definition for this represented pattern instance
representation - the model element that represents the pattern instance

AbstractPatternInstance

protected AbstractPatternInstance(AbstractPatternDefinition owningPatternDefinition,
                                  Object targetObject,
                                  AbstractPatternResult createdElements,
                                  org.eclipse.core.runtime.MultiStatus status)
Pass-through to super constructor

Parameters:
owningPatternDefinition - the definition that specifies this instance
targetObject - the target object that defines the context for the new UML2 pattern instance representation
createdElements - any created elements will be returned in the created elements out parameter
status - the status generated
Method Detail

ensureAtLeastOneStaticOperation

public final org.eclipse.uml2.Operation ensureAtLeastOneStaticOperation(org.eclipse.uml2.Interface owningInterface,
                                                                        String name)
Ensure at least one static operation exists.

Parameters:
owningInterface - the interface that contains the operation
name - the name of the operation
Returns:
the ensured operation

ensureDirectedAssociation

public final org.eclipse.uml2.Association ensureDirectedAssociation(org.eclipse.uml2.Class owningClass,
                                                                    org.eclipse.uml2.Classifier associatedClassifier,
                                                                    String roleName,
                                                                    org.eclipse.uml2.AggregationKind aggregationKind,
                                                                    int multiplicityLowerBound,
                                                                    int multiplicityUpperBound)
Ensure a directed association exists.

Parameters:
owningClass - the class that owns the directed association
associatedClassifier - the class the association is directed towards
roleName - the role of the associated classifier
aggregationKind - the kind of aggregation for the end closest to the associated classifier
multiplicityLowerBound - the lower bound of the multiplicity
multiplicityUpperBound - the upper bound of the multiplicity
Returns:
the ensured directed association

ensureDirectedAssociation

public final org.eclipse.uml2.Association ensureDirectedAssociation(org.eclipse.uml2.Class owningClass,
                                                                    String roleName1,
                                                                    org.eclipse.uml2.Classifier associatedClassifier,
                                                                    String roleName2)
Ensure a directed association exists.

Parameters:
owningClass - the class that owns the directed association
roleName1 - the role of the owning class
associatedClassifier - the class the association is directed towards
roleName2 - the role of the associated classifier in this relationship
Returns:
the ensured directed association

ensureInterfaceImplementation

public final org.eclipse.uml2.Implementation ensureInterfaceImplementation(org.eclipse.uml2.Interface realizedInterface,
                                                                           org.eclipse.uml2.Class realizingClass)
Ensure an interface implementation exists.

Parameters:
realizedInterface - the interface being realized
realizingClass - the class realizing the realized interface
Returns:
the ensured interface implementation relationship

ensureInterfaceOperations

public final void ensureInterfaceOperations(org.eclipse.uml2.Interface realizedInterface,
                                            org.eclipse.uml2.Class realizingClass)
Ensure that operations that are defined on the interface are realized by the class.

Parameters:
realizedInterface - the interface is the source of the operations
realizingClass - the realizing class is the destination of the operation ensure

ensureOperation

public final org.eclipse.uml2.Operation ensureOperation(org.eclipse.uml2.Class owningClass,
                                                        String name)
Ensure an operation exists within the given class.

Parameters:
owningClass - the class owning the operation
name - the name of the operation
Returns:
the ensured operation

ensureOperation

public final org.eclipse.uml2.Operation ensureOperation(org.eclipse.uml2.Class owningClass,
                                                        String name,
                                                        org.eclipse.uml2.VisibilityKind visibilityKind)
Ensure an operation exists within the given class.

Parameters:
owningClass - the class owning the operation
name - the name of the operation
visibilityKind - the visibility kind of the operation, public, private, etc
Returns:
the ensured operation

ensureOperation

public final org.eclipse.uml2.Operation ensureOperation(org.eclipse.uml2.Class owningClass,
                                                        String name,
                                                        org.eclipse.uml2.VisibilityKind visibilityKind,
                                                        boolean isStatic)
Ensure an operation exists within the given class.

Parameters:
owningClass - the class owning the operation
name - the name of the operation
visibilityKind - the visibility kind of the operation, public, private, etc
isStatic - indicates whether the operation is static or not
Returns:
the ensured operation

ensureParameter

public final org.eclipse.uml2.Parameter ensureParameter(org.eclipse.uml2.Operation owningOperation,
                                                        org.eclipse.uml2.Type type,
                                                        org.eclipse.uml2.ParameterDirectionKind directionKind)
Ensure a parameter exists within the given operation.

Parameters:
owningOperation - the operation owning this parameter
type - the type assigned to this paramaeter, any UML2 model element
directionKind - the direction kind of this parameter, in, out, return, etc
Returns:
the ensured parameter

ensureParameter

public final org.eclipse.uml2.Parameter ensureParameter(org.eclipse.uml2.Operation owningOperation,
                                                        String name,
                                                        org.eclipse.uml2.Type type,
                                                        org.eclipse.uml2.ParameterDirectionKind directionKind)
Ensure a parameter exists within the given operation.

Parameters:
owningOperation - the operation owning this parameter
name - the name of the parameter
type - the type assigned to this parameter, any UML2 model element
directionKind - the direction kind of this parameter, in, out, return, etc
Returns:
the ensured parameter

ensureSharedAggregateAssociation

public final org.eclipse.uml2.Association ensureSharedAggregateAssociation(org.eclipse.uml2.Class owningClass,
                                                                           String roleName1,
                                                                           org.eclipse.uml2.Classifier ownedClassifier,
                                                                           String roleName2)
Ensure a shared aggregation association exists.

Parameters:
owningClass - the class owning the shared aggregation association
roleName1 - the owning class role name
ownedClassifier - the classifier aggregated in this shared aggregation association
roleName2 - the role of the aggregated classifier
Returns:
the ensured shared aggregate association

ensureStaticAttribute

public final org.eclipse.uml2.Property ensureStaticAttribute(org.eclipse.uml2.Class owningClass,
                                                             String name,
                                                             org.eclipse.uml2.Type type)
Ensure a static attribute exists within the given class.

Parameters:
owningClass - the class owning the attribute
name - the name of the attribute
type - the type assigned to the attribute, any UML2 model element
Returns:
the ensured static attribute

ensureStaticAttribute

public final org.eclipse.uml2.Property ensureStaticAttribute(org.eclipse.uml2.Class owningClass,
                                                             String name,
                                                             org.eclipse.uml2.Type type,
                                                             org.eclipse.uml2.VisibilityKind visibilityKind)
Ensure a static attribute exists within the given class.

Parameters:
owningClass - the class owning the attribute
name - the name of the attribute
type - the type assigned to the attribute, any UML2 model element
visibilityKind - the visibility kind of the attribute, public, private, etc
Returns:
the ensured static attribute

ensureStaticOperation

public final org.eclipse.uml2.Operation ensureStaticOperation(org.eclipse.uml2.Class owningClass,
                                                              String name)
Ensure a static operation exists within the given class.

Parameters:
owningClass - the class owning the operation
name - the name of the operation
Returns:
the ensured static operation

ensureStaticOperation

public final org.eclipse.uml2.Operation ensureStaticOperation(org.eclipse.uml2.Class owningClass,
                                                              String name,
                                                              org.eclipse.uml2.VisibilityKind visibilityKind)
Ensure a static operation exists within the given class.

Parameters:
owningClass - the class owning the operation
name - the name of the operation
visibilityKind - the visibility kind of the operation, public, private, etc
Returns:
the ensured static operation

ensureStaticOperation

public final org.eclipse.uml2.Operation ensureStaticOperation(org.eclipse.uml2.Interface owningInterface,
                                                              String name)
Ensure a static operation exists within the given interface.

Parameters:
owningInterface - the interface owning the static operation
name - the name of the operation
Returns:
the ensured static operation

ensureUsageRelationship

public final org.eclipse.uml2.Usage ensureUsageRelationship(org.eclipse.uml2.Class owningClass,
                                                            org.eclipse.uml2.Classifier usedClassifier)
Parameters:
owningClass - the class owning the usage relationship
usedClassifier - the classifier used by the owning class
Returns:
the ensured usage relationship

unapplyPattern

public boolean unapplyPattern(org.eclipse.uml2.TemplateableElement tinstance,
                              ArrayList pae_list)
Unapply pattern; not fully implemented yet, part of patterns traceability features

Specified by:
unapplyPattern in class AbstractPatternInstance

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

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