Enum Class Flavor
- All Implemented Interfaces:
Serializable,Comparable<Flavor>,Constable
The four petstore rendering flavors shown under Developer > Rendering flavors.
Example:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFreeMarker view rendering.HTML5 bean builder, serialized byHtmlSerializer.Mustache view rendering.The standalone React app at /petstore-ui. -
Method Summary
Modifier and TypeMethodDescriptioncaption()id()label()static FlavorLooks up a flavor by its URL id.page()page(RestRequest req) The console page for this flavor, from its builder twin on?builder.static FlavorReturns the enum constant of this class with the specified name.static Flavor[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HTML
HTML5 bean builder, serialized byHtmlSerializer. -
FREEMARKER
FreeMarker view rendering. -
MUSTACHE
Mustache view rendering. -
REACT
The standalone React app at /petstore-ui.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
of
Looks up a flavor by its URL id.- Parameters:
id- The id, for example"html".- Returns:
- The flavor.
- Throws:
NotFound- If the id names no flavor.
-
id
- Returns:
- The URL id.
-
label
- Returns:
- The nav label, also the caption card's title.
-
caption
- Returns:
- The caption shown above the rendered output.
-
sourceUrl
- Returns:
- The GitHub URL of the class that renders this flavor.
-
page
The console page for this flavor, from its builder twin on?builder.- Parameters:
req- The request.- Returns:
- The page.
-
page
- Returns:
- The console page for this flavor.
-