IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.patterns.framework
Class ParameterArgument

java.lang.Object
  extended bycom.ibm.xtools.patterns.core.AbstractParameterArgument
      extended bycom.ibm.xtools.patterns.framework.ParameterArgument

public class ParameterArgument
extends AbstractParameterArgument

The ParameterArgument class provides a default implementation for the AbstractParameterArgument abstract class.

A ParameterArgument represents an argument value supplied for a parameter of a particular pattern.

ParameterArgument overrides equals and hashCode to ensure correct semantics for equality of parameter arguments.


Nested Class Summary
 
Nested classes inherited from class com.ibm.xtools.patterns.core.AbstractParameterArgument
AbstractParameterArgument.Pair
 
Field Summary
protected  IPatternMetatype metatype
          The metatype for this argument
 
Constructor Summary
ParameterArgument(Object value)
           
 
Method Summary
protected static IPatternMetatype computeType(Object value)
          Compute the metatype for the given object.
 boolean equals(Object object)
           
 String getImage()
          Retrieves a readable image of the object supplied as the argument for the parameter.
 IPatternMetatype getMetatype()
          Retrieves the metatype of the object supplied as the argument for the parameter.
 Object getValue()
          Retrieves the object supplied as the argument for the parameter.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metatype

protected final IPatternMetatype metatype
The metatype for this argument

Constructor Detail

ParameterArgument

public ParameterArgument(Object value)
Method Detail

getValue

public Object getValue()
Description copied from class: AbstractParameterArgument

Retrieves the object supplied as the argument for the parameter.

Use the getMetaType method to retrieve the metatype of the object.

Specified by:
getValue in class AbstractParameterArgument
Returns:
Returns the object supplied as the argument for the parameter.

getMetatype

public IPatternMetatype getMetatype()
Description copied from class: AbstractParameterArgument

Retrieves the metatype of the object supplied as the argument for the parameter.

Use the isValidArgumentType method to retrieve whether the object of a specific metatype is accepted as an argument of the parameter.

Specified by:
getMetatype in class AbstractParameterArgument
Returns:
Returns the metatype of the object supplied as the argument for the parameter.

getImage

public String getImage()
Description copied from class: AbstractParameterArgument

Retrieves a readable image of the object supplied as the argument for the parameter.

Specified by:
getImage in class AbstractParameterArgument
Returns:
Returns the image of the object supplied as the argument for the parameter.

equals

public boolean equals(Object object)

hashCode

public int hashCode()

computeType

protected static IPatternMetatype computeType(Object value)
Compute the metatype for the given object. TODO: This is a kludge ... ah, interim solution. Some type of service provider and/or factory approach should be supported for identifying metatypes.


IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

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