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
  • Enum Constant Details

  • 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 name
      NullPointerException - if the argument is null
    • registerPlaceholder

      public void registerPlaceholder(String toReplace, String replacement)
      Register a placeholder.
      Parameters:
      toReplace - value to replace
      replacement - replacement value
    • applyPlaceholders

      public List<String> applyPlaceholders(List<String> comments)
      Returns a mutable LinkedList copy of the inputted comments with all the registered placeholders applied.
      Parameters:
      comments - comments to apply placeholders to
      Returns:
      comments with applied placeholders