net.percederberg.mibble.snmp

## Class SnmpType

- java.lang.Object
- - net.percederberg.mibble.MibType
  - - net.percederberg.mibble.snmp.SnmpType

- Direct Known Subclasses:
    SnmpAgentCapabilities, SnmpModuleCompliance, SnmpModuleIdentity, SnmpNotificationGroup, SnmpNotificationType, SnmpObjectGroup, SnmpObjectIdentity, SnmpObjectType, SnmpTextualConvention, SnmpTrapType

      public abstract class SnmpType
      extends MibType

  The base SNMP macro type. This is an abstract type, meaning there only exist instances of subclasses. It exists to provide methods that are valid across all SNMP macro types.
  Since:
    2.5

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SnmpType(java.lang.String name, java.lang.String description)` Creates a new SNMP macro type instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getDescription()` Returns the type description.
    `protected java.lang.String` | `getDescription(java.lang.String indent)` Returns the type description indented with the specified string.
    `java.lang.String` | `getUnformattedDescription()` Returns the unformatted type description.
    `protected static java.lang.String` | `removeIndent(java.lang.String str)` Returns a string with any unneeded indentation removed.

    - ### Methods inherited from class net.percederberg.mibble.MibType

      `createReference, createReference, createReference, getComment, getName, getReferenceSymbol, getTag, hasReferenceTo, hasReferenceTo, hasTag, hasTag, initialize, isCompatible, isPrimitive, setReferenceSymbol, setTag, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SnmpType

          protected SnmpType(java.lang.String name,
                  java.lang.String description)

      Creates a new SNMP macro type instance. This constructor can only be called by subclasses.
      Parameters:
        `name` - the type name
        `description` - the type description

  - ### Method Detail

    - #### removeIndent

          protected static java.lang.String removeIndent(java.lang.String str)

      Returns a string with any unneeded indentation removed. This method will decide the indentation level from the number of spaces on the second line. It also replaces all tab characters with 8 spaces.
      Parameters:
        `str` - the string to process
      Returns:
        the processed string

    - #### getDescription

          public java.lang.String getDescription()

      Returns the type description. Any unneeded indentation will be removed from the description, and it also replaces all tab characters with 8 spaces.
      Returns:
        the type description, or null if no description has been set
      See Also:
        `getUnformattedDescription()`

    - #### getUnformattedDescription

          public java.lang.String getUnformattedDescription()

      Returns the unformatted type description. This method returns the original MIB file description, without removing unneeded indentation or similar.
      Returns:
        the unformatted type description, or null if no description has been set
      Since:
        2.5
      See Also:
        `getDescription()`

    - #### getDescription

          protected java.lang.String getDescription(java.lang.String indent)

      Returns the type description indented with the specified string. The first line will NOT be indented, but only the following lines (if any).
      Parameters:
        `indent` - the indentation string
      Returns:
        the indented type description, or null if no description has been set