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 | Class and Description |
|---|---|
| protected class | RichDiagnosticFormatter.
A name simplifier keeps track of class names usages in order to determine whether a class name can be compacted or not. |
| public static class | RichDiagnosticFormatter.
Configuration object provided by the rich formatter. |
| protected class | RichDiagnosticFormatter.
Enhanced type/symbol printer that provides support for features like simple names and type variable disambiguation. |
| pack-priv static enum | RichDiagnosticFormatter.
This enum defines all possible kinds of where clauses that can be attached by a rich diagnostic formatter to a given diagnostic |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final JCDiagnostic. | |
| pack-priv final JavacMessages | |
| protected RichDiagnosticFormatter. | |
| private RichDiagnosticFormatter. | |
| protected Types. | |
| pack-priv final Symtab | |
| protected Types. | |
| pack-priv final Types | |
| pack-priv RichDiagnosticFormatter. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| public String | format(JCDiagnostic diag, Locale l)
Overrides com. Implements com. Format the contents of a diagnostics. |
| public String | formatMessage(JCDiagnostic diag, Locale l)
Overrides com. Implements com. Controls the way in which a diagnostic message is displayed. |
| public RichDiagnosticFormatter. | getConfiguration()
Overrides com. Implements com. Get a list of all the enabled verbosity options. |
| protected RichDiagnosticFormatter. | Returns: type/symbol rich printerReturns the type/symbol printer used by this formatter. |
| protected List | Returns: where clause listBuild a list of multiline diagnostics containing detailed info about type-variables, captured types, and intersection types |
| private int | |
| public static RichDiagnosticFormatter | |
| protected void | |
| protected void | preprocessDiagnostic(JCDiagnostic
the diagnostic to be preprocessed diag)Preprocess a given diagnostic by looking both into its arguments and into its subdiagnostics (if any). |
| protected void | preprocessSymbol(Symbol s)
Preprocess a given symbol looking for (i) additional info (where clauses) to be added to the main diagnostic (ii) names to be compacted |
| protected void | preprocessType(Type t)
Preprocess a given type looking for (i) additional info (where clauses) to be added to the main diagnostic (ii) names to be compacted. |
| protected void | setRichPrinter(RichDiagnosticFormatter.
the rich printer to be set printerSets the type/symbol printer used by this formatter. |
| private boolean |
| diags | back to summary |
|---|---|
| pack-priv final JCDiagnostic. | |
| messages | back to summary |
|---|---|
| pack-priv final JavacMessages messages | |
| nameSimplifier | back to summary |
|---|---|
| protected RichDiagnosticFormatter. | |
| printer | back to summary |
|---|---|
| private RichDiagnosticFormatter. | |
| symbolPreprocessor | back to summary |
|---|---|
| protected Types. | |
| syms | back to summary |
|---|---|
| pack-priv final Symtab syms | |
| typePreprocessor | back to summary |
|---|---|
| protected Types. | |
| types | back to summary |
|---|---|
| pack-priv final Types types | |
| whereClauses | back to summary |
|---|---|
| pack-priv RichDiagnosticFormatter. | |
| RichDiagnosticFormatter | back to summary |
|---|---|
protected RichDiagnosticFormatter(Context context)
| |
| enter | back to summary |
|---|---|
| private String enter(Supplier<String> r) | |
| format | back to summary |
|---|---|
| public String format(JCDiagnostic diag, Locale l) Overrides com. Implements com. Doc from com. Format the contents of a diagnostics.
| |
| formatMessage | back to summary |
|---|---|
| public String formatMessage(JCDiagnostic diag, Locale l) Overrides com. Implements com. Doc from com. Controls the way in which a diagnostic message is displayed.
| |
| getConfiguration | back to summary |
|---|---|
| public RichDiagnosticFormatter. Overrides com. Implements com. Doc from com. Get a list of all the enabled verbosity options.
| |
| getRichPrinter | back to summary |
|---|---|
| protected RichDiagnosticFormatter. Returns the type/symbol printer used by this formatter.
| |
| getWhereClauses | back to summary |
|---|---|
| protected List Build a list of multiline diagnostics containing detailed info about type-variables, captured types, and intersection types
| |
| indexOf | back to summary |
|---|---|
| private int indexOf(Type type, RichDiagnosticFormatter. | |
| instance | back to summary |
|---|---|
| public static RichDiagnosticFormatter instance(Context context) Get the DiagnosticFormatter instance for this context. | |
| preprocessArgument | back to summary |
|---|---|
| protected void preprocessArgument(Object arg) Preprocess a diagnostic argument. A type/symbol argument is preprocessed by specialized type/symbol preprocessors.
| |
| preprocessDiagnostic | back to summary |
|---|---|
| protected void preprocessDiagnostic(JCDiagnostic diag) Preprocess a given diagnostic by looking both into its arguments and into its subdiagnostics (if any). This preprocessing is responsible for generating info corresponding to features like where clauses, name simplification, etc.
| |
| preprocessSymbol | back to summary |
|---|---|
| protected void preprocessSymbol(Symbol s) Preprocess a given symbol looking for (i) additional info (where clauses) to be added to the main diagnostic (ii) names to be compacted | |
| preprocessType | back to summary |
|---|---|
| protected void preprocessType(Type t) Preprocess a given type looking for (i) additional info (where clauses) to be added to the main diagnostic (ii) names to be compacted. | |
| setRichPrinter | back to summary |
|---|---|
| protected void setRichPrinter(RichDiagnosticFormatter. Sets the type/symbol printer used by this formatter.
| |
| unique | back to summary |
|---|---|
| private boolean unique(Type. | |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public String |
| nameClashes | back to summary |
|---|---|
| pack-priv Map<Name, List<Symbol>> nameClashes | |
| ClassNameSimplifier | back to summary |
|---|---|
| protected ClassNameSimplifier() | |
| addUsage | back to summary |
|---|---|
| protected void addUsage(Symbol sym) Add a name usage to the simplifier's internal cache | |
| simplify | back to summary |
|---|---|
| public String simplify(Symbol s) | |
| Modifier and Type | Class and Description |
|---|---|
| public static enum | RichDiagnosticFormatter.
The advanced formatting features provided by the rich formatter |
| Modifier and Type | Field and Description |
|---|---|
| protected EnumSet | features
set of enabled rich formatter's features |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | disable(RichDiagnosticFormatter.
feature to be disabled featureDisable a specific feature on this rich formatter. |
| public void | enable(RichDiagnosticFormatter.
feature to be enabled featureEnable a specific feature on this rich formatter. |
| public RichDiagnosticFormatter. | Returns: list of supported featuresReturns a list of all the features supported by the rich formatter. |
| public boolean | isEnabled(RichDiagnosticFormatter.
feature to be tested featureIs a given feature enabled on this formatter? |
| features | back to summary |
|---|---|
| protected EnumSet<RichDiagnosticFormatter. set of enabled rich formatter's features | |
| RichConfiguration | back to summary |
|---|---|
| public RichConfiguration(Options options, AbstractDiagnosticFormatter formatter) | |
| disable | back to summary |
|---|---|
| public void disable(RichDiagnosticFormatter. Disable a specific feature on this rich formatter.
| |
| enable | back to summary |
|---|---|
| public void enable(RichDiagnosticFormatter. Enable a specific feature on this rich formatter.
| |
| getAvailableFeatures | back to summary |
|---|---|
| public RichDiagnosticFormatter. Returns a list of all the features supported by the rich formatter.
| |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled(RichDiagnosticFormatter. Is a given feature enabled on this formatter?
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final RichDiagnosticFormatter. | SIMPLE_NAMES
full class names simplification (where possible) |
| public static final RichDiagnosticFormatter. | UNIQUE_TYPEVAR_NAMES
type-variable names disambiguation |
| public static final RichDiagnosticFormatter. | WHERE_CLAUSES
a list of additional info regarding a given type/symbol |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static RichDiagnosticFormatter. | |
| public static RichDiagnosticFormatter. |
| SIMPLE_NAMES | back to summary |
|---|---|
| public static final RichDiagnosticFormatter. full class names simplification (where possible) | |
| UNIQUE_TYPEVAR_NAMES | back to summary |
|---|---|
| public static final RichDiagnosticFormatter. type-variable names disambiguation | |
| WHERE_CLAUSES | back to summary |
|---|---|
| public static final RichDiagnosticFormatter. a list of additional info regarding a given type/symbol | |
| RichFormatterFeature | back to summary |
|---|---|
| private RichFormatterFeature() | |
| valueOf | back to summary |
|---|---|
| public static RichDiagnosticFormatter. | |
| values | back to summary |
|---|---|
| public static RichDiagnosticFormatter. | |
| Access | Constructor and Description |
|---|---|
| protected |
| RichPrinter | back to summary |
|---|---|
| protected RichPrinter() | |
| capturedVarId | back to summary |
|---|---|
| public String capturedVarId(Type. Implements abstract com. Doc from com. Maps a captured type into an unique identifier.
| |
| className | back to summary |
|---|---|
| protected String className(Type. Overrides com. Doc from com. Converts a class name into a (possibly localized) string. Anonymous inner classes get converted into a localized string.
| |
| localize | back to summary |
|---|---|
| public String localize(Locale locale, String key, Object... args) Implements abstract com. Doc from com. This method should be overridden in order to provide proper i18n support.
| |
| visitCapturedType | back to summary |
|---|---|
| public String visitCapturedType(Type. Overrides com. Implements com.
| |
| visitClassSymbol | back to summary |
|---|---|
| public String visitClassSymbol(Symbol. Overrides com. Implements com.
| |
| visitClassType | back to summary |
|---|---|
| public String visitClassType(Type. Overrides com. Implements com.
| |
| visitMethodSymbol | back to summary |
|---|---|
| public String visitMethodSymbol(Symbol. Overrides com. Implements com.
| |
| visitType | back to summary |
|---|---|
| public String visitType(Type t, Locale locale) Overrides com. Implements com.
| |
| visitTypeVar | back to summary |
|---|---|
| public String visitTypeVar(Type. Overrides com. Implements com.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final RichDiagnosticFormatter. | CAPTURED
where clause regarding a captured type |
| public static final RichDiagnosticFormatter. | INTERSECTION
where clause regarding an intersection type |
| private final String | key
resource key for this where clause kind |
| public static final RichDiagnosticFormatter. | TYPEVAR
where clause regarding a type variable |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv String | |
| public static RichDiagnosticFormatter. | |
| public static RichDiagnosticFormatter. |
| CAPTURED | back to summary |
|---|---|
| public static final RichDiagnosticFormatter. where clause regarding a captured type | |
| INTERSECTION | back to summary |
|---|---|
| public static final RichDiagnosticFormatter. where clause regarding an intersection type | |
| key | back to summary |
|---|---|
| private final String key resource key for this where clause kind | |
| TYPEVAR | back to summary |
|---|---|
| public static final RichDiagnosticFormatter. where clause regarding a type variable | |
| WhereClauseKind | back to summary |
|---|---|
| private WhereClauseKind(String key) | |
| key | back to summary |
|---|---|
| pack-priv String key() | |
| valueOf | back to summary |
|---|---|
| public static RichDiagnosticFormatter. | |
| values | back to summary |
|---|---|
| public static RichDiagnosticFormatter. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Map |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Map |
| whereClauses | back to summary |
|---|---|
| private final Map<RichDiagnosticFormatter. | |
| WhereClauses | back to summary |
|---|---|
| pack-priv WhereClauses() | |
| get | back to summary |
|---|---|
| public Map | |