17 public class SourceFactory implements Constants { 18 19 private SourceFactory() { 20 21 } 22 23 /* 24 * com.greetings module 25 */ 26 27 public static Source get_com_greetings_module() throws IOException { 28 return get_com_greetings_module(Collections.emptyMap(), 29 Collections.emptyMap(), null); 30 } 31 32 /* 33 * com.greetings module 34 */ 35 36 public static Source get_com_greetings_module( 37 Map<String, String> classNameToTemplateMap, 38 String mainClassfullyQualifiedName, 39 Map<String, Map<String, String>> classNameToReplacementsInSrcMap) 40 throws IOException { 41 String mainClassfullyQualifiedNameInternal = COM_GREETINGS_APP1_QUALIFIED_CLASS_NAME; 42 43 if (mainClassfullyQualifiedName != null) { 44 mainClassfullyQualifiedNameInternal = mainClassfullyQualifiedName; 45 } 46 47 Map<String, Map<String, String>> classNameToReplacementsInSrcMapInternal = new HashMap<String, Map<String, String>>(); 48 int count = 1; 49 for (String className : classNameToReplacementsInSrcMap.keySet()) { 50 Map<String, String> commonReplacementsForEachClass = new HashMap<String, String>(); 51 commonReplacementsForEachClass.put(PRINTLN_STATEMENT, 52 SYSTEM_OUT_PRINTLN); 53 commonReplacementsForEachClass.put(PASS_STRING_REPLACEMENT_STATEMENT, 54 "PASS_"+count++); 55 commonReplacementsForEachClass.put(PACKAGE_NAME_STATEMENT, 56 COM_GREETINGS_MODULE_CUM_PACKAGE_NAME); 57 commonReplacementsForEachClass.put(PREFIX, OPTION_PREFIX); 58 commonReplacementsForEachClass.put(APP_NAME_REPLACEMENT_STATEMENT, className); 59 classNameToReplacementsInSrcMapInternal.put(className, commonReplacementsForEachClass); 60 } 61 62 Map<String, String> moduleInfoReplacements = new HashMap<>(); 63 moduleInfoReplacements.put(DEPENDENT_MODULE, ""); 64 moduleInfoReplacements.put(PACKAGE_NAME_STATEMENT, COM_GREETINGS_MODULE_CUM_PACKAGE_NAME); 65 classNameToReplacementsInSrcMapInternal.put(MODULE_INFO_DOT_JAVA, moduleInfoReplacements); 66 67 return new Source(COM_GREETINGS_MODULE_CUM_PACKAGE_NAME, 68 COM_GREETINGS_MODULE_INFO_TEMPLATE, 69 classNameToTemplateMap, 70 mainClassfullyQualifiedNameInternal, 71 classNameToReplacementsInSrcMapInternal, COM_GREETINGS_JAR_NAME); 72 } 73 74 /* 75 * com.greetings module 76 */ 77 78 public static Source get_com_greetings_module( 79 Map<String, String> classnameToTemplateMap, 80 Map<String, String> replacementsInSourceCode, String mainClassName) 81 throws IOException { 82 83 String mainClassInternal = COM_GREETINGS_APP1_QUALIFIED_CLASS_NAME; 84 85 if (mainClassName != null) { 86 mainClassInternal = mainClassName; 87 } 88 89 Map<String, String> classNameToTemplateMapInternal = new HashMap<String, String>(); 90 classNameToTemplateMapInternal.put(mainClassInternal,FXAPP_JAVA_TEMPLATE); 91 classNameToTemplateMapInternal.putAll(classnameToTemplateMap); 92 93 Map<String, String> replacementsInSourceCodeInternal = new HashMap<String, String>(); 94 replacementsInSourceCodeInternal.put(PRINTLN_STATEMENT, 95 SYSTEM_OUT_PRINTLN); 96 replacementsInSourceCodeInternal.put(APP_NAME_REPLACEMENT_STATEMENT, 97 APP1_NAME); 98 replacementsInSourceCodeInternal.put(PASS_STRING_REPLACEMENT_STATEMENT, 99 PASS_1); 100 replacementsInSourceCodeInternal.put(PACKAGE_NAME_STATEMENT, 101 COM_GREETINGS_MODULE_CUM_PACKAGE_NAME); 102 replacementsInSourceCodeInternal.put(DEPENDENT_MODULE, ""); 103 replacementsInSourceCodeInternal.put(PREFIX, OPTION_PREFIX); 104 105 replacementsInSourceCodeInternal.putAll(replacementsInSourceCode); 106 107 return new Source(COM_GREETINGS_MODULE_CUM_PACKAGE_NAME, 108 COM_GREETINGS_MODULE_INFO_TEMPLATE, 109 classNameToTemplateMapInternal, mainClassInternal, 110 COM_GREETINGS_JAR_NAME, replacementsInSourceCodeInternal, true); 111 } 112 113 /* 114 * com.greetings module 115 */ 116 117 public static Source get_com_greetings_module( 118 Map<String, String> classNameToTemplateMap, 119 Map<String, String> replacementsInSourceCode) throws IOException { 120 return get_com_greetings_module(classNameToTemplateMap, 121 replacementsInSourceCode, null); 122 } 123 124 /* 125 * @return TempSource com.greetings module depends on custom.util 126 * com.greetings ---> custom.util 127 */ 128 public static Source get_com_greetings_module_depends_on_custom_util_module() 129 throws IOException { 130 Map<String, String> replacementsInSourceCode = new HashMap<>(); 131 replacementsInSourceCode.put(DEPENDENT_MODULE, "requires custom.util;"); 132 replacementsInSourceCode.put(PRINTLN_STATEMENT, 133 CUSTOM_UTIL_PRINTLN_STATEMENT); 134 135 return SourceFactory.get_com_greetings_module(Collections.emptyMap(), 136 replacementsInSourceCode); 137 } 138 139 /* 140 * custom.util module 141 */ 142 public static Source get_custom_util_module() throws IOException { 143 Map<String, String> classNameToTemplateMap = new HashMap<String, String>(); 144 classNameToTemplateMap.put(CUSTOM_UTIL_CLASS_NAME,CUSTOM_UTIL_JAVA_TEMPLATE); 145 146 Map<String, String> replacementsInSourceCode = new HashMap<String, String>(); 147 replacementsInSourceCode.put(PRINTLN_STATEMENT, 148 CUSTOM_UTIL_PRINTLN_STATEMENT); 149 replacementsInSourceCode.put(APP_NAME_REPLACEMENT_STATEMENT, APP1_NAME); 150 replacementsInSourceCode.put(PASS_STRING_REPLACEMENT_STATEMENT, PASS_1); 151 replacementsInSourceCode.put(PACKAGE_NAME_STATEMENT, 152 CUSTOM_UTIL_PACKAGE_STATEMENT); 153 replacementsInSourceCode.put(CLASS_NAME_STATEMENT, 154 CUSTOM_UTIL_CLASS_SIMPLE_NAME); 155 156 return new Source(CUSTOM_UTIL_MODULE_NAME, 157 CUSTOM_UTIL_MODULE_TEMPLATE_FILE_NAME, classNameToTemplateMap, 158 CUSTOM_UTIL_CLASS_FULLY_QUALIFIED_NAME, CUSTOM_UTIL_MODULE_NAME, 159 replacementsInSourceCode); 160 } 161 162 /* 163 * com.shape.serviceinterface module 164 */ 165 public static Source get_com_shape_serviceinterface_module( 166 Map<String, String> templateToClassNameMap, 167 Map<String, String> replacementsInSourceCode, 168 String mainClassFullName) throws IOException { 169 170 String mainClassFullNameInternal = COM_SHAPE_SERVICEINTERFACE_SHAPE_CLASS_NAME; 171 if (mainClassFullName != null) { 172 mainClassFullNameInternal = mainClassFullName; 173 } 174 Map<String, String> classNameToTemplateMapInternal = new HashMap<String, String>(); 175 classNameToTemplateMapInternal.put(COM_SHAPE_SERVICEINTERFACE_SHAPE_CLASS_NAME, 176 COM_SHAPE_SERVICEINTERFACE_SHAPE_TEMPLATE 177 ); 178 classNameToTemplateMapInternal.putAll(templateToClassNameMap); 179 180 return new Source(COM_SHAPE_SERVICEINTERFACE_MODULE_NAME, 181 COM_SHAPE_SERVICEINTERFACE_MODULE_INFO_TEMPLATE, 182 classNameToTemplateMapInternal, mainClassFullNameInternal, 183 COM_SHAPE_SERVICEINTERFACE_MODULE_NAME, Collections.emptyMap(), 184 true); 185 } 186 187 /* 188 * com.shape.serviceinterface module Main Module 189 */ 190 public static Source get_com_shape_serviceinterface_module() 191 throws IOException { 192 String mainClassFullNameInternal = COM_SHAPE_SERVICEINTERFACE_SHAPE_CLASS_NAME; 193 Map<String, String> classNameToTemplateMapInternal = new HashMap<String, String>(); 194 classNameToTemplateMapInternal.put(COM_SHAPE_SERVICEINTERFACE_SHAPE_CLASS_NAME, 195 COM_SHAPE_SERVICEINTERFACE_SHAPE_TEMPLATE 196 ); 197 198 return new Source(COM_SHAPE_SERVICEINTERFACE_MODULE_NAME, 199 COM_SHAPE_SERVICEINTERFACE_MODULE_INFO_TEMPLATE, 200 classNameToTemplateMapInternal, mainClassFullNameInternal, 201 COM_SHAPE_SERVICEINTERFACE_MODULE_NAME, Collections.emptyMap(), 202 true); 203 } 204 205 /* 206 * com.shape.serviceprovider.circle module 207 */ 208 209 public static Source get_com_shape_serviceprovider_circle_module() 210 throws IOException { 211 Map<String, String> classNameToTemplateMapInternal = new HashMap<String, String>(); 212 classNameToTemplateMapInternal.put(COM_SHAPE_SERVICEPROVIDER_CIRCLE_CLASSNAME, 213 COM_SHAPE_SERVICEPROVIDER_CIRCLE_TEMPLATE 214 ); 215 216 return new Source(COM_SHAPE_SERVICEPROVIDER_CIRCLE_MODULENAME, 217 COM_SHAPE_SERVICEPROVIDER_CIRCLE_MODULE_INFO_TEMPLATE, 218 classNameToTemplateMapInternal, 219 COM_SHAPE_SERVICEPROVIDER_CIRCLE_CLASSNAME, 220 COM_SHAPE_SERVICEPROVIDER_CIRCLE_MODULENAME, 221 Collections.emptyMap()); 222 } 223 224 /* 225 * com.shape.serviceprovider.rectangle module 226 */ 227 228 public static Source get_com_shape_serviceprovider_rectangle_module() 229 throws IOException { 230 Map<String, String> classNameToTemplateMapInternal = new HashMap<String, String>(); 231 classNameToTemplateMapInternal.put(COM_SHAPE_SERVICEPROVIDER_RECTANGLE_CLASS_NAME, 232 COM_SHAPE_SERVICEPROVIDER_RECTANGLE_TEMPLATE 233 ); 234 235 return new Source(COM_SHAPE_SERVICEPROVIDER_RECTANGLE_MODULE_NAME, 236 COM_SHAPE_SERVICEPROVIDER_RECTANGLE_MODULE_INFO_TEMPLATE, 237 classNameToTemplateMapInternal, 238 COM_SHAPE_SERVICEPROVIDER_RECTANGLE_CLASS_NAME, 239 COM_SHAPE_SERVICEPROVIDER_RECTANGLE_MODULE_NAME, 240 Collections.emptyMap()); 241 } 242 243 /* 244 * com.shape.test module 245 */ 246 247 public static Source get_com_shape_test_module() throws IOException { 248 Map<String, String> classNameToTemplateMapInternal = new HashMap<String, String>(); 249 classNameToTemplateMapInternal.put(COM_SHAPE_TEST_LIMITMODSMAINCLASS, 250 COM_SHAPE_TEST_LIMITMODSMAINCLASS_TEMPLATE 251 ); 252 253 return new Source(COM_SHAPE_TEST_MODULE_NAME, 254 COM_SHAPE_TEST_MODULE_INFO_TEMPLATE, 255 classNameToTemplateMapInternal, 256 COM_SHAPE_TEST_LIMITMODSMAINCLASS, COM_SHAPE_TEST_MODULE_NAME, 257 Collections.emptyMap()); 258 } 259 260 /* 261 * unnamed module com.greetings 262 */ 263 public static Source get_com_greetings_app_unnamed_module() 264 throws IOException { 265 return get_com_greetings_app_unnamed_module(Collections.emptyMap()); 266 } 267 268 /* 269 * unnamed module com.greetings 270 */ 271 public static Source get_com_greetings_app_unnamed_module( 272 Map<String, String> replacementsInSourceCode) throws IOException { 273 274 return get_com_greetings_app_unnamed_module( 275 COM_GREETINGS_APP1_QUALIFIED_CLASS_NAME, 276 replacementsInSourceCode); 277 } 278 279 /* 280 * unnamed module com.greetings 281 */ 282 public static Source get_com_greetings_app_unnamed_module(String fullName, 283 Map<String, String> replacementsInSourceCode) throws IOException { 284 285 Map<String, String> replacementsInSourceCodeInternal = new HashMap<String, String>(); 286 replacementsInSourceCodeInternal.put(PRINTLN_STATEMENT, 287 SYSTEM_OUT_PRINTLN); 288 replacementsInSourceCodeInternal.put(APP_NAME_REPLACEMENT_STATEMENT, 289 APP1_NAME); 290 replacementsInSourceCodeInternal.put(PASS_STRING_REPLACEMENT_STATEMENT, 291 PASS_1); 292 replacementsInSourceCodeInternal.put(PACKAGE_NAME_STATEMENT, 293 COM_GREETINGS_MODULE_CUM_PACKAGE_NAME); 294 replacementsInSourceCodeInternal.put(PREFIX, OPTION_PREFIX); 295 replacementsInSourceCodeInternal.putAll(replacementsInSourceCode); 296 297 return new Source(fullName, FXAPP_JAVA_TEMPLATE, 298 COM_GREETINGS_MODULE_CUM_PACKAGE_NAME, 299 replacementsInSourceCodeInternal); 300 301 } 302 303 /* 304 * testapp.util.Util unnamed module 305 */ 306 public static Source get_test_app_util_unnamed_module() throws IOException { 307 Map<String, String> replacementsInSourceCode = new HashMap<String, String>(); 308 replacementsInSourceCode.put(PRINTLN_STATEMENT, 309 CUSTOM_UTIL_PRINTLN_STATEMENT); 310 replacementsInSourceCode.put(PACKAGE_NAME_STATEMENT, 311 CUSTOM_UTIL_UNNAMED_MODULE_PACKAGE_STATEMENT); 312 replacementsInSourceCode.put(CLASS_NAME_STATEMENT, 313 CUSTOM_UTIL_CLASS_SIMPLE_NAME); 314 | 17 public class SourceFactory implements Constants { 18 19 private SourceFactory() { 20 21 } 22 23 /* 24 * com.greetings module 25 */ 26 27 public static Source get_com_greetings_module() throws IOException { 28 return get_com_greetings_module(Collections.emptyMap(), 29 Collections.emptyMap(), null); 30 } 31 32 /* 33 * com.greetings module 34 */ 35 36 public static Source get_com_greetings_module( 37 Map<String, String> templateToClassnameMap, 38 Map<String, String> replacementsInSourceCode, String mainClassName) 39 throws IOException { 40 41 String mainClassInternal = COM_GREETINGS_APP1_QUALIFIED_CLASS_NAME; 42 43 if (mainClassName != null) { 44 mainClassInternal = mainClassName; 45 } 46 47 Map<String, String> templateToClassNameMapInternal = new HashMap<String, String>(); 48 templateToClassNameMapInternal.put(FXAPP_JAVA_TEMPLATE, 49 mainClassInternal); 50 templateToClassNameMapInternal.putAll(templateToClassnameMap); 51 52 Map<String, String> replacementsInSourceCodeInternal = new HashMap<String, String>(); 53 replacementsInSourceCodeInternal.put(PRINTLN_STATEMENT, 54 SYSTEM_OUT_PRINTLN); 55 replacementsInSourceCodeInternal.put(APP_NAME_REPLACEMENT_STATEMENT, 56 APP1_NAME); 57 replacementsInSourceCodeInternal.put(PASS_STRING_REPLACEMENT_STATEMENT, 58 PASS_1); 59 replacementsInSourceCodeInternal.put(PACKAGE_NAME_STATEMENT, 60 COM_GREETINGS_MODULE_CUM_PACKAGE_NAME); 61 replacementsInSourceCodeInternal.put(DEPENDENT_MODULE, ""); 62 63 replacementsInSourceCodeInternal.putAll(replacementsInSourceCode); 64 65 return new Source(COM_GREETINGS_MODULE_CUM_PACKAGE_NAME, 66 COM_GREETINGS_MODULE_INFO_TEMPLATE, 67 templateToClassNameMapInternal, mainClassInternal, 68 COM_GREETINGS_JAR_NAME, replacementsInSourceCodeInternal, true); 69 } 70 71 /* 72 * com.greetings module 73 */ 74 75 public static Source get_com_greetings_module( 76 Map<String, String> templateToClassnameMap, 77 Map<String, String> replacementsInSourceCode) throws IOException { 78 return get_com_greetings_module(templateToClassnameMap, 79 replacementsInSourceCode, null); 80 } 81 82 /* 83 * @return TempSource com.greetings module depends on custom.util 84 * com.greetings ---> custom.util 85 */ 86 public static Source get_com_greetings_module_depends_on_custom_util_module() 87 throws IOException { 88 Map<String, String> replacementsInSourceCode = new HashMap<>(); 89 replacementsInSourceCode.put(DEPENDENT_MODULE, "requires custom.util;"); 90 replacementsInSourceCode.put(PRINTLN_STATEMENT, 91 CUSTOM_UTIL_PRINTLN_STATEMENT); 92 93 return SourceFactory.get_com_greetings_module(Collections.emptyMap(), 94 replacementsInSourceCode); 95 } 96 97 /* 98 * custom.util module 99 */ 100 public static Source get_custom_util_module() throws IOException { 101 Map<String, String> templateToClassNameMap = new HashMap<String, String>(); 102 templateToClassNameMap.put(CUSTOM_UTIL_JAVA_TEMPLATE, 103 CUSTOM_UTIL_CLASS_NAME); 104 105 Map<String, String> replacementsInSourceCode = new HashMap<String, String>(); 106 replacementsInSourceCode.put(PRINTLN_STATEMENT, 107 CUSTOM_UTIL_PRINTLN_STATEMENT); 108 replacementsInSourceCode.put(APP_NAME_REPLACEMENT_STATEMENT, APP1_NAME); 109 replacementsInSourceCode.put(PASS_STRING_REPLACEMENT_STATEMENT, PASS_1); 110 replacementsInSourceCode.put(PACKAGE_NAME_STATEMENT, 111 CUSTOM_UTIL_PACKAGE_STATEMENT); 112 replacementsInSourceCode.put(CLASS_NAME_STATEMENT, 113 CUSTOM_UTIL_CLASS_SIMPLE_NAME); 114 115 return new Source(CUSTOM_UTIL_MODULE_NAME, 116 CUSTOM_UTIL_MODULE_TEMPLATE_FILE_NAME, templateToClassNameMap, 117 CUSTOM_UTIL_CLASS_FULLY_QUALIFIED_NAME, CUSTOM_UTIL_MODULE_NAME, 118 replacementsInSourceCode); 119 } 120 121 /* 122 * com.shape.serviceinterface module 123 */ 124 public static Source get_com_shape_serviceinterface_module( 125 Map<String, String> templateToClassNameMap, 126 Map<String, String> replacementsInSourceCode, 127 String mainClassFullName) throws IOException { 128 129 String mainClassFullNameInternal = COM_SHAPE_SERVICEINTERFACE_SHAPE_CLASS_NAME; 130 if (mainClassFullName != null) { 131 mainClassFullNameInternal = mainClassFullName; 132 } 133 Map<String, String> templateToClassNameMapInternal = new HashMap<String, String>(); 134 templateToClassNameMapInternal.put( 135 COM_SHAPE_SERVICEINTERFACE_SHAPE_TEMPLATE, 136 COM_SHAPE_SERVICEINTERFACE_SHAPE_CLASS_NAME); 137 templateToClassNameMapInternal.putAll(templateToClassNameMap); 138 139 return new Source(COM_SHAPE_SERVICEINTERFACE_MODULE_NAME, 140 COM_SHAPE_SERVICEINTERFACE_MODULE_INFO_TEMPLATE, 141 templateToClassNameMapInternal, mainClassFullNameInternal, 142 COM_SHAPE_SERVICEINTERFACE_MODULE_NAME, Collections.emptyMap(), 143 true); 144 } 145 146 /* 147 * com.shape.serviceinterface module Main Module 148 */ 149 public static Source get_com_shape_serviceinterface_module() 150 throws IOException { 151 String mainClassFullNameInternal = COM_SHAPE_SERVICEINTERFACE_SHAPE_CLASS_NAME; 152 Map<String, String> templateToClassNameMapInternal = new HashMap<String, String>(); 153 templateToClassNameMapInternal.put( 154 COM_SHAPE_SERVICEINTERFACE_SHAPE_TEMPLATE, 155 COM_SHAPE_SERVICEINTERFACE_SHAPE_CLASS_NAME); 156 157 return new Source(COM_SHAPE_SERVICEINTERFACE_MODULE_NAME, 158 COM_SHAPE_SERVICEINTERFACE_MODULE_INFO_TEMPLATE, 159 templateToClassNameMapInternal, mainClassFullNameInternal, 160 COM_SHAPE_SERVICEINTERFACE_MODULE_NAME, Collections.emptyMap(), 161 true); 162 } 163 164 /* 165 * com.shape.serviceprovider.circle module 166 */ 167 168 public static Source get_com_shape_serviceprovider_circle_module() 169 throws IOException { 170 Map<String, String> templateToClassNameMapInternal = new HashMap<String, String>(); 171 templateToClassNameMapInternal.put( 172 COM_SHAPE_SERVICEPROVIDER_CIRCLE_TEMPLATE, 173 COM_SHAPE_SERVICEPROVIDER_CIRCLE_CLASSNAME); 174 175 return new Source(COM_SHAPE_SERVICEPROVIDER_CIRCLE_MODULENAME, 176 COM_SHAPE_SERVICEPROVIDER_CIRCLE_MODULE_INFO_TEMPLATE, 177 templateToClassNameMapInternal, 178 COM_SHAPE_SERVICEPROVIDER_CIRCLE_CLASSNAME, 179 COM_SHAPE_SERVICEPROVIDER_CIRCLE_MODULENAME, 180 Collections.emptyMap()); 181 } 182 183 /* 184 * com.shape.serviceprovider.rectangle module 185 */ 186 187 public static Source get_com_shape_serviceprovider_rectangle_module() 188 throws IOException { 189 Map<String, String> templateToClassNameMapInternal = new HashMap<String, String>(); 190 templateToClassNameMapInternal.put( 191 COM_SHAPE_SERVICEPROVIDER_RECTANGLE_TEMPLATE, 192 COM_SHAPE_SERVICEPROVIDER_RECTANGLE_CLASS_NAME); 193 194 return new Source(COM_SHAPE_SERVICEPROVIDER_RECTANGLE_MODULE_NAME, 195 COM_SHAPE_SERVICEPROVIDER_RECTANGLE_MODULE_INFO_TEMPLATE, 196 templateToClassNameMapInternal, 197 COM_SHAPE_SERVICEPROVIDER_RECTANGLE_CLASS_NAME, 198 COM_SHAPE_SERVICEPROVIDER_RECTANGLE_MODULE_NAME, 199 Collections.emptyMap()); 200 } 201 202 /* 203 * com.shape.test module 204 */ 205 206 public static Source get_com_shape_test_module() throws IOException { 207 Map<String, String> templateToClassNameMapInternal = new HashMap<String, String>(); 208 templateToClassNameMapInternal.put( 209 COM_SHAPE_TEST_LIMITMODSMAINCLASS_TEMPLATE, 210 COM_SHAPE_TEST_LIMITMODSMAINCLASS); 211 212 return new Source(COM_SHAPE_TEST_MODULE_NAME, 213 COM_SHAPE_TEST_MODULE_INFO_TEMPLATE, 214 templateToClassNameMapInternal, 215 COM_SHAPE_TEST_LIMITMODSMAINCLASS, COM_SHAPE_TEST_MODULE_NAME, 216 Collections.emptyMap()); 217 } 218 219 /* 220 * unnamed module com.greetings 221 */ 222 public static Source get_com_greetings_app_unnamed_module() 223 throws IOException { 224 return get_com_greetings_app_unnamed_module(Collections.emptyMap()); 225 } 226 227 /* 228 * unnamed module com.greetings 229 */ 230 public static Source get_com_greetings_app_unnamed_module( 231 Map<String, String> replacementsInSourceCode) throws IOException { 232 233 return get_com_greetings_app_unnamed_module( 234 COM_GREETINGS_APP1_QUALIFIED_CLASS_NAME, 235 replacementsInSourceCode); 236 } 237 238 /* 239 * unnamed module com.greetings 240 */ 241 public static Source get_com_greetings_app_unnamed_module(String fullName, 242 Map<String, String> replacementsInSourceCode) throws IOException { 243 244 Map<String, String> replacementsInSourceCodeInternal = new HashMap<String, String>(); 245 replacementsInSourceCodeInternal.put(PRINTLN_STATEMENT, 246 SYSTEM_OUT_PRINTLN); 247 replacementsInSourceCodeInternal.put(APP_NAME_REPLACEMENT_STATEMENT, 248 APP1_NAME); 249 replacementsInSourceCodeInternal.put(PASS_STRING_REPLACEMENT_STATEMENT, 250 PASS_1); 251 replacementsInSourceCodeInternal.put(PACKAGE_NAME_STATEMENT, 252 COM_GREETINGS_MODULE_CUM_PACKAGE_NAME); 253 replacementsInSourceCodeInternal.putAll(replacementsInSourceCode); 254 255 return new Source(fullName, FXAPP_JAVA_TEMPLATE, 256 COM_GREETINGS_MODULE_CUM_PACKAGE_NAME, 257 replacementsInSourceCodeInternal); 258 259 } 260 261 /* 262 * testapp.util.Util unnamed module 263 */ 264 public static Source get_test_app_util_unnamed_module() throws IOException { 265 Map<String, String> replacementsInSourceCode = new HashMap<String, String>(); 266 replacementsInSourceCode.put(PRINTLN_STATEMENT, 267 CUSTOM_UTIL_PRINTLN_STATEMENT); 268 replacementsInSourceCode.put(PACKAGE_NAME_STATEMENT, 269 CUSTOM_UTIL_UNNAMED_MODULE_PACKAGE_STATEMENT); 270 replacementsInSourceCode.put(CLASS_NAME_STATEMENT, 271 CUSTOM_UTIL_CLASS_SIMPLE_NAME); 272 |