Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Map<String, Object> createParameterMap(@NotNull Map<String, Object> args) {
- // Create the data model.
- final Map<String, Object> paramMap = new HashMap<>();
- // Builtin conversion methods
- paramMap.put("activityToLayout", new FmActivityToLayoutMethod());
- paramMap.put("camelCaseToUnderscore", new FmCamelCaseToUnderscoreMethod());
- paramMap.put("classToResource", new FmClassNameToResourceMethod());
- paramMap.put("compareVersions", new FmCompareVersionsMethod());
- paramMap.put("compareVersionsIgnoringQualifiers", new FmCompareVersionsIgnoringQualifiersMethod());
- paramMap.put("escapePropertyValue", new FmEscapePropertyValueMethod());
- paramMap.put("escapeXmlAttribute", new FmEscapeXmlAttributeMethod());
- paramMap.put("escapeXmlString", new FmEscapeXmlStringMethod());
- paramMap.put("escapeXmlText", new FmEscapeXmlStringMethod());
- paramMap.put("extractLetters", new FmExtractLettersMethod());
- paramMap.put("getAppManifestDir", new FmGetAppManifestDirMethod(paramMap));
- paramMap.put("getApplicationTheme", new FmGetApplicationThemeMethod(paramMap));
- paramMap.put("isAndroidxEnabled", new FmIsAndroidxEnabledMethod(paramMap));
- paramMap.put("getConfigurationName", new FmGetConfigurationNameMethod(paramMap));
- paramMap.put("getMaterialComponentName", new FmGetMaterialComponentNameMethod());
- paramMap.put("hasDependency", new FmHasDependencyMethod(paramMap));
- paramMap.put("isGradleComponentPluginUsed", new FmIsGradleComponentPluginUsed(paramMap));
- paramMap.put("layoutToActivity", new FmLayoutToActivityMethod());
- paramMap.put("slashedPackageName", new FmSlashedPackageNameMethod());
- paramMap.put("truncate", new FmTruncateStringMethod());
- paramMap.put("underscoreToCamelCase", new FmUnderscoreToCamelCaseMethod());
- paramMap.put("escapeKotlinIdentifiers", new FmEscapeKotlinIdentifierMethod());
- // Dependencies multimap. Doesn't store duplicates, preserves insertion order.
- paramMap.put(TemplateMetadata.ATTR_DEPENDENCIES_MULTIMAP, LinkedHashMultimap.create());
- // Parameters supplied by user
- paramMap.putAll(args);
- return paramMap;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement