IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.patterns.core
Interface IParameterDescriptor

All Superinterfaces:
Comparable, ITransformationDescriptor, ITransformationItem
All Known Implementing Classes:
AbstractPatternParameter, PatternParameterUsage

public interface IParameterDescriptor
extends ITransformationDescriptor, Comparable

Represents a parameter of a pattern.

The descriptor captures required and useful information about the parameter or the semantics of the parameter, the steps involved in supplying arguments for the parameter, and the result of supplying arguments for the parameter.

Use the getType method to retrieve the type of the parameter. Use the getAlternateTypes method to retrieve the types accepted for parameter arguments. Use the get.PatternIdentity method to retrieve the id and the version of the pattern.


Field Summary
static String BINDABLE
          Property identifier for the diagrams associated with the pattern item.
 
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
 
Method Summary
 IPatternMetatype[] getAlternateTypes()
          Retrieves the alternate types that are accepted for the arguments of the parameter represented by this descriptor.
 IMultiplicity getMultiplicity()
          Retrieves the multiplicity of the parameter represented by this descriptor.
 int getOrdinal()
           Retrieves the ordinal of the parameter in the list of parameters for the pattern.
 IPatternIdentity getPatternIdentity()
          Retrieves the composite identity of the pattern that has the parameter represented by this descriptor.
 IPatternMetatype getType()
          Retrieves the type of the parameter represented by this descriptor.
 boolean isBindable()
          Retrieves whether the parameter represented by this descriptor is available for binding with an argument or arguments.
 boolean isValidArgumentType(IPatternMetatype metatype)
          Checks whether the object of the given metatype is accepted as an argument of the parameter represented by this descriptor.
 
Methods inherited from interface com.ibm.xtools.transform.core.ITransformationDescriptor
getProperties, getProperty, getPropertyIds, isPublic
 
Methods inherited from interface com.ibm.xtools.transform.core.ITransformationItem
getDescription, getId, getName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

BINDABLE

public static final String BINDABLE
Property identifier for the diagrams associated with the pattern item.

See Also:
Constant Field Values
Method Detail

getType

public IPatternMetatype getType()

Retrieves 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.

Returns:
Returns the type of the parameter.

getAlternateTypes

public IPatternMetatype[] getAlternateTypes()

Retrieves the alternate types that are accepted for the arguments of the parameter represented by this descriptor.

Returns:
Returns the alternate types accepted for the arguments of the parameter.

isValidArgumentType

public boolean isValidArgumentType(IPatternMetatype metatype)

Checks 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.

Returns:
Returns a Boolean value of True if the object of the given metatype can be an argument for the parameter. Otherwise, it returns a value of False.

getMultiplicity

public IMultiplicity getMultiplicity()

Retrieves the multiplicity of the parameter represented by this descriptor.

Multiplicity represents the range of the allowable cardinality values that a set can assume.

Returns:
Returns the multiplicity of the parameter.

getOrdinal

public int getOrdinal()

Retrieves the ordinal of the parameter in the list of parameters for the pattern.

Returns:
Returns the ordinal of the parameter.

isBindable

public boolean isBindable()

Retrieves whether the parameter represented by this descriptor is available for binding with an argument or arguments.

A binding is a relationship connection between a template and a model element generated from the template. It provides the collection of the arguments that instantiate the template parameters. A binding is associated with one template. Each binding generates one model element. The generated model element must be fully specified by the arguments supplied to the binding.

Note: In general, if a parameter is not bindable, it should not be exposed to a user.

Returns:
Returns a Boolean that has a value of True if the parameter is bindable. Otherwise, it returns a value of False.

getPatternIdentity

public IPatternIdentity getPatternIdentity()

Retrieves the composite identity of the pattern that has the parameter represented by this descriptor.

The composite unique identity of a pattern is represented by a pattern descriptor. The components of the identity are the id (getPatternId) and the version of the pattern (getPatternVersion).

Returns:
Returns the identity of the pattern that has the parameter represented by this descriptor.

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

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