public final class FreemarkerUtil extends Object
Modifier and Type | Method and Description |
---|---|
static Map<String,Object> |
getDataModelForInteractiveSelector(String packageRoot,
String interfaceName,
String className)
getDataModelForInteractiveSelector.
|
static Map<String,Object> |
getDataModelForSelector(NestedSelector selector,
SpecPojo spec,
String packageName,
String interactiveClassName,
String interactiveInterfaceName)
getDataModelForSelector.
|
static Map<String,Object> |
getDataModelForSpec(SpecPojo spec,
String packagePrefixSpecs)
getDataModelForSpec.
|
static Map<String,Object> |
getDataModelForWebElement(NestedSelector selector,
SpecPojo spec,
String packageName,
String interactiveClassName,
String interactiveInterfaceName)
getDataModelForWebElement.
|
static File |
getOutputFile(File outputDir,
String outputPackage,
String outputClassName)
getOutputFile.
|
static freemarker.template.Template |
getTemplate(File directory,
String name)
getTemplate.
|
static void |
process(freemarker.template.Template template,
Map<String,Object> dataModel,
File outputFile)
Actually process template to generate code.
|
public static Map<String,Object> getDataModelForInteractiveSelector(String packageRoot, String interfaceName, String className)
getDataModelForInteractiveSelector.
packageRoot
- package for interactive selector interfaceinterfaceName
- name of interactive selector interface to implementclassName
- of interactive selector classpublic static Map<String,Object> getDataModelForSelector(NestedSelector selector, SpecPojo spec, String packageName, String interactiveClassName, String interactiveInterfaceName)
getDataModelForSelector.
selector
- selector to build data model forspec
- selector is taken frompackageName
- package of interactive selector interfaceinteractiveClassName
- name of classinteractiveInterfaceName
- name of interactive selector interfacepublic static Map<String,Object> getDataModelForSpec(SpecPojo spec, String packagePrefixSpecs)
getDataModelForSpec.
spec
- to generate Java class forpackagePrefixSpecs
- root packagepublic static Map<String,Object> getDataModelForWebElement(NestedSelector selector, SpecPojo spec, String packageName, String interactiveClassName, String interactiveInterfaceName)
getDataModelForWebElement.
selector
- selector to build data model forspec
- selector is taken frompackageName
- package of interactive selector interfaceinteractiveClassName
- name of interactive selector implementationinteractiveInterfaceName
- name of interactive selector interfacepublic static File getOutputFile(File outputDir, String outputPackage, String outputClassName)
getOutputFile.
outputDir
- directoryoutputPackage
- packageoutputClassName
- class namepublic static freemarker.template.Template getTemplate(File directory, String name)
getTemplate.
directory
- template root foldername
- name of templateCopyright © 2017–2022 wcm.io QA. All rights reserved.