net.percederberg.mibble

## Class MibSymbol

- java.lang.Object
- - net.percederberg.mibble.MibSymbol

- Direct Known Subclasses:
    MibMacroSymbol, MibTypeSymbol, MibValueSymbol

      public abstract class MibSymbol
      extends java.lang.Object

  A MIB symbol. This is the base class for all symbols in a MIB file. Each symbol is typically identified by it's name, which must be unique within the MIB file. All symbols also have a data type.
  Since:
    2.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getComment()` Returns the symbol comment.
    `MibFileRef` | `getFileRef()` Returns the MIB file reference.
    `FileLocation` | `getLocation()` Deprecated. Use the getFileRef() method instead.
    `Mib` | `getMib()` Returns the symbol MIB file.
    `java.lang.String` | `getName()` Returns the symbol name.
    `java.lang.String` | `getText()` Returns the unparsed input MIB text.
    `abstract void` | `initialize(MibLoaderLog log)` Initializes the MIB symbol.

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

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

- - ### Method Detail

    - #### initialize

          public abstract void initialize(MibLoaderLog log)
                                   throws MibException

      Initializes the MIB symbol. This will remove all levels of indirection present, such as references to types or values. No information is lost by this operation. This method may modify this object as a side-effect.

      NOTE: This is an internal method that should only be called by the MIB loader.

      Parameters:
        `log` - the MIB loader log
      Throws:
        `MibException` - if an error was encountered during the initialization

    - #### getFileRef

          public MibFileRef getFileRef()

      Returns the MIB file reference. NOTE: This is an internal method that is used for extracting MIB source text.
      Returns:
        the MIB file reference

    - #### getLocation

          public FileLocation getLocation()

      Deprecated. Use the getFileRef() method instead.
      Returns the file location.
      Returns:
        the file location

    - #### getMib

          public Mib getMib()

      Returns the symbol MIB file. This is the MIB file where the symbol is defined.
      Returns:
        the symbol MIB file
      Since:
        2.2

    - #### getName

          public java.lang.String getName()

      Returns the symbol name.
      Returns:
        the symbol name

    - #### getText

          public java.lang.String getText()

      Returns the unparsed input MIB text.
      Returns:
        the raw MIB file text
      Since:
        2.10

    - #### getComment

          public java.lang.String getComment()

      Returns the symbol comment.
      Returns:
        the symbol comment, or null if no comment was set
      Since:
        2.6