MibLoaderLog.LogEntry (Mibble 2.10.1 Documentation)
Date: 2017-02-20

net.percederberg.mibble

## Class MibLoaderLog.LogEntry

- java.lang.Object
- - net.percederberg.mibble.MibLoaderLog.LogEntry

- Enclosing class:
    MibLoaderLog

      public class MibLoaderLog.LogEntry
      extends java.lang.Object

  A log entry. This class holds all the details in an error or a warning log entry.
  Since:
    2.2

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ERROR` The error log entry type constant.
    `static int` | `INTERNAL_ERROR` The internal error log entry type constant.
    `static int` | `WARNING` The warning log entry type constant.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MibLoaderLog.LogEntry(int type, MibFileRef fileRef, java.lang.String message)` Creates a new log entry.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getColumnNumber()` Returns the column number.
    `java.io.File` | `getFile()` Returns the file this entry applies to.
    `int` | `getLineNumber()` Returns the line number.
    `java.lang.String` | `getMessage()` Returns the log entry message.
    `int` | `getType()` Returns the log entry type.
    `boolean` | `isError()` Checks if this is an error log entry.
    `boolean` | `isWarning()` Checks if this is a warning log entry.
    `java.lang.String` | `readLine()` Reads the line from the referenced file.

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

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

- - ### Field Detail

    - #### INTERNAL_ERROR

          public static final int INTERNAL_ERROR

      The internal error log entry type constant.
      See Also:
        Constant Field Values

    - #### ERROR

          public static final int ERROR

      The error log entry type constant.
      See Also:
        Constant Field Values

    - #### WARNING

          public static final int WARNING

      The warning log entry type constant.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MibLoaderLog.LogEntry

          public MibLoaderLog.LogEntry(int type,
                               MibFileRef fileRef,
                               java.lang.String message)

      Creates a new log entry.
      Parameters:
        `type` - the log entry type
        `fileRef` - the log entry file reference
        `message` - the log entry message

  - ### Method Detail

    - #### isError

          public boolean isError()

      Checks if this is an error log entry.
      Returns:
        true if this is an error log entry, or false otherwise

    - #### isWarning

          public boolean isWarning()

      Checks if this is a warning log entry.
      Returns:
        true if this is a warning log entry, or false otherwise

    - #### getType

          public int getType()

      Returns the log entry type.
      Returns:
        the log entry type
      See Also:
        `INTERNAL_ERROR`, `ERROR`, `WARNING`

    - #### getFile

          public java.io.File getFile()

      Returns the file this entry applies to.
      Returns:
        the file affected

    - #### getLineNumber

          public int getLineNumber()

      Returns the line number.
      Returns:
        the line number

    - #### getColumnNumber

          public int getColumnNumber()

      Returns the column number.
      Returns:
        the column number

    - #### getMessage

          public java.lang.String getMessage()

      Returns the log entry message.
      Returns:
        the log entry message

    - #### readLine

          public java.lang.String readLine()

      Reads the line from the referenced file. If the file couldn't be opened or read correctly, null will be returned. The line will NOT contain the terminating '\n' character.
      Returns:
        the line read, or null if not found