org.argouml.uml.notation.uml
Class OperationNotationUml

java.lang.Object
  extended byorg.argouml.uml.notation.ValueHandler
      extended byorg.argouml.uml.notation.OperationNotation
          extended byorg.argouml.uml.notation.uml.OperationNotationUml
All Implemented Interfaces:
NotationProvider4

public class OperationNotationUml
extends OperationNotation

The UML notation for an Operation.


Field Summary
 
Fields inherited from class org.argouml.uml.notation.OperationNotation
myClass, myOperation
 
Constructor Summary
OperationNotationUml(Object operation)
          The constructor.
 
Method Summary
 String getParsingHelp()
           
 String parse(String text)
           
 void parseOperation(String s, Object op)
          Parse a line of text and aligns the MOperation to the specification given.
 void parseOperationFig(Object classifier, Object operation, String text)
          Parse a string representing one ore more ';' separated operations.
 String toString()
          Generates an operation according to the UML 1.3 notation: stereotype visibility name (parameter-list) : return-type-expression {property-string} For the return-type-expression: only the types of the return parameters are shown.
 
Methods inherited from class org.argouml.uml.notation.ValueHandler
getValue, isValue, putValue, putValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OperationNotationUml

public OperationNotationUml(Object operation)
The constructor.

Parameters:
operation - the operation that is represented
Method Detail

parse

public String parse(String text)
Parameters:
text - the text given by the user to be parsed to adapt the model
Returns:
after parsing, the modelelement is generated again, to normalize the given text
See Also:
NotationProvider4.parse(java.lang.String)

parseOperationFig

public void parseOperationFig(Object classifier,
                              Object operation,
                              String text)
                       throws ParseException
Parse a string representing one ore more ';' separated operations. The case that a String or char contains a ';' (e.g. in an initializer) is handled, but not other occurences of ';'.

Parameters:
classifier - Classifier The classifier the operation(s) belong to
operation - Operation The operation on which the editing happened
text - The string to parse
Throws:
ParseException - for invalid input

parseOperation

public void parseOperation(String s,
                           Object op)
                    throws ParseException
Parse a line of text and aligns the MOperation to the specification given. The line should be on the following form: All elements are optional and, if left unspecified, will preserve their old values.

Stereotypes can be given between any element in the line on the form: <<stereotype1,stereotype2,stereotype3>>

The following properties are recognized to have special meaning: abstract, concurrency, concurrent, guarded, leaf, query, root and sequential.

This syntax is compatible with the UML 1.3 spec.

(formerly visibility name (parameter list) : return-type-expression {property-string} ) (formerly 2nd: [visibility] [keywords] returntype name(params)[;] )

Parameters:
s - The String to parse.
op - The MOperation to adjust to the spcification in s.
Throws:
ParseException - when it detects an error in the attribute string. See also ParseError.getErrorOffset().

getParsingHelp

public String getParsingHelp()
Returns:
a i18 key that represents a help string giving an explanation to the user of the syntax
See Also:
NotationProvider4.getParsingHelp()

toString

public String toString()
Generates an operation according to the UML 1.3 notation: stereotype visibility name (parameter-list) : return-type-expression {property-string} For the return-type-expression: only the types of the return parameters are shown. Depending on settings in Notation, visibility and properties are shown/not shown.

See Also:
Object.toString()


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook