The UMLGraph class diagrams allows you to model

- classes (specified as Java classes)
- active classes, components, nodes, use cases, collaborations, and packages (specified as Java classes with an `@opt shape` tag)
- attributes (specified as Java class fields)
- operations (specified as Java class methods)
- stereotypes (using the `@stereotype` name tag)
- tagged values (using the `@tagvalue` name value tag)
- implementation relationships (specified using the Java `implements` declaration)
- generalization relationships (specified using the Java `extends` declaration or (for multiple inheritance) the javadoc `@extends` tag)
- association relationships (specified using the javadoc `@assoc` tag)
- navigable (directed) association relationships (specified using the javadoc `@navassoc` tag)
- aggregation relationships (specified using the javadoc `@has` tag)
- navigable aggregation relationships (specified using the javadoc `@navhas` tag)
- composition relationships (specified using the javadoc `@composed` tag)
- navigable composition relationships (specified using the javadoc `@navcomposed` tag)
- dependency relationships (specified using the javadoc `@depend` tag)

All relationship tags apart from `@extends` take four arguments:

1. The source adornments (role, multiplicity, and visibility)
2. The relationship name
3. The target adornments (role, multiplicity, and visibility)
4. The target class

Arguments can be space-separated, or enclosed in quotes if they need to contain the space character. The - character is used as a placeholder to denote empty arguments. You can use the \n sequence to separate the first three adornments in separate centered lines; the \l and \r sequences can also be used to generate left and right aligned lines. You can use the < and > characters in the relationship name to enclose stereotype names. These will be automatically enclosed in guillemots. Note that a relationship's target class is not implicitly defined; it should also be specified using the Java class syntax. The target can be specified by simple name, java class lookup rules (imports and visibility) will be used to determine the actual class. The following is an example of a relationship specification and the resulting UML diagram:

    class Tyre {}
    class Engine {}
    class Body {}

    /**
     * @composed 1 - 4 Tyre
     * @composed 1 - 1 Engine
     * @composed 1 - 1 Body
     */
    class Car {}