MibImport (Mibble 2.10.1 Documentation)
Date: 2017-02-20

net.percederberg.mibble

## Class MibImport

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

- All Implemented Interfaces:
    MibContext

      public class MibImport
      extends java.lang.Object
      implements MibContext

  A MIB import list. This class contains a reference to another MIB and a number of symbols in it.
  Since:
    2.6

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MibSymbol` | `findSymbol(java.lang.String name, boolean expanded)` Searches for a named MIB symbol.
    `java.util.List<java.lang.String>` | `getAllSymbolNames()` Returns all symbol names in this MIB import declaration.
    `Mib` | `getMib()` Returns the imported MIB.
    `java.lang.String` | `getName()` Returns the imported MIB name.
    `void` | `initialize(MibLoaderLog log)` Initializes the MIB import.
    `java.lang.String` | `toString()` Returns a string representation of this object.
    `protected void` | `validateSmiVersion(MibLoaderLog log, Mib mib)` Validates the imported MIB module SMI version.

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

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

- - ### Method Detail

    - #### initialize

          public void initialize(MibLoaderLog log)

      Initializes the MIB import. This will resolve all referenced symbols. This method will be called by the MIB loader.
      Parameters:
        `log` - the MIB loader log

    - #### validateSmiVersion

          protected void validateSmiVersion(MibLoaderLog log,
                                Mib mib)

      Validates the imported MIB module SMI version. Should be the same as the importing MIB module SMI version. A warning will be logged on mismatch.
      Parameters:
        `log` - the MIB loader log
        `mib` - the importing MIB module

    - #### getName

          public java.lang.String getName()

      Returns the imported MIB name.
      Returns:
        the imported MIB name

    - #### getMib

          public Mib getMib()

      Returns the imported MIB.
      Returns:
        the imported MIB

    - #### getAllSymbolNames

          public java.util.List<java.lang.String> getAllSymbolNames()

      Returns all symbol names in this MIB import declaration.
      Returns:
        a collection of the imported MIB symbol names

    - #### findSymbol

          public MibSymbol findSymbol(java.lang.String name,
                             boolean expanded)

      Searches for a named MIB symbol. This method may search outside the normal (or strict) scope, thereby allowing a form of relaxed search. Note that the results from the normal and expanded search may not be identical, due to the context chaining and the same symbol name appearing in various contexts.

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

      Specified by:
        `findSymbol` in interface `MibContext`
      Parameters:
        `name` - the symbol name
        `expanded` - the expanded scope flag
      Returns:
        the MIB symbol, or null if not found

    - #### toString

          public java.lang.String toString()

      Returns a string representation of this object.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a string representation of this object