java.lang.Object
org.opendaylight.mdsal.binding.model.api.TypeMemberComment
All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Immutable

@Beta public final class TypeMemberComment extends Object implements org.opendaylight.yangtools.concepts.Immutable
Structured comment of a particular class member. This is aimed towards unifying the layout of a particular type.
  • Constructor Details

    • TypeMemberComment

      public TypeMemberComment(String contractDescription, String referenceDescription, String typeSignature)
  • Method Details

    • contractDescription

      public @Nullable String contractDescription()
      Return the member contract description. This string, if present will represent the equivalent of the words you are just reading. This forms what is usually:
      • hand-written with careful explanation
      • describing the general contract outline, what the member does/holds/etc. For methods this might be pre- and post-conditions.
      Returns:
      The equivalent of the above blurb.
    • referenceDescription

      public @Nullable String referenceDescription()
      Return the member reference description. This description is passed unmodified, pre-formatted in a single block. It is expected to look something like the following paragraph:

         
           A 32-bit bit unsigned word. Individual bits are expected to be interpreted as follows:
      
             31
           +----+ ...
         
       
      Returns:
      The equivalent of the above pre-formmated paragraph.
    • typeSignature

      public @Nullable String typeSignature()
      Return the type signature of this type member. This is only applicable for methods, use of anywhere else is expected to either be ignored, or processed as is. As a matter of example, this method has a signature starting right after this period.
      Returns:
      Return the signature description, just like these words right here
    • contractOf

      public static @NonNull TypeMemberComment contractOf(String contractDescription)
    • referenceOf

      public static @NonNull TypeMemberComment referenceOf(String referenceDescription)
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object