public final class JSError extends Object
Modifier and Type | Field and Description |
---|---|
String |
description
Description of the error
|
CheckLevel |
level
Deprecated.
Use #getDefaultLevel
|
int |
lineNumber
Line number of the source
|
Node |
node
Node where the warning occurred.
|
String |
sourceName
Name of the source
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
format(CheckLevel level,
MessageFormatter formatter)
Format a message at the given level.
|
int |
getCharno()
Get the character number.
|
CheckLevel |
getDefaultLevel()
The default level, before any of the WarningsGuards are applied.
|
int |
getLineNumber()
Get the line number.
|
int |
getNodeLength() |
int |
getNodeSourceOffset() |
DiagnosticType |
getType() |
int |
hashCode() |
static JSError |
make(DiagnosticType type,
String... arguments)
Creates a JSError with no source information
|
static JSError |
make(Node n,
CheckLevel level,
DiagnosticType type,
String... arguments) |
static JSError |
make(Node n,
DiagnosticType type,
String... arguments)
Creates a JSError from a file and Node position.
|
static JSError |
make(String sourceName,
int lineno,
int charno,
CheckLevel level,
DiagnosticType type,
String... arguments)
Creates a JSError at a given source location
|
static JSError |
make(String sourceName,
int lineno,
int charno,
DiagnosticType type,
String... arguments)
Creates a JSError at a given source location
|
String |
toString() |
public final String description
public final String sourceName
public final Node node
public final int lineNumber
@Deprecated public final CheckLevel level
public static JSError make(DiagnosticType type, String... arguments)
type
- The DiagnosticTypearguments
- Arguments to be incorporated into the messagepublic static JSError make(String sourceName, int lineno, int charno, DiagnosticType type, String... arguments)
sourceName
- The source file namelineno
- Line number with source file, or -1 if unknowncharno
- Column number within line, or -1 for whole line.type
- The DiagnosticTypearguments
- Arguments to be incorporated into the messagepublic static JSError make(String sourceName, int lineno, int charno, CheckLevel level, DiagnosticType type, String... arguments)
sourceName
- The source file namelineno
- Line number with source file, or -1 if unknowncharno
- Column number within line, or -1 for whole line.type
- The DiagnosticTypearguments
- Arguments to be incorporated into the messagepublic static JSError make(Node n, DiagnosticType type, String... arguments)
n
- Determines the line and char position and source file nametype
- The DiagnosticTypearguments
- Arguments to be incorporated into the messagepublic static JSError make(Node n, CheckLevel level, DiagnosticType type, String... arguments)
public DiagnosticType getType()
public String format(CheckLevel level, MessageFormatter formatter)
null
public int getCharno()
public int getLineNumber()
public int getNodeSourceOffset()
public int getNodeLength()
public CheckLevel getDefaultLevel()
Copyright © 2009-2016 Google. All Rights Reserved.