public static enum PropertyDispatcher.TypeRenderer extends Enum<PropertyDispatcher.TypeRenderer>
Class
or TypeDescription
. Starting with Java 9, such values are enclosed
in curly braces and are rendered as class literals to better match the source code.Enum Constant and Description |
---|
FOR_JAVA9_CAPABLE_VM
A type renderer for a VM of at least Java version 9.
|
FOR_LEGACY_VM
A type renderer for a legacy VM prior to Java 8.
|
Modifier and Type | Field and Description |
---|---|
static PropertyDispatcher.TypeRenderer |
CURRENT
The type renderer to be used on the current VM.
|
Modifier and Type | Method and Description |
---|---|
char |
getClose()
Returns the closing brace.
|
char |
getOpen()
Returns the opening brace.
|
abstract String |
render(Object type)
Renders a
Class or TypeDescription constant. |
String |
render(Object[] type)
Renders an array of
Class or TypeDescription constants. |
String |
toString() |
static PropertyDispatcher.TypeRenderer |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PropertyDispatcher.TypeRenderer[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PropertyDispatcher.TypeRenderer FOR_LEGACY_VM
public static final PropertyDispatcher.TypeRenderer FOR_JAVA9_CAPABLE_VM
public static final PropertyDispatcher.TypeRenderer CURRENT
public static PropertyDispatcher.TypeRenderer[] values()
for (PropertyDispatcher.TypeRenderer c : PropertyDispatcher.TypeRenderer.values()) System.out.println(c);
public static PropertyDispatcher.TypeRenderer 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 nullpublic abstract String render(Object type)
Class
or TypeDescription
constant.type
- The type to be rendered.public String render(Object[] type)
Class
or TypeDescription
constants.type
- The types to be rendered.public char getOpen()
public char getClose()
public String toString()
toString
in class Enum<PropertyDispatcher.TypeRenderer>
Copyright © 2014–2016. All rights reserved.