Class Placeholder


  • public class Placeholder
    extends Object
    A placeholder.
    • Method Detail

      • parse

        public static Placeholder.Builder parse​(String placeholderString)
        Parse a placeholder from a placeholder string.

        Placeholders consist of a reference part and a part that contains switches that control how the placeholder is treated. This parser takes the string representation and parses it into placeholder information.

        This method returns a builder for a placeholder, because a complete placeholder has additional attributes that come from outside of the parsed text.

        Parameters:
        placeholderString - string representation of the placeholder
        Returns:
        placeholder builder, pre-initialized with the results of parsing
      • getReference

        public String getReference()
        Get the reference that points to the parameter that is used to replace this placeholder.
        Returns:
        reference to parameter
      • getQuoting

        public Quoting getQuoting()
        Get the quoting style used when replacing this placeholder.
        Returns:
        quoting style
      • getStartIndex

        public int getStartIndex()
        Get the index at which the placeholder starts in the text it is embedded in.
        Returns:
        placeholder start index in the text.
      • getEndIndex

        public int getEndIndex()
        Get the index at which the placeholder ends in the text it is embedded in.
        Returns:
        placeholder end index in the text.