public abstract class AbstractLog extends Object
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Modifier and Type | Field and Description |
---|---|
protected JCDiagnostic.Factory |
diags
Factory for diagnostics
|
protected DiagnosticSource |
source
The file that's currently being translated.
|
protected Map<JavaFileObject,DiagnosticSource> |
sourceMap
A cache of lightweight DiagnosticSource objects.
|
Modifier and Type | Method and Description |
---|---|
DiagnosticSource |
currentSource()
Return the underlying diagnostic source
|
protected abstract void |
directError(String key,
Object... args) |
void |
error(int pos,
String key,
Object... args)
Report an error, unless another error was already reported at same
source position.
|
void |
error(JCDiagnostic.DiagnosticFlag flag,
int pos,
String key,
Object... args)
Report an error, unless another error was already reported at same
source position.
|
void |
error(JCDiagnostic.DiagnosticFlag flag,
JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Report an error, unless another error was already reported at same
source position.
|
void |
error(JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Report an error, unless another error was already reported at same
source position.
|
void |
error(String key,
Object... args)
Report an error, unless another error was already reported at same
source position.
|
protected DiagnosticSource |
getSource(JavaFileObject file) |
void |
mandatoryNote(JavaFileObject file,
String key,
Object... args)
Provide a non-fatal notification, unless suppressed by the -nowarn option.
|
void |
mandatoryWarning(JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Report a warning.
|
void |
mandatoryWarning(Lint.LintCategory lc,
JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Report a warning.
|
void |
note(int pos,
String key,
Object... args)
Provide a non-fatal notification, unless suppressed by the -nowarn option.
|
void |
note(JavaFileObject file,
String key,
Object... args)
Provide a non-fatal notification, unless suppressed by the -nowarn option.
|
void |
note(JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Provide a non-fatal notification, unless suppressed by the -nowarn option.
|
void |
note(String key,
Object... args)
Provide a non-fatal notification, unless suppressed by the -nowarn option.
|
protected abstract void |
report(JCDiagnostic diagnostic) |
JavaFileObject |
useSource(JavaFileObject file)
Re-assign source, returning previous setting.
|
void |
warning(int pos,
String key,
Object... args)
Report a warning, unless suppressed by the -nowarn option or the
maximum number of warnings has been reached.
|
void |
warning(JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Report a warning, unless suppressed by the -nowarn option or the
maximum number of warnings has been reached.
|
void |
warning(Lint.LintCategory lc,
JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Report a lint warning, unless suppressed by the -nowarn option or the
maximum number of warnings has been reached.
|
void |
warning(Lint.LintCategory lc,
String key,
Object... args)
Report a lint warning, unless suppressed by the -nowarn option or the
maximum number of warnings has been reached.
|
void |
warning(String key,
Object... args)
Report a warning, unless suppressed by the -nowarn option or the
maximum number of warnings has been reached.
|
protected JCDiagnostic.Factory diags
protected DiagnosticSource source
protected Map<JavaFileObject,DiagnosticSource> sourceMap
public JavaFileObject useSource(JavaFileObject file)
protected DiagnosticSource getSource(JavaFileObject file)
public DiagnosticSource currentSource()
public void error(String key, Object... args)
key
- The key for the localized error message.args
- Fields of the error message.public void error(JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
pos
- The source position at which to report the error.key
- The key for the localized error message.args
- Fields of the error message.public void error(JCDiagnostic.DiagnosticFlag flag, JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
flag
- A flag to set on the diagnosticpos
- The source position at which to report the error.key
- The key for the localized error message.args
- Fields of the error message.public void error(int pos, String key, Object... args)
pos
- The source position at which to report the error.key
- The key for the localized error message.args
- Fields of the error message.public void error(JCDiagnostic.DiagnosticFlag flag, int pos, String key, Object... args)
flag
- A flag to set on the diagnosticpos
- The source position at which to report the error.key
- The key for the localized error message.args
- Fields of the error message.public void warning(String key, Object... args)
key
- The key for the localized warning message.args
- Fields of the warning message.public void warning(Lint.LintCategory lc, String key, Object... args)
lc
- The lint category for the diagnostickey
- The key for the localized warning message.args
- Fields of the warning message.public void warning(JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
pos
- The source position at which to report the warning.key
- The key for the localized warning message.args
- Fields of the warning message.public void warning(Lint.LintCategory lc, JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
lc
- The lint category for the diagnosticpos
- The source position at which to report the warning.key
- The key for the localized warning message.args
- Fields of the warning message.public void warning(int pos, String key, Object... args)
pos
- The source position at which to report the warning.key
- The key for the localized warning message.args
- Fields of the warning message.public void mandatoryWarning(JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
pos
- The source position at which to report the warning.key
- The key for the localized warning message.args
- Fields of the warning message.public void mandatoryWarning(Lint.LintCategory lc, JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
lc
- The lint category for the diagnosticpos
- The source position at which to report the warning.key
- The key for the localized warning message.args
- Fields of the warning message.public void note(String key, Object... args)
key
- The key for the localized notification message.args
- Fields of the notint an error or warning message:public void note(JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
key
- The key for the localized notification message.args
- Fields of the notification message.public void note(int pos, String key, Object... args)
key
- The key for the localized notification message.args
- Fields of the notification message.public void note(JavaFileObject file, String key, Object... args)
key
- The key for the localized notification message.args
- Fields of the notification message.public void mandatoryNote(JavaFileObject file, String key, Object... args)
key
- The key for the localized notification message.args
- Fields of the notification message.protected abstract void report(JCDiagnostic diagnostic)
Copyright © 2017 earcam. All rights reserved.