Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.poseidon.uml.generator

Class PreparedAttribute


public class PreparedAttribute

This class contains the prepared information for an attribute. The information can directly be used in the code generation.
See also:
com.gentleware.poseidon.uml.generator.PreparedModelElement
com.gentleware.poseidon.generator.ElementPreparator
ModelElementPreparator


 Method Summary
public String   check()
Does a test on the validity of the element. 
protected String   checkMultiplicity()
 
protected String   checkType()
 
public List   getAccessorMethods()
Returns a list of operations of this class that are dependent on the attribute through a dependency with the stereotype 'accessor'. 
public String   getAddAccessMethod()
Returns the name of the adding method for the attribute. 
public String   getArrayInitialValueExpression()
Returns a string representing the initial value expression for an attribute, that will be represented as an array. 
protected ChangeableKind   getChangeability()
 
public String   getChangeabilityAsString()
Returns the changeability of the related attribute as string. 
public String   getDefaultValue()
Returns a string reflecting the default value for the related attribute. 
public String   getElementName()
Returns the name of the related element. 
public String   getElementType()
Returns the effective type of the element, that is, with regard to the multiplicity. 
public String   getGetAccessMethod()
Returns the name of the getter method for the attribute. 
public String   getInitialValueExpression()
Returns a string reflecting the initial value expression for related attribute. 
public String   getParameterNameForAccessMethod()
Returns a string used as the name of a parameter reflecting the related association end in access methods. 
public PreparedMultiplicity   getPreparedMultiplicity()
Returns the prepared element related to the multiplicity of the related attribute. 
public PreparedClassifier   getPreparedType()
 
public String   getRemoveAccessMethod()
Returns the name of the removing method for the attribute. 
public String   getSetAccessMethod()
Returns the name of the setter method for the attribute. 
public String   getSingleGetAccessMethod()
For collection types, returns the name of the getter method for an element of the attribute. 
public String   getTransientAsString()
Returns the value of the tagged value "transient" of the related attribute as string. 
public String   getTypeAsString()
Returns the true type of the attribute as string, that is, the type without regarding multiplicity. 
public String   getVolatileAsString()
Returns the value of the tagged value "volatile" of the related attribute as string. 
public void   init( Attribute element , ModelElementPreparator preparator )
Initializes this instance. 
public boolean   isArray()
Tests if the multiplicity of the related association end would give an array. 
public boolean   isCollection()
Tests if the multiplicity of the related association end would give a collection. 
public boolean   isTypePreparedModelElement()
Tests if the type of the attribute is already available as a prepared information. 
public boolean   isWritable()
Tests if the related attribute is changeable. 
arrow_up
 

 

 Method Detail

check

public String check()

Does a test on the validity of the element. The test for name, visibility, type and multiplicity are called subsequently.
Returns:
Concatenation of messages occuring while testing this prepared element.
 
arrow_up
 
 

checkMultiplicity

protected String checkMultiplicity()

 
arrow_up
 
 

checkType

protected String checkType()

 
arrow_up
 
 

getAccessorMethods

public List getAccessorMethods()

Returns a list of operations of this class that are dependent on the attribute through a dependency with the stereotype 'accessor'.
Returns:
Null or a list of PreparedOperations.
 
arrow_up
 
 

getAddAccessMethod

public String getAddAccessMethod()

Returns the name of the adding method for the attribute. An adding method is created only if the attribute has no single multiplicity.
Returns:
The name of the adding method. setFoo if limited set, addFoo otherwise.
 
arrow_up
 
 

getArrayInitialValueExpression

public String getArrayInitialValueExpression()

Returns a string representing the initial value expression for an attribute, that will be represented as an array.
Returns:
The initial value expression
 
arrow_up
 
 

getChangeability

protected ChangeableKind getChangeability()

 
arrow_up
 
 

getChangeabilityAsString

public String getChangeabilityAsString()

Returns the changeability of the related attribute as string.
Returns:
A string representing the changeability.
 
arrow_up
 
 

getDefaultValue

public String getDefaultValue()

Returns a string reflecting the default value for the related attribute.
Returns:
The default value.
 
