|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.util.AbstractLog
public abstract class AbstractLog
A base class for error logs. Reports errors and warnings, and keeps track of error numbers and positions.
This is NOT part of any API supported by Sun Microsystems. 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.
| Field Summary | |
|---|---|
protected JCDiagnostic.Factory |
diags
Factory for diagnostics |
protected DiagnosticSource |
source
The file that's currently being translated. |
protected java.util.Map<JavaFileObject,DiagnosticSource> |
sourceMap
A cache of lightweight DiagnosticSource objects. |
| Constructor Summary | |
|---|---|
AbstractLog(JCDiagnostic.Factory diags)
|
|
| Method Summary | |
|---|---|
DiagnosticSource |
currentSource()
Return the underlying diagnostic source |
protected abstract void |
directError(java.lang.String key,
java.lang.Object... args)
|
void |
error(int pos,
java.lang.String key,
java.lang.Object... args)
Report an error, unless another error was already reported at same source position. |
void |
error(JCDiagnostic.DiagnosticPosition pos,
java.lang.String key,
java.lang.Object... args)
Report an error, unless another error was already reported at same source position. |
void |
error(java.lang.String key,
java.lang.Object... args)
Report an error, unless another error was already reported at same source position. |
protected DiagnosticSource |
getSource(JavaFileObject file)
|
void |
mandatoryNote(JavaFileObject file,
java.lang.String key,
java.lang.Object... args)
Provide a non-fatal notification, unless suppressed by the -nowarn option. |
void |
mandatoryWarning(JCDiagnostic.DiagnosticPosition pos,
java.lang.String key,
java.lang.Object... args)
Report a warning. |
void |
note(int pos,
java.lang.String key,
java.lang.Object... args)
Provide a non-fatal notification, unless suppressed by the -nowarn option. |
void |
note(JavaFileObject file,
java.lang.String key,
java.lang.Object... args)
Provide a non-fatal notification, unless suppressed by the -nowarn option. |
void |
note(JCDiagnostic.DiagnosticPosition pos,
java.lang.String key,
java.lang.Object... args)
Provide a non-fatal notification, unless suppressed by the -nowarn option. |
void |
note(java.lang.String key,
java.lang.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,
java.lang.String key,
java.lang.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,
java.lang.String key,
java.lang.Object... args)
Report a warning, unless suppressed by the -nowarn option or the maximum number of warnings has been reached. |
void |
warning(java.lang.String key,
java.lang.Object... args)
Report a warning, unless suppressed by the -nowarn option or the maximum number of warnings has been reached. |
private JCDiagnostic.DiagnosticPosition |
wrap(int pos)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected JCDiagnostic.Factory diags
protected DiagnosticSource source
protected java.util.Map<JavaFileObject,DiagnosticSource> sourceMap
| Constructor Detail |
|---|
AbstractLog(JCDiagnostic.Factory diags)
| Method Detail |
|---|
public JavaFileObject useSource(JavaFileObject file)
protected DiagnosticSource getSource(JavaFileObject file)
public DiagnosticSource currentSource()
public void error(java.lang.String key,
java.lang.Object... args)
key - The key for the localized error message.args - Fields of the error message.
public void error(JCDiagnostic.DiagnosticPosition pos,
java.lang.String key,
java.lang.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(int pos,
java.lang.String key,
java.lang.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 warning(java.lang.String key,
java.lang.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(JCDiagnostic.DiagnosticPosition pos,
java.lang.String key,
java.lang.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(int pos,
java.lang.String key,
java.lang.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,
java.lang.String key,
java.lang.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 note(java.lang.String key,
java.lang.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,
java.lang.String key,
java.lang.Object... args)
key - The key for the localized notification message.args - Fields of the notification message.
public void note(int pos,
java.lang.String key,
java.lang.Object... args)
key - The key for the localized notification message.args - Fields of the notification message.
public void note(JavaFileObject file,
java.lang.String key,
java.lang.Object... args)
key - The key for the localized notification message.args - Fields of the notification message.
public void mandatoryNote(JavaFileObject file,
java.lang.String key,
java.lang.Object... args)
key - The key for the localized notification message.args - Fields of the notification message.protected abstract void report(JCDiagnostic diagnostic)
protected abstract void directError(java.lang.String key,
java.lang.Object... args)
private JCDiagnostic.DiagnosticPosition wrap(int pos)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||