org.eclipse.tigerstripe.profile.stereotype
Interface IStereotypeInstance


public interface IStereotypeInstance

A Stereotype instance is an instance of a IStereotype defined in a profile as stored in a Model component (e.g. artifact, method, etc...) A IStereotypeInstance is associated with the IStereotype that characterizes it. All values are stringified. It is responsible for persisting the values into the artifact.

Since:
1.2
Author:
Eric Dillon

Field Summary
static IStereotypeInstance[] EMPTY_ARRAY
           
 
Method Summary
 java.lang.Object clone()
           
 java.lang.String getAttributeValue(IStereotypeAttribute attribute)
          Returns the value of the given attribute.
 java.lang.String getAttributeValue(java.lang.String attributeName)
          Returns the value for an attribute identified by its name.
 java.lang.String[] getAttributeValues(IStereotypeAttribute attribute)
          Returns the values for the given attribute in the case the attribute is an array attribute.
 java.lang.String[] getAttributeValues(java.lang.String attributeName)
          Returns the value array for an attribute identified by its name.
 IStereotype getCharacterizingIStereotype()
          Returns the characterizing stereotype for this instance.
 java.lang.String getName()
          Returns the name of this instance.
 void setAttributeValue(IStereotypeAttribute attribute, java.lang.String value)
          Sets the value for the given attribute.
 void setAttributeValues(IStereotypeAttribute attribute, java.lang.String[] values)
          Sets the values for an array attribute
 

Field Detail

EMPTY_ARRAY

static final IStereotypeInstance[] EMPTY_ARRAY
Method Detail

getName

java.lang.String getName()
Returns the name of this instance. Note: this is in fact the name of the characterizing IStereotype

Returns:

setAttributeValue

void setAttributeValue(IStereotypeAttribute attribute,
                       java.lang.String value)
                       throws TigerstripeException
Sets the value for the given attribute.

Parameters:
attribute -
value -
Throws:
TigerstripeException - if the attribute is not a valid attribute for the characterizing Stereotype or if the value is invalid.

setAttributeValues

void setAttributeValues(IStereotypeAttribute attribute,
                        java.lang.String[] values)
                        throws TigerstripeException
Sets the values for an array attribute

Parameters:
attribute -
values -
Throws:
TigerstripeException - if attribute not array attribute

clone

java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

getAttributeValue

java.lang.String getAttributeValue(IStereotypeAttribute attribute)
                                   throws TigerstripeException
Returns the value of the given attribute.

Parameters:
attribute -
Returns:
Throws:
TigerstripeException - if the given attribute is not a valid attribute for the characterizing stereotype

getAttributeValue

java.lang.String getAttributeValue(java.lang.String attributeName)
                                   throws TigerstripeException
Returns the value for an attribute identified by its name.

Parameters:
attributeName -
Returns:
Throws:
TigerstripeException

getAttributeValues

java.lang.String[] getAttributeValues(IStereotypeAttribute attribute)
                                      throws TigerstripeException
Returns the values for the given attribute in the case the attribute is an array attribute.

Parameters:
attribute -
Returns:
Throws:
TigerstripeException - if attribute not array attribute

getAttributeValues

java.lang.String[] getAttributeValues(java.lang.String attributeName)
                                      throws TigerstripeException
Returns the value array for an attribute identified by its name.

Parameters:
attributeName -
Returns:
Throws:
TigerstripeException - if attribute not array attribute

getCharacterizingIStereotype

IStereotype getCharacterizingIStereotype()
Returns the characterizing stereotype for this instance. The caharacterizingStereotype determines the defined attributes and their default values etc.

Returns:
the characterizing stereotype