Enum TypeOfText
- java.lang.Object
-
- java.lang.Enum<TypeOfText>
-
- org.sonar.api.batch.sensor.highlighting.TypeOfText
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TypeOfText>
public enum TypeOfText extends java.lang.Enum<TypeOfText>
Possible types for highlighting code. See sonar-colorizer.css- Since:
- 5.1
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANNOTATION
COMMENT
CONSTANT
KEYWORD
KEYWORD_LIGHT
PREPROCESS_DIRECTIVE
STRING
STRUCTURED_COMMENT
For example Javadoc
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
cssClass()
For internal usestatic TypeOfText
forCssClass(java.lang.String cssClass)
static TypeOfText
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TypeOfText[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ANNOTATION
public static final TypeOfText ANNOTATION
-
CONSTANT
public static final TypeOfText CONSTANT
-
COMMENT
public static final TypeOfText COMMENT
-
STRUCTURED_COMMENT
public static final TypeOfText STRUCTURED_COMMENT
For example Javadoc
-
KEYWORD
public static final TypeOfText KEYWORD
-
STRING
public static final TypeOfText STRING
-
KEYWORD_LIGHT
public static final TypeOfText KEYWORD_LIGHT
-
PREPROCESS_DIRECTIVE
public static final TypeOfText PREPROCESS_DIRECTIVE
-
-
Method Detail
-
values
public static TypeOfText[] 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 (TypeOfText c : TypeOfText.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypeOfText valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
forCssClass
public static TypeOfText forCssClass(java.lang.String cssClass)
-
cssClass
public java.lang.String cssClass()
For internal use
-
-