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

com.gentleware.poseidon.generator.PreparedElement
    inheritcom.gentleware.poseidon.uml.generator.PreparedModelElement
        inheritcom.gentleware.poseidon.uml.generator.PreparedFeature
            inheritcom.gentleware.poseidon.uml.generator.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:
ModelElementPreparator


 Attribute Summary
public static String  ABSTRACT_STRING
 
protected static String  COMMA_SEPARATOR
 
public static String  FINAL_STRING
 
public static String  NULL_STRING
 
public static String  STATIC_STRING
 
public static String  STEREOTYPE_INITIALIZER
 
public static String  SYNCHRONIZED_STRING
 
public static String  THROWS_STRING
 
public static String  VOID_STRING
 
private static Map  defaultVals
 
private List  methodBody
 
private List  parameters
 
arrow_up
 

 Association Summary
private PreparedParameter  returnParameter
 
arrow_up
 

 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 Map   getJavaDefaultReturnValues()
Returns a map of Java compatible initial values for the primitve types. 
protected String   getLanguageKey()
returns language key for current CodeGenrator, should be overwritten in inherited classes otherwise the Java source code will be displayed, even though the method body will be stored correctly for given language  
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   getNativeAsString()
Returns the value of the tagged value "native" of the related operation as string. 
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 List   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. 
protected PreparedParameter   getReturnParameter()
 
public String   getReturnParameterSignature()
Returns the signature of the return parameter of the related operation as a string. 
public String   getStrictfpAsString()
Returns the value of the tagged value "strictfp " of the related operation as string. 
public String   getThrownExceptionsSignature()
Returns the signature of the thrown 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()

Test, if the related operation is a constructor. 

public boolean   isDestructor()

Test if the related operation is a destructor. 

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. 
public boolean   isNative()
Tests, if the related operation is native. 
private List   prepareMethodBody()
converts the method body into a vector of the code lines code lines are seperated with the "\n" character  
private void   prepareParameters()
 
protected void   setPreparedReturnParameter(PreparedParameter returnPar)
 
arrow_up
 

Tagged Values
static false
gentleware-imported-line-number 31
gentleware-imported-package-statement-line-number 6
 

 Attribute Detail

ABSTRACT_STRING

public static String ABSTRACT_STRING

arrow_up


COMMA_SEPARATOR

protected static String COMMA_SEPARATOR

arrow_up


FINAL_STRING

public static String FINAL_STRING

arrow_up


NULL_STRING

public static String NULL_STRING

arrow_up


STATIC_STRING

public static String STATIC_STRING

arrow_up


STEREOTYPE_INITIALIZER

public static String STEREOTYPE_INITIALIZER

arrow_up


SYNCHRONIZED_STRING

public static String SYNCHRONIZED_STRING

arrow_up


THROWS_STRING

public static String THROWS_STRING

arrow_up


VOID_STRING

public static String VOID_STRING

arrow_up


defaultVals

private static Map defaultVals

arrow_up


methodBody

private List methodBody

arrow_up


parameters

private List parameters

arrow_up
 Association Detail

returnParameter

private PreparedParameter returnParameter

arrow_up
 Constructor Detail

PreparedOperation

public com.gentleware.poseidon.uml.generator.PreparedOperation PreparedOperation()


Creates a new instance.  
Returns:
arrow_up
 Method Detail

addPreparedParameter

protected void addPreparedParameter(PreparedParameter cPar)

Parameters:
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 Map 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


getLanguageKey

protected String getLanguageKey()


returns language key for current CodeGenrator, should be overwritten in inherited classes otherwise the Java source code will be displayed, even though the method body will be stored correctly for given language  
Returns:
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


getNativeAsString

public String getNativeAsString()


Returns the value of the tagged value "native" of the related operation as string.  
Returns:
"native ", if the tagged value equals to "true", otherwise "".
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.
Since:
1.4
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 List 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


getReturnParameter

protected PreparedParameter getReturnParameter()

Returns:
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


getStrictfpAsString

public String getStrictfpAsString()


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


getThrownExceptionsSignature

public String getThrownExceptionsSignature()


Returns the signature of the thrown 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.  
Parameters:
attributeName -
Returns:
Since:
1.4
arrow_up


isConstructor

public boolean isConstructor()


Test, if the related operation is a constructor. An operation is a constructor, either if the <<create>>-stereotype is set, or if the java-naming-convention is true, i. e. the name of the operation must be equal to its owning classifier and one of the following rules must apply:

  1. no return-type defined or
  2. the returned value has the same type as the owning classifer
 
Returns:
If true, post-condition is: Name equals class name && return absent or class type; or: stereotype is create
See also:
Uml1SmAccessory#STEREOTYPE_CREATE
arrow_up


isDestructor

public boolean isDestructor()


Test if the related operation is a destructor. An operation is a destructor iff. the <<destroy>>-stereotype is set.

 
Returns:
true if this operation could be identified as destructor
Since:
2.3.1
See also:
Uml1SmAccessory#STEREOTYPE_DESTROY
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


isNative

public boolean isNative()


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


prepareMethodBody

private List prepareMethodBody()


converts the method body into a vector of the code lines code lines are seperated with the "\n" character  
Returns:
an empty List or a List of Strings
arrow_up


prepareParameters

private void prepareParameters()

arrow_up


setPreparedReturnParameter

protected void setPreparedReturnParameter(PreparedParameter returnPar)

Parameters:
returnPar -
arrow_up
Created  2004 - 12 - 1

    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 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

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