Class ClassTemplatePrepare

java.lang.Object
ru.objectsfill.annotation_processor.utils.ClassTemplatePrepare

public class ClassTemplatePrepare extends Object
Utility class for preparing class templates.
  • Method Details

    • fillImportContainer

      public static void fillImportContainer(StringBuilder sb, String containerClassPath)
      Appends an import statement for the specified container class path to the StringBuilder.
      Parameters:
      sb - the StringBuilder to append the import statement to
      containerClassPath - 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 container
      containerClass - the container class to putIfAbsent
      containerClassName - the name of the container class
    • getReadyClass

      public static String getReadyClass(Map<String,String> classTemplateReplace)
      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