|
+ |
+
+ |
@stereotype name tag)
+@tagvalue name value tag)
+implements declaration)
+extends declaration or (for multiple inheritance) the javadoc @extends tag)
+@assoc tag)
+@navassoc tag)
+@has tag)
+@composed tag)
+@depend tag)
+@extends take four arguments:
+
+
+class Tyre {}
+class Engine {}
+class Body {}
+
+/**
+ * @composed 1 - 4 Tyre
+ * @composed 1 - 1 Engine
+ * @composed 1 - 1 Body
+ */
+class Car {}
+
+ |
+
+ |
@hidden tag applied to classes, methods, and fields.
+In theory you can also use UMLGraph to reverse engineer existing
+Java code.
+Note however that UMLGraph is not designed for this purpose;
+the resulting graphs may be large and unwieldy.
+
+UMLGraph is implemented as a javadoc doclet (a program satisfying the
+doclet API that specifies the content and format of the output
+generated by the javadoc tool).
+Javadoc is part of the Sun JDK, so a typical JDK installation will also
+include javadoc.
+Before running javadoc you need to place the UmlGraph.jar
+file in a location accessible by javadoc
+(e.g. the Java class path or the current directory).
+You then run javadoc with arguments -doclet gr.spinellis.umlgraph.doclet.UmlGraph
+-docletpath /path/to/UmlGraph.jar
+and append at the end the file(s) that contain your diagram
+specification.
+You can of course use any of the javadoc general options;
+-private is usually needed to avoid having to explicitly
+specify public elements.
+
+Specifying some packages before the list of source files will designate
+those packages as local.
+When you specify a package list,
+the SVG output UmlGraph generates will contain
+local hyperlinks for the local classes
+and hyperlinks to the Sun Java API documentation for all other classes.
+
+Example:
+graph.dot
+in the current directory; option to
+this is a text file that can be processed by the Graphviz
+ dot program to layout and draw the graph.
+A command line like the following will convert the graph.dot
+file into Postscript:
+-outputencoding UTF-8 option to UMLGraph.
+This option will correctly render the stereotype guillemot characters
+in the dot output and the corresponding SVG file.
+graph.dot).
+ISO-8859-1).
+When using dot to generate SVG diagrams you should specify
+UTF-8 as the output encoding, to have guillemots correctly
+appearing in the resulting SVG.
+-attributes
+-operations
+-visibility
+-types
+-enumerations
+-enumconstants
+-hide Widget" would hide "com.foo.widgets.Widget" and
+"com.foo.widgets.BigWidget".
+http://www.acme.org/apidocs is
+provided, the class org.acme.util.MyClass will be mapped to the URL
+http://www.acme.org/apidocs/org/acme/util/MyClass.html.
+This URL will then be added to .dot diagram and can be surfaced in the
+final class diagram by setting the output to SVG, or by creating an HTML page
+that associates the diagram static image (a .gif or .png) with a client-side
+image map.
+@opt tags in front
+of a class named UMLOptions, as in the following example:
+@opt attributes on individual classes.
+In this case the @opt specification temporarily overrides
+the particular global setting for the class being processed.
+
+|
+ |
+
+ |
|
+ |
+
+ |

|
+ |
+
+ |
|
+ |
+
+ |
|
+ |
+
+ |
+
+
+
+|
+ |
+
+ |
|
+ |
+
+ |
+
+-outputencoding utf8 to UMLGraph.
+
+-sPAPERSIZE=a4 or
+-dDEVICEHEIGHTPOINTS=1000 to avoid getting
+his resutls chopped-off.)
+
+
+One other possibility for converting the sequence diagram into Postscript
+is to pass it through pic and groff.
+Tools like ps2epsi and ps2eps can then be used to
+convert the Postscript into encapsulated Postscript.
+Of course, groff users will just use the pic
+program as part of their processing pipeline.
+
+
+
+
+step(); call after we defined the objects,
+to provide them with a bit of breathing space.
+We also added a similar step call at the end of the diagram.
+Finally, we made both objects active, after their definition.
+Calling active on a given object will change the drawing of its
+lifeline, from the dashed format indicating an inactive object,
+to a thick swimming-lane, active object, format.
+
+The resultant diagram is
+
+|
+ |
+
+ |
pobject.
+ rmessage.
+ «create» stereotype.
+ Can also be written as cmessage.
+ «destroy» stereotype
+ from the from_object to the to_object.
+ The object to_object is marked as destroyed, with an X at the
+ end of its lifeline.
+ The object's lifeline need not be otherwise completed.
+ Can also be written as dmessage.
+ lconstraint.
+ lconstraint,
+ but it will be shown below the current line instead of above.
+ oconstraint.
+ left_object column and the current line.
+ The specified label_text is shown in the upper left corner.
+ right_object column and the current line.
+ The name must correspond to a begin_frame's name.
+ connect_to_comment(object2,name); to get additional
+ connecting lines to the comment.
+ line_movement changes the position of the comment and
+ box_size its size. Note that there's no comma between
+ box_size and text.
+ text is the (multiline) comment-text that will be displayed.
+ name, line_movement and box_size are optional
+ (but the commas must still appear).
+ comment.
+ .PS/.PE and
+copy "sequence.pic";
+elements.)
+
+
+.PS marks the beginning of pic commands.
+The sequence
+copy "sequence.pic";
+loads the macros defining the sequence diagram operations.
+The file sequence.pic, part of the UMLGraph distribution,
+must exist in the directory where pic2plot will be executed.
+
+Sequence diagram files must end with the sequence:
+O
+that will be identified in the diagram as
+o:Toolkit
+# character.
+| Variable Name | Default Value | Operation |
|---|---|---|
| boxht | 0.3 | Object box height |
| boxwid | 0.75 | Object box width |
| awid | 0.1 | Active lifeline width |
| spacing | 0.25 | Spacing between messages |
| movewid | 0.75 | Spacing between objects |
| dashwid | 0.05 | Interval for dashed lines |
| maxpswid | 11 | Maximum width of picture |
| maxpsht | 11 | Maximum height of picture |
+
+
+
+-enumerations and -enumconstants
+control the corresponding operation.-attributes and
+-operations options and classes with no
+fields or methods.
+Many thanks to Jonathan Wright for this contribution. -constructors option.-output command-line option, and an ant-based
+build file.
+Modified the dot output to avoid triggering a graphviz bug that made escape codes visible.
+
+