Class Reference

java.lang.Object
nl.talsmasoftware.umldoclet.uml.UMLNode
nl.talsmasoftware.umldoclet.uml.Reference

public class Reference extends UMLNode
Reference between two types.

The following reference types are currently supported:

  • The 'extends' reference: "--|>"
  • The 'implements' reference: "..|>"
  • The 'inner class' reference: "+--"
Author:
Sjoerd Talsma
  • Field Details

  • Constructor Details

  • Method Details

    • from

      public static Reference.Side from(String qualifiedName, String cardinality)
    • to

      public static Reference.Side to(String qualifiedName, String cardinality)
    • isSelfReference

      public boolean isSelfReference()
    • addNote

      public Reference addNote(String note)
    • canonical

      public Reference canonical()
      Returns:
      The canonical type that can be used for equality matching.
    • writeTo

      public <IPW extends IndentingPrintWriter> IPW writeTo(IPW output)
      Description copied from class: UMLNode
      Renders this object to the given indenting output.
      Specified by:
      writeTo in class UMLNode
      Type Parameters:
      IPW - The subclass of indenting print writer being written to.
      Parameters:
      output - The output to render this object to.
      Returns:
      A reference to the output for method chaining purposes.
    • contains

      public boolean contains(TypeName typeName)
      Returns whether or not this reference contains the requested type.
      Parameters:
      typeName - The name of a type to check.
      Returns:
      Whether either from or to matches typeName.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object