Class ConfigurationFile.ErrorDescriptor

java.lang.Object
net.jini.config.ConfigurationFile.ErrorDescriptor
All Implemented Interfaces:
Serializable
Enclosing class:
ConfigurationFile

public static class ConfigurationFile.ErrorDescriptor extends Object implements Serializable
Class used to represent a syntax error encountered when parsing a configuration source or a problem encountered when attempting to return an existing entry or the type of an existing entry.
Since:
2.0 This implementation uses the Logger named net.jini.config to log information at the following logging levels:

net.jini.config
Level Description
invalid reference
INFO
problems adding new prohibited methods
invalid reference
FINE
problems getting entries, including getting entries that are not found
invalid reference
FINE
returning default values
invalid reference
FINER
creating an instance of this class, getting existing entries, or adding new prohibited methods
Author:
Sun Microsystems, Inc.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    ErrorDescriptor(int lineno, int override, String description)
    Creates a new error descriptor.
    ErrorDescriptor(int lineno, int override, String description, String locationName)
    Creates a new error descriptor.
    ErrorDescriptor(int lineno, int override, String description, String locationName, Throwable t)
    Creates a new error descriptor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the exception associated with this error or null if there is no exception associated with this error.
    Returns a textual description of the error encountered.
    int
    Returns the line number in the configuration source where the entry with an error can be found or 0 if this error descriptor is not associated with a line number.
    Returns the name of the configuration source location or null if location information is not available.
    int
    Returns the override sequence number where this error occurred or 0 if the error did not occur in an override.
    Returns a string representation of this error.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ErrorDescriptor

      public ErrorDescriptor(int lineno, int override, String description, String locationName, Throwable t)
      Creates a new error descriptor.
      Parameters:
      lineno - line number of the configuration source where this problem was found or 0 if this problem is not associated with a line number
      override - the override sequence number or 0 if the problem was not found in an override
      description - a description of the problem; this parameter cannot be null
      locationName - the name of the configuration source location or null if location information is not available
      t - exception associated with this error or null if there is no exception related to the error; t cannot be an instance of java.lang.Error
      Throws:
      IllegalArgumentException - if lineno invalid input: '<' 0, override invalid input: '<' 0, description is null, or t is an instance of java.lang.Error
    • ErrorDescriptor

      public ErrorDescriptor(int lineno, int override, String description, String locationName)
      Creates a new error descriptor.
      Parameters:
      lineno - line number of the configuration source where this problem was found or 0 if this problem is not associated with a line number
      override - the override sequence number or 0 if the problem was not found in an override
      description - a description of the problem; this parameter cannot be null
      locationName - the name of the configuration source location or null if location information is not available
      Throws:
      IllegalArgumentException - if lineno invalid input: '<' 0, override invalid input: '<' 0, or description is null
    • ErrorDescriptor

      public ErrorDescriptor(int lineno, int override, String description)
      Creates a new error descriptor.
      Parameters:
      lineno - line number of the configuration source where this problem was found or 0 if this problem is not associated with a line number
      override - the override sequence number or 0 if the problem was not found in an override
      description - a description of the problem; this parameter cannot be null
      Throws:
      IllegalArgumentException - if lineno invalid input: '<' 0, override invalid input: '<' 0, or description is null
  • Method Details

    • getLineNumber

      public int getLineNumber()
      Returns the line number in the configuration source where the entry with an error can be found or 0 if this error descriptor is not associated with a line number.
      Returns:
      the line number in the configuration source where the entry with an error can be found or 0 if this error descriptor is not associated with a line number
    • getOverride

      public int getOverride()
      Returns the override sequence number where this error occurred or 0 if the error did not occur in an override. For example, if the error occurred in the second override specified, the method would return 2.
      Returns:
      the override where this error occurred or 0 if this error did not occur in an override
    • getDescription

      public String getDescription()
      Returns a textual description of the error encountered.
      Returns:
      a description of the problem
    • getLocationName

      public String getLocationName()
      Returns the name of the configuration source location or null if location information is not available.
      Returns:
      the name of the configuration source location where this error occurred or null if location information is not available.
    • getCause

      public Throwable getCause()
      Returns the exception associated with this error or null if there is no exception associated with this error.
      Returns:
      the exception associated with this error or null if there is no exception associated with this error.
    • toString

      public String toString()
      Returns a string representation of this error.
      Overrides:
      toString in class Object
      Returns:
      the string representation of this error