Package org.xwiki.rendering.macro.code
Enum CodeMacroLayout
- java.lang.Object
-
- java.lang.Enum<CodeMacroLayout>
-
- org.xwiki.rendering.macro.code.CodeMacroLayout
-
- All Implemented Interfaces:
Serializable
,Comparable<CodeMacroLayout>
public enum CodeMacroLayout extends Enum<CodeMacroLayout>
Values allowed in thelayout
parameter of the code macro.- Since:
- 11.5RC1
- Version:
- $Id: ce093ed14488c62178150ce431e8925f3c986323 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CodeMacroLayout.Constants
Convenience class holding hint values forCodeLayoutHandler
components.
-
Enum Constant Summary
Enum Constants Enum Constant Description LINENUMBERS
Display line numbers beside the rendered code.PLAIN
Output the blocks as rendered by the parser.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getHint()
static CodeMacroLayout
valueOf(String name)
Returns the enum constant of this type with the specified name.static CodeMacroLayout[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PLAIN
public static final CodeMacroLayout PLAIN
Output the blocks as rendered by the parser.
-
LINENUMBERS
public static final CodeMacroLayout LINENUMBERS
Display line numbers beside the rendered code.
-
-
Method Detail
-
values
public static CodeMacroLayout[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CodeMacroLayout c : CodeMacroLayout.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CodeMacroLayout valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getHint
public final String getHint()
- Returns:
- the hint value to request the proper layout handler via DI.
-
-