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 PreparedAssociationEnd


public class PreparedAssociationEnd

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


 Constructor Summary
public   PreparedAssociationEnd()
 
public   PreparedAssociationEnd( AssociationEnd element , ModelElementPreparator preparator , int id )
Creates a new instance of this class. 
arrow_up
 

 Method Summary
public String   check()
Does a test on the validity of this instance. 
protected String   checkInterfaceVariables()
 
protected String   checkMultiplicity()
 
protected String   checkName()
 
protected String   checkType()
 
public String   getAddAccessMethod()
Returns the name of the adding method for the attribute created for reflecting the related association end. 
public ChangeableKind   getChangeability()
Returns the changeability of the related association end. 
public String   getChangeabilityAsString()
Returns the changeability of the related association end as string. 
public String   getDefaultValue()
Returns a string reflecting the default value for the attribute reflecting the related association end. 
public String   getElementName()
Returns the name of the related element. 
public String   getElementType()
Returns the effective type of the related element as string, that is, after regarding the multiplicity. 
public String   getGetAccessMethod()
Returns the name of the getter method for the attribute created for reflecting the related association end. 
public String   getInitialValueExpression()
Returns a string reflecting the initial value expression for the attribute reflecting the related association end. 
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 association end. 
public PreparedAssociationEnd   getPreparedOppositeEnd()
Returns the prepared opposite association end. 
public PreparedClassifier   getPreparedType()
Returns the prepared element representing the type of the related association end. 
public String   getRemoveAccessMethod()
Returns the name of the removing method for the attribute created for reflecting the related association end. 
public String   getSetAccessMethod()
Returns the name of the setter method for the attribute created for reflecting the related association end. 
public ScopeKind   getTargetScope()
Returns the target scope of the related association end. 
public String   getTargetScopeAsString()
Returns the changeability of the related association end as string. 
public String   getTypeAsString()
Returns the type of the association end as string, without regard to the multiplicity. 
public void   init( AssociationEnd element , ModelElementPreparator preparator , int id )
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   isNavigable()
Tests, if the related association end is navigable. 
public boolean   isStatic()
Tests if the related association end is static. 
public boolean   isTypePreparedModelElement()
Tests, if the types of the ends match. 
public boolean   isWritable()
Tests if the related association end is changeable. 
protected void   setPreparedOppositeEnd( PreparedAssociationEnd oppositeEnd )
Sets the prepared opposite association end. 
arrow_up
 

 

 Constructor Detail

PreparedAssociationEnd

public PreparedAssociationEnd PreparedAssociationEnd()

 
arrow_up
 
 

PreparedAssociationEnd

public PreparedAssociationEnd PreparedAssociationEnd( AssociationEnd element , ModelElementPreparator preparator , int id )

Creates a new instance of this class. The instance will be related to a special association end and is handled by a given preparator. The information for the association end will be prepared here.
Parameters:
element - The association end this instance should be related to.
preparator - The preparator handling this instance.
id - The number, if there are many association ends with the same name.
 
arrow_up
 

 Method Detail

check

public String check()

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

checkInterfaceVariables

protected String checkInterfaceVariables()

 
arrow_up
 
 

checkMultiplicity

protected String checkMultiplicity()

 
arrow_up
 
 

checkName

protected String checkName()

 
arrow_up
 
 

checkType

protected String checkType()

 
arrow_up
 
 

getAddAccessMethod

public String getAddAccessMethod()

Returns the name of the adding method for the attribute created for reflecting the related association end. An adding method is created only if the association end has no single multiplicity.
Returns:
The name of the adding method.
 
arrow_up
 
 

getChangeability

public ChangeableKind getChangeability()

Returns the changeability of the related association end.
Returns:
The model element representing the changeability.
 
arrow_up
 
 

getChangeabilityAsString

public String getChangeabilityAsString()

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

getDefaultValue

public String getDefaultValue()

Returns a string reflecting the default value for the attribute reflecting the related association end.
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 related element as string, that is, after regarding the multiplicity.
Returns:
The type of the related element.
 
arrow_up
 
 

getGetAccessMethod

public String getGetAccessMethod()

Returns the name of the getter method for the attribute created for reflecting the related association end. A "s" is added to the attribute name if the association end has no single multiplicity.
Returns:
The name of the getter method.
 
arrow_up
 
 

getInitialValueExpression

public String getInitialValueExpression()

Returns a string reflecting the initial value expression for the attribute reflecting the related association end. For non-single multiplicities, this expression is a call to the collection type's constructor (currently, Vector is the only possible collection type). 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 association end.
Returns:
The prepared multiplicity.
 
arrow_up
 
 

getPreparedOppositeEnd

public PreparedAssociationEnd getPreparedOppositeEnd()

Returns the prepared opposite association end.
Returns:
A PreparedAssociationEnd related to the opposite association end.
 
arrow_up
 
 

getPreparedType

public PreparedClassifier getPreparedType()

Returns the prepared element representing the type of the related association end.
Returns:
A prepared classifier representing the type of the association end.
 
arrow_up
 
 

getRemoveAccessMethod

public String getRemoveAccessMethod()

Returns the name of the removing method for the attribute created for reflecting the related association end. A removing method is created only if the association end has no single multiplicity.
Returns:
The name of the removing method.
 
arrow_up
 
 

getSetAccessMethod

public String getSetAccessMethod()

Returns the name of the setter method for the attribute created for reflecting the related association end. A "s" is added to the attribute name, if the association end has no single multiplicity.
Returns:
The name of the setter method.
 
arrow_up
 
 

getTargetScope

public ScopeKind getTargetScope()

Returns the target scope of the related association end.
Returns:
The model element representing the target scope.
 
arrow_up
 
 

getTargetScopeAsString

public String getTargetScopeAsString()

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

getTypeAsString

public String getTypeAsString()

Returns the type of the association end as string, without regard to the multiplicity.
Returns:
A string representing the type of the related association end.
 
arrow_up
 
 

init

public void init( AssociationEnd element , ModelElementPreparator preparator , int id )

Initializes this instance. It will be related to the given association end and handled by the given preparator. The information of the given association end will be prepared here.
Parameters:
element - The association end this instance should be related to.
preparator - The preparator handling this instance.
id - The number, if there are many association ends with the same name.
 
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 multiplicity equals to 'N', otherwise false.
 
arrow_up
 
 

isNavigable

public boolean isNavigable()

Tests, if the related association end is navigable.
Returns:
True, if the association end is navigable, otherwise false.
 
arrow_up
 
 

isStatic

public boolean isStatic()

Tests if the related association end is static.
Returns:
True if the target scope equals to static, otherwise false.
 
arrow_up
 
 

isTypePreparedModelElement

public boolean isTypePreparedModelElement()

Tests, if the types of the ends match. This seems to be the case whenever the upper bound of the multiplicity is 1. Otherwise, the generateType() method will set another type (a collection type thing or an array).
Returns:
True, if the prepared type equals to the model element type, otherwise false.
 
arrow_up
 
 

isWritable

public boolean isWritable()

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

setPreparedOppositeEnd

protected void setPreparedOppositeEnd( PreparedAssociationEnd oppositeEnd )

Sets the prepared opposite association end.
Parameters:
oppositeEnd - The prepared association end related to the opposite association end.
 
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.