com.ashridgetech.jamda.uml
Class Procedure

java.lang.Object
  |
  +--com.ashridgetech.jamda.uml.Procedure

public class Procedure
extends java.lang.Object

Represents the semantics of an Operation. Responsible for knowing the language in which the semantics are expressed and translating them into another language if possible. This class does not represent a UML ModelElement.

Version:
1.0
Author:
paulb

Nested Class Summary
static class Procedure.Language
          Typesafe enum to represent the language of a Procedure body.
 
Constructor Summary
Procedure(Procedure.Language language, java.lang.String body)
          Creates a new Procedure
 
Method Summary
 java.lang.String getBody()
          Get the body of this Procedure.
 java.lang.String getCode(Procedure.Language language)
          Get the code for this Procedure in the given language.
 java.lang.String getJavaCode()
          Get the code for this Procedure in the Java language.
 Procedure.Language getLanguage()
          Get the language of this Procedure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Procedure

public Procedure(Procedure.Language language,
                 java.lang.String body)
Creates a new Procedure

Method Detail

getLanguage

public Procedure.Language getLanguage()
Get the language of this Procedure.

Returns:
the language

getBody

public java.lang.String getBody()
Get the body of this Procedure.

Returns:
the body

getCode

public java.lang.String getCode(Procedure.Language language)
Get the code for this Procedure in the given language.

Parameters:
language - the language in which the code is required
Returns:
the code
Throws:
java.lang.IllegalArgumentException - if this Procedure cannot be expressed in language

getJavaCode

public java.lang.String getJavaCode()
Get the code for this Procedure in the Java language.

Returns:
the code
Throws:
java.lang.IllegalArgumentException - if this Procedure cannot be expressed in Java


Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.