Enum CommentPlaceholderRegistry
java.lang.Object
java.lang.Enum<CommentPlaceholderRegistry>
com.mrivanplays.annotationconfig.core.resolver.CommentPlaceholderRegistry
- All Implemented Interfaces:
Serializable
,Comparable<CommentPlaceholderRegistry>
,java.lang.constant.Constable
Represents a registry for placeholders for
comments
content. These are
applied before the comments are pushed to the ValueWriter
.- Since:
- 3.0.1
- Author:
- MrIvanPlays
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplyPlaceholders
(List<String> comments) Returns a mutableLinkedList
copy of the inputtedcomments
with all the registered placeholders applied.void
registerPlaceholder
(String toReplace, String replacement) Register a placeholder.static CommentPlaceholderRegistry
Returns the enum constant of this type with the specified name.static CommentPlaceholderRegistry[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
registerPlaceholder
Register a placeholder.- Parameters:
toReplace
- value to replacereplacement
- replacement value
-
applyPlaceholders
Returns a mutableLinkedList
copy of the inputtedcomments
with all the registered placeholders applied.- Parameters:
comments
- comments to apply placeholders to- Returns:
- comments with applied placeholders
-