org.andromda.core.cartridge.template
Class ModelElement

java.lang.Object
  extended by org.andromda.core.cartridge.template.ModelElement

public class ModelElement
extends java.lang.Object

Represents a single template <modelElement/> nested within the <modelElements/> element. It stores the actual metafacade instances which match the model element criteria (i.e. stereotype, type, etc) defined by this instance.

Author:
Chad Brandon
See Also:
ModelElements

Constructor Summary
ModelElement()
           
 
Method Summary
 void addType(Type type)
          Adds the type to the collection of types belonging to this model element.
 java.util.Collection getMetafacades()
          Gets the metafacades that belong to this ModelElement instance.
 java.lang.String getStereotype()
          Gets the stereotype of this modelElement.
 java.util.Collection getTypes()
          Gets all types associated with this model element.
 java.lang.String getVariable()
          Gets the variable stereotype of this modelElement (this is what is made available to a template during processing).
 boolean hasStereotype()
          Returns true or false depending on whether or not this model element has a stereotype defined.
 boolean hasTypes()
          Returns true or false depending on whether or not this model element has any type elements defined.
 void setMetafacades(java.util.Collection metafacades)
          Sets the current metafacades that belong to this ModelElement instance.
 void setStereotype(java.lang.String stereotype)
          Sets the stereotype of the ModelElement.
 void setVariable(java.lang.String variable)
          Sets the variable name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelElement

public ModelElement()
Method Detail

getStereotype

public java.lang.String getStereotype()
Gets the stereotype of this modelElement.

Returns:
Returns the stereotype.

hasStereotype

public boolean hasStereotype()
Returns true or false depending on whether or not this model element has a stereotype defined.

Returns:
true/false

getTypes

public java.util.Collection getTypes()
Gets all types associated with this model element.

Returns:
the collection of types.

hasTypes

public boolean hasTypes()
Returns true or false depending on whether or not this model element has any type elements defined.

Returns:
true/false

setStereotype

public void setStereotype(java.lang.String stereotype)
Sets the stereotype of the ModelElement.

Parameters:
stereotype - The stereotype to set.

addType

public void addType(Type type)
Adds the type to the collection of types belonging to this model element.

Parameters:
type - the Typeinstance.

getVariable

public java.lang.String getVariable()
Gets the variable stereotype of this modelElement (this is what is made available to a template during processing).

Returns:
Returns the variable.

setVariable

public void setVariable(java.lang.String variable)
Sets the variable name.

Parameters:
variable - The variable to set.

setMetafacades

public void setMetafacades(java.util.Collection metafacades)
Sets the current metafacades that belong to this ModelElement instance.

Parameters:
metafacades - the collection of metafacdes

getMetafacades

public java.util.Collection getMetafacades()
Gets the metafacades that belong to this ModelElement instance. These are the actual elements from the model.

Returns:
the collection of metafacades.


Copyright © 2003-2008 AndroMDA.org. All Rights Reserved.