public static class ConfigurationFile.ErrorDescriptor extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
private String |
description
textual description of the problem encountered
|
private int |
lineno
line number where this syntax error occurred
|
private String |
locationName
configuration source location name
|
private int |
override
override where this syntax error occurred
|
private static long |
serialVersionUID |
private Throwable |
t
exception associated with this error
|
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
Throwable |
getCause()
Returns the exception associated with this error or
null
if there is no exception associated with this error. |
String |
getDescription()
Returns a textual description of the error encountered.
|
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. |
String |
getLocationName()
Returns the name of the configuration source location or
null if location information is not available. |
int |
getOverride()
Returns the override sequence number where this error occurred
or
0 if the error did not occur in an override. |
private void |
readObject(ObjectInputStream in)
Verifies that the deserialized field values for this error
descriptor are valid.
|
private void |
readObjectNoData()
Throws InvalidObjectException, since a descriptor is always
required.
|
String |
toString()
Returns a string representation of this error.
|
private static final long serialVersionUID
private final int lineno
private final int override
private final String description
private final String locationName
private final Throwable t
public ErrorDescriptor(int lineno, int override, String description, String locationName, Throwable t)
lineno
- line number of the configuration source where this
problem was found or 0
if this problem is not
associated with a line numberoverride
- the override sequence number or 0
if the problem was not found in an overridedescription
- 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
availablet
- 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
IllegalArgumentException
- if lineno
<
0
, override
< 0
,
description
is null
, or t
is an instance of java.lang.Error
public ErrorDescriptor(int lineno, int override, String description, String locationName)
lineno
- line number of the configuration source where this
problem was found or 0
if this problem is not
associated with a line numberoverride
- the override sequence number or 0
if the problem was not found in an overridedescription
- 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
availableIllegalArgumentException
- if lineno
<
0
, override
< 0
, or
description
is null
public ErrorDescriptor(int lineno, int override, String description)
lineno
- line number of the configuration source where this
problem was found or 0
if this problem is not
associated with a line numberoverride
- the override sequence number or 0
if the problem was not found in an overridedescription
- a description of the problem; this parameter
cannot be null
IllegalArgumentException
- if lineno
<
0
, override
< 0
, or
description
is null
public int getLineNumber()
0
if this error
descriptor is not associated with a line number.0
if this error
descriptor is not associated with a line numberpublic int getOverride()
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
.0
if this error did not occur in an overridepublic String getDescription()
public String getLocationName()
null
if location information is not available.null
if location information is
not available.public Throwable getCause()
null
if there is no exception associated with this error.public String toString()
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
private void readObjectNoData() throws ObjectStreamException
ObjectStreamException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.