Class Placeholders<T,P extends Placeholders<T,P>>
java.lang.Object
net.dzikoysk.funnyguilds.feature.placeholders.Placeholders<T,P>
- Direct Known Subclasses:
BasicPlaceholders,GuildPlaceholders,OffsetDateTimePlaceholders,UserPlaceholders
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Pcreate()Format text with raw placeholdersformatCustom(@Nullable Object entity, String text, T data, String prefix, String suffix, Function<String, String> nameModifier) Format text with custom format placeholdersformatCustom(String text, T data, String prefix, String suffix, Function<String, String> nameModifier) formatVariables(@Nullable Object entity, String text, T data) Format text with variable format placeholders (e.g.formatVariables(String text, T data) property(String name, Placeholder<T> placeholder) property(String name, LocaleMonoResolver<T> resolver) property(String name, MonoResolver<T> resolver) property(String name, SimpleResolver resolver) property(Map<String, Placeholder<T>> placeholders) toCustomFormatter(@Nullable Object entity, T data, String prefix, String suffix, Function<String, String> nameModifier) toFormatter(@Nullable Object entity, T data) toFormatter(T data) toVariablesFormatter(@Nullable Object entity, T data) toVariablesFormatter(T data)
-
Field Details
-
placeholders
-
-
Constructor Details
-
Placeholders
public Placeholders()
-
-
Method Details
-
create
-
property
-
property
-
property
-
property
-
property
-
property
-
format
Format text with raw placeholders- Parameters:
text- text to formatdata- data to use to formatting- Returns:
- formatted text
-
format
-
toFormatter
-
toFormatter
-
formatVariables
Format text with variable format placeholders (e.g. {NAME})- Parameters:
text- text to formatdata- data to use to formatting- Returns:
- formatted text
-
formatVariables
-
toVariablesFormatter
-
toVariablesFormatter
-
formatCustom
public String formatCustom(@Nullable @Nullable Object entity, String text, T data, String prefix, String suffix, Function<String, String> nameModifier) Format text with custom format placeholders- Parameters:
text- text to formatdata- data to use to formattingprefix- prefix to use before placeholders (for eg. "{")suffix- suffix to use after placeholders (for eg. "}")nameModifier- function to modify placeholder name (for eg. upper case)- Returns:
- formatted text
-
formatCustom
-
toCustomFormatter
-
toCustomFormatter
-