Class ClassTemplatePrepare
java.lang.Object
ru.objectsfill.annotation_processor.utils.ClassTemplatePrepare
Utility class for preparing class templates.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidfillContainer(StringBuilder sb, String containerClass, String containerClassName) Fills the container StringBuilder with the putIfAbsent statement for the specified container class and container class name.static voidfillImportContainer(StringBuilder sb, String containerClassPath) Appends an import statement for the specified container class path to the StringBuilder.static StringgetReadyClass(Map<String, String> classTemplateReplace) Gets the ready class by replacing placeholders in the class template with the provided values.
-
Method Details
-
fillImportContainer
Appends an import statement for the specified container class path to the StringBuilder.- Parameters:
sb- the StringBuilder to append the import statement tocontainerClassPath- the fully qualified path of the container class to import
-
fillContainer
public static void fillContainer(StringBuilder sb, String containerClass, String containerClassName) Fills the container StringBuilder with the putIfAbsent statement for the specified container class and container class name.- Parameters:
sb- the StringBuilder representing the containercontainerClass- the container class to putIfAbsentcontainerClassName- the name of the container class
-
getReadyClass
Gets the ready class by replacing placeholders in the class template with the provided values.- Parameters:
classTemplateReplace- the map containing placeholders and their corresponding replacement values- Returns:
- the resulting ready class
-