|
IBM Rational Software Modeler Release 6.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.xtools.patterns.framework.AbstractPatternElement
com.ibm.xtools.patterns.framework.AbstractPatternParameter
com.ibm.xtools.patterns.framework.uml2.AbstractPatternParameter
An abstract pattern parameter specific for UML2 patterns that provides more default behavior than the core framework's abstract pattern parameter. UML2 patterns are patterns that use UML2 types for their parameter types. The framework supports non-UML2 types as parameter types but in that case the author should extend from the core framework's abstract pattern parameter instead of this class. This implementation provides default behavior for a few of the hot-spot methods defined in the core framewok's abstract pattern parameter.
| Field Summary |
| Fields inherited from interface com.ibm.xtools.patterns.core.IParameterDescriptor |
BINDABLE |
| 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 | |
AbstractPatternParameter(AbstractPatternDefinition owningDefinition,
PatternParameterIdentity parameterIdentity)
Constructs a UML2 pattern parameter given just the parameter identity; the rest of the parameter description is assumed (and must) be specified via a statically described method offered by the pattern service. |
|
| Method Summary | |
protected Object[] |
create(AbstractPatternInstance instance,
IPatternMetatype metatype)
If this parameter supports creation of prototypical instances then this method will be implemented. |
protected Object[] |
create(AbstractPatternInstance instance,
IPatternMetatype metatype,
String scopeQualifiedName)
If this parameter supports creation of prototypical instances then this method will be implemented. |
protected Object |
getDerivedScope(AbstractPatternInstance instance)
Retrieves the derived scope which in turn can be used to resolve parameter values and create parameter values within. |
protected EClass |
getSubstituteType()
This method takes the current type of this parameter and then potentially changes the type to a more concrete type if possible (if not concrete already). |
IPatternMetatype |
getType()
Retrieves the type of the parameter represented by this descriptor. |
protected static boolean |
isDistinguishable(String candidateName,
NamedElement namedElementA,
NamedElement namedElementB)
Determines if two named elements are distinguishable using the rules defined by the UML2 specification. |
protected boolean |
isRetrievable()
A hot-spot method that indicates if a parameter value, given a name within a scope, can be retrieved. |
protected boolean |
isScopeDerivable()
Determines if this parameter has a scope that can be derived, also known as a default context or namespace for resolving elements and/or creating new parameter values. |
protected boolean |
isTypeSubstitutable()
Indicates if the type of this parameter can be made more concrete and subtituted for various operations that requires a concrete type in lieu of an abstract type. |
protected boolean |
isValid(PatternParameterValue.Unresolved unresolved)
Determines if the unresolved value is valid. |
protected boolean |
isValid(PatternParameterValue.Unresolved unresolved,
PatternParameterValue.Unresolved.Directive directive)
Determines if the unresolved value is valid. |
boolean |
isValidArgumentType(IPatternMetatype metatype)
Checks whether the object of the given metatype is accepted as an argument of the parameter represented by this descriptor. |
protected Object |
resolve(PatternParameterValue.Unresolved unresolved)
The resolve method is called if an unresolved value is attempting to be bound to this parameter. |
protected Object |
resolve(PatternParameterValue.Unresolved unresolved,
PatternParameterValue.Unresolved.Directive directive)
The resolve method extends upon the resolve method that does not take a directive. |
protected Object |
retrieve(AbstractPatternInstance instance,
String valueName)
A hot-spot method that retrieves a parameter value, given a name |
protected IStatus |
validToAddArgument(PatternParameterValue.Unresolved unresolved)
This method is a hotspot that is overridden to add custom pattern specific argument validation logic. |
IStatus |
validToCreateArguments(AbstractPatternInstance instance,
IPatternMetatype metatype)
This is a hotspot method used in conjunction with the create method. |
protected IStatus |
validToReplaceArgument(PatternParameterValue.Unresolved unresolved)
This method is a hotspot that is overridden to add custom pattern specific argument validation logic. |
| Methods inherited from class com.ibm.xtools.patterns.framework.AbstractPatternParameter |
accept, compareTo, createArgumentsUsingPairs, equals, expand, expand, expand, expand, expand, getAlternateTypes, getDescription, getFirstArgumentCandidates, getId, getMultiplicity, getName, getOrdinal, getOwningDefinition, getPatternIdentity, getProperties, getProperty, getPropertyIds, getSecondArgumentCandidates, getSecondArgumentCandidatesForFirstValue, getValue, getValues, hashCode, hasValue, hasValues, initialize, isBindable, isPublic, isValid, isValid, isValid, isValidParameterTarget, usesPairsToCreateArguments, validToAddArgument, validToReplaceArgument |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractPatternParameter(AbstractPatternDefinition owningDefinition,
PatternParameterIdentity parameterIdentity)
owningDefinition - definition that owns and helps define this parameterparameterIdentity - the identity of the parameter; used internally to locate the
matching parameter descriptor as provided by the associated
static pattern provider for this parameter.| Method Detail |
protected static boolean isDistinguishable(String candidateName,
NamedElement namedElementA,
NamedElement namedElementB)
candidateName - the name that is potentially used to distinguish the named
element AnamedElementA - the element that is try to distinguish itselfnamedElementB - another one of the named elements in the same namespace
protected Object[] create(AbstractPatternInstance instance,
IPatternMetatype metatype)
AbstractPatternParameter
create in class AbstractPatternParameterinstance - the instance that defines context for creating new
prototypical instances of suggested arguments of this
parametermetatype - the proposed metatype for the new prototypical arguments of
this parameter; if the metatype is null then
the parameter may choose an appropriate metatype
protected Object[] create(AbstractPatternInstance instance,
IPatternMetatype metatype,
String scopeQualifiedName)
AbstractPatternParameter
create in class AbstractPatternParameterinstance - the instance that defines context for creating new
prototypical instances of suggested arguments of this
parametermetatype - the proposed metatype for the new prototypical arguments of
this parameter; if the metatype is null then
the parameter may choose an appropriate metatypescopeQualifiedName - the qualified name that specifies the scope.
protected Object getDerivedScope(AbstractPatternInstance instance)
AbstractPatternParameter
getDerivedScope in class AbstractPatternParameterinstance - the pattern instance of interest for determining if a default
scope is available
protected EClass getSubstituteType()
AbstractPatternParameter
getSubstituteType in class AbstractPatternParameterpublic IPatternMetatype getType()
IParameterDescriptorRetrieves the type of the parameter represented by this descriptor.
Use the Pair method to retrieve the argument pairs used as parameter arguments. Use the isValidArgumentType method to retrieve whether the object of a specific metatype is accepted as an argument of the parameter. Use the getAlternateTypes method to retrieve the types accepted for parameter arguments.
getType in interface IParameterDescriptorgetType in class AbstractPatternParameterprotected boolean isRetrievable()
AbstractPatternParameter
isRetrievable in class AbstractPatternParameterprotected boolean isScopeDerivable()
AbstractPatternParameter
isScopeDerivable in class AbstractPatternParameterAbstractPatternParameter.getDerivedScope(AbstractPatternInstance),
AbstractPatternParameter.create(AbstractPatternInstance, IPatternMetatype)protected boolean isTypeSubstitutable()
AbstractPatternParameter
isTypeSubstitutable in class AbstractPatternParameterprotected boolean isValid(PatternParameterValue.Unresolved unresolved)
AbstractPatternParameter
isValid in class AbstractPatternParameterunresolved - the unresolved value
protected boolean isValid(PatternParameterValue.Unresolved unresolved,
PatternParameterValue.Unresolved.Directive directive)
AbstractPatternParameter
isValid in class AbstractPatternParameterunresolved - the unresolved valuedirective - the additional directive to alter the validity logic
public boolean isValidArgumentType(IPatternMetatype metatype)
IParameterDescriptorChecks whether the object of the given metatype is accepted as an argument of the parameter represented by this descriptor.
Use the getAlternateTypes method to retrieve the types accepted for parameter arguments.
protected Object resolve(PatternParameterValue.Unresolved unresolved)
AbstractPatternParameterresolve and
isValid(Unresolved) methods for a parameter would either
be overridden or not overridden.
resolve in class AbstractPatternParameterunresolved - the value that is in the unresolved state
protected Object resolve(PatternParameterValue.Unresolved unresolved,
PatternParameterValue.Unresolved.Directive directive)
AbstractPatternParameter
resolve in class AbstractPatternParameterunresolved - the value that is in the unresolved statedirective - an additional directive that modifies behavior
AbstractPatternParameter.resolve(PatternParameterValue.Unresolved)
protected Object retrieve(AbstractPatternInstance instance,
String valueName)
AbstractPatternParameter
retrieve in class AbstractPatternParameterinstance - the instance that gives context to the retrievalvalueName - the name of the parameter value to retrieve
protected IStatus validToAddArgument(PatternParameterValue.Unresolved unresolved)
AbstractPatternParameter
validToAddArgument in class AbstractPatternParameterunresolved - the unresolved value to determine if resolution into a valid
argument is possible
public IStatus validToCreateArguments(AbstractPatternInstance instance,
IPatternMetatype metatype)
AbstractPatternParameter
validToCreateArguments in class AbstractPatternParameterinstance - the pattern instance of interestmetatype - the metatype corresponding to the arguments to create
protected IStatus validToReplaceArgument(PatternParameterValue.Unresolved unresolved)
AbstractPatternParameter
validToReplaceArgument in class AbstractPatternParameterunresolved - the unresolved value to determine if resolution into a valid
argument is possible
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.