public static class JCDiagnostic.Factory extends Object
Modifier and Type | Field and Description |
---|---|
protected static Context.Key<JCDiagnostic.Factory> |
diagnosticFactoryKey
The context key for the diagnostic factory.
|
Modifier | Constructor and Description |
---|---|
protected |
Factory(Context context)
Create a new diagnostic factory.
|
|
Factory(JavacMessages messages,
String prefix)
Create a new diagnostic factory.
|
Modifier and Type | Method and Description |
---|---|
JCDiagnostic |
create(JCDiagnostic.DiagnosticType kind,
DiagnosticSource source,
JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Create a new diagnostic of the given kind, which is not mandatory and which has
no lint category.
|
JCDiagnostic |
create(JCDiagnostic.DiagnosticType kind,
Lint.LintCategory lc,
Set<JCDiagnostic.DiagnosticFlag> flags,
DiagnosticSource source,
JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Create a new diagnostic of the given kind.
|
JCDiagnostic |
error(DiagnosticSource source,
JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Create an error diagnostic.
|
JCDiagnostic |
fragment(String key,
Object... args)
Create a fragment diagnostic, for use as an argument in other diagnostics
|
static JCDiagnostic.Factory |
instance(Context context)
Get the Factory instance for this context.
|
JCDiagnostic |
mandatoryNote(DiagnosticSource source,
String key,
Object... args)
Create a note diagnostic that will not be hidden by the -nowarn or -Xlint:none options.
|
JCDiagnostic |
mandatoryWarning(DiagnosticSource source,
JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Create a warning diagnostic that will not be hidden by the -nowarn or -Xlint:none options.
|
JCDiagnostic |
mandatoryWarning(Lint.LintCategory lc,
DiagnosticSource source,
JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Create a warning diagnostic that will not be hidden by the -nowarn or -Xlint:none options.
|
JCDiagnostic |
note(DiagnosticSource source,
JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Create a note diagnostic.
|
JCDiagnostic |
note(String key,
Object... args)
Create a note diagnostic.
|
protected String |
qualify(JCDiagnostic.DiagnosticType t,
String key) |
JCDiagnostic |
warning(DiagnosticSource source,
JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Create a warning diagnostic.
|
JCDiagnostic |
warning(Lint.LintCategory lc,
DiagnosticSource source,
JCDiagnostic.DiagnosticPosition pos,
String key,
Object... args)
Create a warning diagnostic.
|
JCDiagnostic |
warning(Lint.LintCategory lc,
String key,
Object... args)
Create a warning diagnostic.
|
protected static final Context.Key<JCDiagnostic.Factory> diagnosticFactoryKey
protected Factory(Context context)
public Factory(JavacMessages messages, String prefix)
public static JCDiagnostic.Factory instance(Context context)
public JCDiagnostic error(DiagnosticSource source, JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
source
- The source of the compilation unit, if any, in which to report the error.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 JCDiagnostic mandatoryWarning(DiagnosticSource source, JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
source
- The source of the compilation unit, if any, in which to report the warning.pos
- The source position at which to report the warning.key
- The key for the localized warning message.args
- Fields of the warning message.MandatoryWarningHandler
public JCDiagnostic mandatoryWarning(Lint.LintCategory lc, DiagnosticSource source, JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
lc
- The lint category for the diagnosticsource
- The source of the compilation unit, if any, in which to report the warning.pos
- The source position at which to report the warning.key
- The key for the localized warning message.args
- Fields of the warning message.MandatoryWarningHandler
public JCDiagnostic warning(Lint.LintCategory lc, String key, Object... args)
lc
- The lint category for the diagnostickey
- The key for the localized error message.args
- Fields of the warning message.MandatoryWarningHandler
public JCDiagnostic warning(DiagnosticSource source, JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
source
- The source of the compilation unit, if any, in which to report the warning.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 JCDiagnostic warning(Lint.LintCategory lc, DiagnosticSource source, JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
lc
- The lint category for the diagnosticsource
- The source of the compilation unit, if any, in which to report the warning.pos
- The source position at which to report the warning.key
- The key for the localized warning message.args
- Fields of the warning message.MandatoryWarningHandler
public JCDiagnostic mandatoryNote(DiagnosticSource source, String key, Object... args)
key
- The key for the localized message.args
- Fields of the message.MandatoryWarningHandler
public JCDiagnostic note(String key, Object... args)
key
- The key for the localized error message.args
- Fields of the message.public JCDiagnostic note(DiagnosticSource source, JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
source
- The source of the compilation unit, if any, in which to report the note.pos
- The source position at which to report the note.key
- The key for the localized message.args
- Fields of the message.public JCDiagnostic fragment(String key, Object... args)
key
- The key for the localized message.args
- Fields of the message.public JCDiagnostic create(JCDiagnostic.DiagnosticType kind, DiagnosticSource source, JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
kind
- The diagnostic kindsource
- The source of the compilation unit, if any, in which to report the message.pos
- The source position at which to report the message.key
- The key for the localized message.args
- Fields of the message.public JCDiagnostic create(JCDiagnostic.DiagnosticType kind, Lint.LintCategory lc, Set<JCDiagnostic.DiagnosticFlag> flags, DiagnosticSource source, JCDiagnostic.DiagnosticPosition pos, String key, Object... args)
kind
- The diagnostic kindlc
- The lint category, if applicable, or nullflags
- The set of flags for the diagnosticsource
- The source of the compilation unit, if any, in which to report the message.pos
- The source position at which to report the message.key
- The key for the localized message.args
- Fields of the message.protected String qualify(JCDiagnostic.DiagnosticType t, String key)
Copyright © 2015. All rights reserved.