Enum Class CodeMergeStrategy
- All Implemented Interfaces:
Serializable, Comparable<CodeMergeStrategy>, Constable
Enum with the available strategies for a
merge.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMergesthe signature(s) of both elementsitems (joinsannotations,docs, andcomments) butkeepsthe originalbodyor initializer (CodeField.getInitializer()orCodeBlockInitializer).Mergesthe signature(s) of both elementsitems (joinsannotations,docs, andcomments) butoverridesthe originalbodyor initializer (CodeField.getInitializer()orCodeBlockInitializer). -
Method Summary
Modifier and TypeMethodDescriptionbooleanisMerge()static CodeMergeStrategyReturns the enum constant of this class with the specified name.static CodeMergeStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OVERRIDE
-
KEEP
-
MERGE_OVERRIDE_BODY
Mergesthe signature(s) of both elementsitems (joinsannotations,docs, andcomments) butoverridesthe originalbodyor initializer (CodeField.getInitializer()orCodeBlockInitializer). -
MERGE_KEEP_BODY
Mergesthe signature(s) of both elementsitems (joinsannotations,docs, andcomments) butkeepsthe originalbodyor initializer (CodeField.getInitializer()orCodeBlockInitializer).
-
-
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
-
isMerge
public boolean isMerge()- Returns:
trueifMERGE_OVERRIDE_BODYorMERGE_KEEP_BODY,falseotherwise. Please note that amergewill only behave different betweenMERGE_OVERRIDE_BODYandMERGE_KEEP_BODYforitemsthat do have abody(in other wordsCodeFunctions) or initializer (in other words (CodeFields or (CodeTypes).
-