Class Placeholders
java.lang.Object
pro.verron.officestamper.experimental.Placeholders
The Expressions class provides utility methods for finding variables and processors in a given text.
It contains multiple constant variables for different types of expressions, such as VAR_MATCHER for variable
expressions and PROC_MATCHER for processor expressions.
The findVariables() method uses VAR_FINDER to find variable expressions in a given text and returns a list of found
expressions.
The findProcessors() method uses PROC_FINDER to find processor expressions in a given text and returns a list of
found expressions.
The raw() method creates a new Expression object using the RAW_MATCHER and a specified text.
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<Placeholder> findProcessors(String text) Finds processors expressions in a given text.static List<Placeholder> findVariables(String text) Finds variable expressions in a given text.static List<Placeholder> findVariables(Paragraph paragraph) Finds variable expressions in a given paragraph.static PlaceholderCreates a new raw placeholder with the given text.
-
Method Details
-
findVariables
Finds variable expressions in a given paragraph.- Parameters:
paragraph- the paragraph in which to search for variable expressions- Returns:
- a list of found variable expressions as
Placeholderobjects
-
findVariables
Finds variable expressions in a given text.- Parameters:
text- the text to search for variable expressions- Returns:
- a list of found variable expressions as
StandardPlaceholderobjects
-
findProcessors
Finds processors expressions in a given text.- Parameters:
text- the text to search for processor expressions- Returns:
- a list of found processor expressions as
StandardPlaceholderobjects
-
raw
Creates a new raw placeholder with the given text.- Parameters:
text- the text to be used as the content of the placeholder- Returns:
- a new raw placeholder
-