com.ashridgetech.jamda.code
Class OperationMethodCoder

java.lang.Object
  |
  +--com.ashridgetech.jamda.code.CodeWriter
        |
        +--com.ashridgetech.jamda.code.JavaWriter
              |
              +--com.ashridgetech.jamda.code.MethodCoder
                    |
                    +--com.ashridgetech.jamda.code.OperationMethodCoder

public class OperationMethodCoder
extends MethodCoder

Writes the method code using an Operation's procedure. Each line in the Procedure body is inserted with the current indent. The Procedure must return a valid value for Procedure.getJavaCode().

Version:
1.0
Author:
Paul Boocock

Field Summary
 
Fields inherited from class com.ashridgetech.jamda.code.CodeWriter
underlyingWriter
 
Constructor Summary
protected OperationMethodCoder(Operation op, UmlClassGenerator gen)
          Construct a LiteralMethodCoder.
 
Method Summary
 void codeBody()
          Each line in the Procedure body is inserted with the current indent.
 
Methods inherited from class com.ashridgetech.jamda.code.MethodCoder
generate, getClassGenerator, getOperation, getParameters, getReturnType
 
Methods inherited from class com.ashridgetech.jamda.code.JavaWriter
beginComment, commentLine, endComment, endStmt, stmt, writeModifiers
 
Methods inherited from class com.ashridgetech.jamda.code.CodeWriter
begin, commaDoubleList, commaList, copyNoIndent, copyWithIndent, end, end, endLine, flush, getWriter, in, line, newline, newline, out, quote, space, spaceWrite, spaceWrite, spaceWrite, startLine, startLine, write, write, write, writeSpace, writeSpace, writeSpace, writeSpaced, writeSpaced, writeSpaced
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationMethodCoder

protected OperationMethodCoder(Operation op,
                               UmlClassGenerator gen)
Construct a LiteralMethodCoder.

Parameters:
op - the Operation being coded. Must have a Procedure.
gen - the UmlClassGenerator using this coder. May be used to access methods of the generator. One need for this is to call ClassGenerator.addImport(java.lang.String) if the code uses a type which is not already used by a method or field of the class.
Method Detail

codeBody

public void codeBody()
Each line in the Procedure body is inserted with the current indent.

Specified by:
codeBody in class MethodCoder


Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.