arrow_up
 
 

getElementName

public String getElementName()

Returns the name of the related element.
Returns:
The name of the related element.
 
arrow_up
 
 

getElementType

public String getElementType()

Returns the effective type of the element, that is, with regard to the multiplicity. Therefore, this method may return 'Collection' even if the type is 'String' or something. 
arrow_up
 
 

getGetAccessMethod

public String getGetAccessMethod()

Returns the name of the getter method for the attribute. A "s" is added to the attribute name if the attribute has no single multiplicity. If the attribute is boolean, the prefix is 'is'.
Returns:
The name of the getter method. isFoo if single boolean, getFoo if single, getFoos if multiple.
 
arrow_up
 
 

getInitialValueExpression

public String getInitialValueExpression()

Returns a string reflecting the initial value expression for related attribute. return The initial value expression. 
arrow_up
 
 

getParameterNameForAccessMethod

public String getParameterNameForAccessMethod()

Returns a string used as the name of a parameter reflecting the related association end in access methods.
Returns:
The name of the parameter.
 
arrow_up
 
 

getPreparedMultiplicity

public PreparedMultiplicity getPreparedMultiplicity()

Returns the prepared element related to the multiplicity of the related attribute.
Returns:
The prepared multiplicity.
 
arrow_up
 
 

getPreparedType

public PreparedClassifier getPreparedType()

 
arrow_up
 
 

getRemoveAccessMethod

public String getRemoveAccessMethod()

Returns the name of the removing method for the attribute. A removing method is created only if the attribute is of a collection type.
Returns:
The name (removeFoo) of the removing method if unlimited multiple, or ''.
 
arrow_up
 
 

getSetAccessMethod

public String getSetAccessMethod()

Returns the name of the setter method for the attribute. A "s" is added to the attribute name, if the attribute has no single multiplicity.
Returns:
The name of the setter method. setFoo if single, setFoos if multiple.
 
arrow_up
 
 

getSingleGetAccessMethod

public String getSingleGetAccessMethod()

For collection types, returns the name of the getter method for an element of the attribute. If the attribute is boolean, the prefix is 'is'.
Returns:
The name (getFoo) of the getter method if multiple, or an empty String if single multiplicity.
 
arrow_up
 
 

getTransientAsString

public String getTransientAsString()

Returns the value of the tagged value "transient" of the related attribute as string.
Returns:
"transient ", if the tagged value equals to "true", otherwise "".
 
arrow_up
 
 

getTypeAsString

public String getTypeAsString()

Returns the true type of the attribute as string, that is, the type without regarding multiplicity. If the type contains[], they are retained. So this is the 'original' type.
Returns:
A string representing the type of the related attribute.
 
arrow_up
 
 

getVolatileAsString

public String getVolatileAsString()

Returns the value of the tagged value "volatile" of the related attribute as string.
Returns:
"volatile ", if the tagged value equals to "true", otherwise "".
 
arrow_up
 
 

init

public void init( Attribute element , ModelElementPreparator preparator )

Initializes this instance. It will be related to the given model element and handled by the given preparator. The information of the given object will be prepared here.
Parameters:
element - The model element this instance should be related to.
preparator - The preparator handling this instance.
 
arrow_up
 
 

isArray

public boolean isArray()

Tests if the multiplicity of the related association end would give an array.
Returns:
True if the upper multiplicity is>1 and a number, otherwise false.
 
arrow_up
 
 

isCollection

public boolean isCollection()

Tests if the multiplicity of the related association end would give a collection.
Returns:
True if the upper multiplicity equals 'N', otherwise false.
 
arrow_up
 
 

isTypePreparedModelElement

public boolean isTypePreparedModelElement()

Tests if the type of the attribute is already available as a prepared information.
Returns:
True, if calling getTypeAsString() would return the type of the related attribute, otherwise false.
 
arrow_up
 
 

isWritable

public boolean isWritable()

Tests if the related attribute is changeable.
Returns:
True if the changeability equals to frozen, otherwise false.
 
arrow_up
 

Created  2003 - 3 - 4

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2001 Gentleware AG, Vogt-Kölln-Str.30, 22527 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.