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 PreparedOperation


public class PreparedOperation

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


 Constructor Summary
public   PreparedOperation()
Creates a new instance. 
arrow_up
 

 Method Summary
protected void   addPreparedParameter( PreparedParameter cPar )
 
public String   getAbstractAsString()
Returns a string reflecting whether the related operation is abstract. 
public String   getConcurrencyAsString()
Returns the concurrency of the related operation as string. 
public String   getDefaultReturnValue()
Returns a string reflecting the default return value for the related operation. 
public static Hashtable   getJavaDefaultReturnValues()
Returns a map of Java compatible initial values for the primitve types. 
public String   getLeafAsString()
Returns a string reflecting whether the related operation is a leaf. 
public List   getMethodBody()
Returns the method body of the related operation as a List of Strings. 
public String   getOwnerScopeAsString()
Returns the owner scope of the related operation as string. 
public String   getParameterNames()
Returns the names of the parameters of the related operation as a string. 
public String   getParameterTypes()
Returns the signature of the parameters of the related operation as a string. 
public String   getParametersSignature()
Returns the signature of the parameters of the related operation as a string. 
public Vector   getPreparedInOutParameters()
Returns a collection of the prepared elements representing the in, out and inout parameters of the related operation. 
public List   getPreparedParameters()
Returns a list of prepared elements representing the parameters of the related operation. 
public PreparedParameter   getPreparedReturnParameter()
Returns the prepared element representing the return parameter of the related operation. 
public String   getReturnParameterSignature()
Returns the signature of the return parameter of the related operation as a string. 
public String   getThrownExceptionsSignature()
Returns the signature of the throwm exceptions of the related operation as string. 
public boolean   hasReturnType()
Test, if the related operation has a return type. 
public void   init( Operation element , ModelElementPreparator preparator )
Initializes this instance. 
public boolean   isAbstract()
Tests, if the related operation is abstract. 
public boolean   isAccessorFor(String attributeName )
True if the operation accesses an attribute with the given name. 
public boolean   isConstructor()
Tests, if the related operation is a constructor. 
public boolean   isInitializer()
Tests if the stereotype of the related operation equals to "initializer". 
public boolean   isLeaf()
Tests, if the related operation is a leaf. 
protected void   setPreparedReturnParameter( PreparedParameter returnPar )
 
arrow_up
 

 

 Constructor Detail

PreparedOperation

public PreparedOperation PreparedOperation()

Creates a new instance. 
arrow_up
 

 Method Detail

addPreparedParameter

protected void addPreparedParameter( PreparedParameter cPar )

 
arrow_up
 
 

getAbstractAsString

public String getAbstractAsString()

Returns a string reflecting whether the related operation is abstract.
Returns:
"abstract ", if the element is abstract, otherwise "".
 
arrow_up
 
 

getConcurrencyAsString

public String getConcurrencyAsString()

Returns the concurrency of the related operation as string.
Returns:
"synchronized ", if the concurrency of the related operation is synchronized, otherwise "".
 
arrow_up
 
 

getDefaultReturnValue

public String getDefaultReturnValue()

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

getJavaDefaultReturnValues

public static Hashtable getJavaDefaultReturnValues()

Returns a map of Java compatible initial values for the primitve types.
Returns:
The map of initial values with the string representation of the primitive type as the key.
 
arrow_up
 
 

getLeafAsString

public String getLeafAsString()

Returns a string reflecting whether the related operation is a leaf.
Returns:
"final ", if the element is a leaf, otherwise "".
 
arrow_up
 
 

getMethodBody

public List getMethodBody()

Returns the method body of the related operation as a List of Strings. Each code line is represented as an individual entry in the resulting collection. Line feeds are removed, so concatenating the returned list would give you one long line of statements.
Returns:
The List of code lines in the method body as Strings, or an empty List.
 
arrow_up
 
 

getOwnerScopeAsString

public String getOwnerScopeAsString()

Returns the owner scope of the related operation as string.
Returns:
"static", if the owner scope of the related operation is static, otherwise "".
 
arrow_up
 
 

getParameterNames

public String getParameterNames()

Returns the names of the parameters of the related operation as a string. The return parameter is not included here.
Returns:
The names of the parameters separated by colons.
 
arrow_up
 
 

getParameterTypes

public String getParameterTypes()

Returns the signature of the parameters of the related operation as a string. The return parameter is not included here.
Returns:
The signature of the parameters.
 
arrow_up
 
 

getParametersSignature

public String getParametersSignature()

Returns the signature of the parameters of the related operation as a string. The return parameter is not included here.
Returns:
The signature of the parameters.
 
arrow_up
 
 

getPreparedInOutParameters

public Vector getPreparedInOutParameters()

Returns a collection of the prepared elements representing the in, out and inout parameters of the related operation.
Returns:
The collection of prepared parameters.
 
arrow_up
 
 

getPreparedParameters

public List getPreparedParameters()

Returns a list of prepared elements representing the parameters of the related operation.
Returns:
The list of prepared parameters.
 
arrow_up
 
 

getPreparedReturnParameter

public PreparedParameter getPreparedReturnParameter()

Returns the prepared element representing the return parameter of the related operation.
Returns:
The prepared parameter for the return parameter.
 
arrow_up
 
 

getReturnParameterSignature

public String getReturnParameterSignature()

Returns the signature of the return parameter of the related operation as a string.
Returns:
The signature of the return parameter.
 
arrow_up
 
 

getThrownExceptionsSignature

public String getThrownExceptionsSignature()

Returns the signature of the throwm exceptions of the related operation as string. The individual exception signatures are separated by colons. The string is ready to go for Java, because it contains the "throws" keyword.
Returns:
The string representing the signatures of all throwable exceptions.
 
arrow_up
 
 

hasReturnType

public boolean hasReturnType()

Test, if the related operation has a return type. Not having a return type could either mean, the operation is a constructor or the return type defaults to "void".
Returns:
True, if the operation has a return type, otherwise false.
 
arrow_up
 
 

init

public void init( Operation 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 model element will be prepared here.
Parameters:
element - The model element this instance should be related to.
preparator - The preparator handling this instance.
 
arrow_up
 
 

isAbstract

public boolean isAbstract()

Tests, if the related operation is abstract.
Returns:
True, if the element is abstract, otherwise false.
 
arrow_up
 
 

isAccessorFor

public boolean isAccessorFor(String attributeName )

True if the operation accesses an attribute with the given name.  
arrow_up
 
 

isConstructor

public boolean isConstructor()

Tests, if the related operation is a constructor. An operation is a constructor, if the names are equal and either no return present, or return==null, or return==ClassType.
Returns:
If true, post-condition is: Name equals class name && return absent or class type; or: stereotype is create
 
arrow_up
 
 

isInitializer

public boolean isInitializer()

Tests if the stereotype of the related operation equals to "initializer".
Returns:
True if the stereotype "initializer" is set, otherwise false.
 
arrow_up
 
 

isLeaf

public boolean isLeaf()

Tests, if the related operation is a leaf.
Returns:
True, if the element is a leaf, otherwise false.
 
arrow_up
 
 

setPreparedReturnParameter

protected void setPreparedReturnParameter( PreparedParameter returnPar )

 
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.