public enum RendererId extends Enum<RendererId>
Created here in S3 (not S16) because Pp2FormatResult.Region carries
one; S16 simply populates the dispatch values.
GUARDED_AST — pp formatted this region. The text is
FormatterFactory.pp()'s own output, taken unchanged after it
passed the TokenEquivalence guard. Reached either by the
whole-document fast path or, per region, via
GuardedAstDelegate (S13). Any region the input parses cleanly
in should land here.LEXICAL_ISLAND — pp could not be used here (the region did
not parse, pp threw, or pp's output failed the guard), so
LexicalIslandRenderer (S31) laid it out from the token stream
alone. Layout is plainer than pp's, but no token is lost.CONSERVATIVE — last resort:
ConservativeTokenRenderer (S14), a single-space token
passthrough. Used when the island renderer also declined.AST_OVERLAY — AstOverlayRenderer (v3, not in v2). The
enum value exists so v3 can light it up without an API change.A result whose regions are all GUARDED_AST is pp output end to
end; the other values pinpoint the byte ranges pp could not reach.
| Enum Constant and Description |
|---|
AST_OVERLAY |
CONSERVATIVE |
GUARDED_AST |
LEXICAL_ISLAND |
| Modifier and Type | Method and Description |
|---|---|
static RendererId |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RendererId[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RendererId GUARDED_AST
public static final RendererId CONSERVATIVE
public static final RendererId LEXICAL_ISLAND
public static final RendererId AST_OVERLAY
public static RendererId[] values()
for (RendererId c : RendererId.values()) System.out.println(c);
public static RendererId valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null