Package com.tonic.analysis.source.editor
Enum Replacement.Type
- java.lang.Object
-
- java.lang.Enum<Replacement.Type>
-
- com.tonic.analysis.source.editor.Replacement.Type
-
- All Implemented Interfaces:
Serializable,Comparable<Replacement.Type>
- Enclosing class:
- Replacement
public static enum Replacement.Type extends Enum<Replacement.Type>
The kind of action a replacement performs.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSERT_AFTERInsert statements after current.INSERT_BEFOREInsert statements before current.KEEPNo change.REMOVERemove entirely.REPLACE_BLOCKReplace with multiple statements.REPLACE_EXPRReplace with new expression.REPLACE_STMTReplace with new statement.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Replacement.TypevalueOf(String name)Returns the enum constant of this type with the specified name.static Replacement.Type[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
KEEP
public static final Replacement.Type KEEP
No change.
-
REPLACE_EXPR
public static final Replacement.Type REPLACE_EXPR
Replace with new expression.
-
REPLACE_STMT
public static final Replacement.Type REPLACE_STMT
Replace with new statement.
-
REPLACE_BLOCK
public static final Replacement.Type REPLACE_BLOCK
Replace with multiple statements.
-
REMOVE
public static final Replacement.Type REMOVE
Remove entirely.
-
INSERT_BEFORE
public static final Replacement.Type INSERT_BEFORE
Insert statements before current.
-
INSERT_AFTER
public static final Replacement.Type INSERT_AFTER
Insert statements after current.
-
-
Method Detail
-
values
public static Replacement.Type[] 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 (Replacement.Type c : Replacement.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Replacement.Type 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
-
-