Package com.networknt.codegen
Class YAMLFileParameterizer
java.lang.Object
com.networknt.codegen.YAMLFileParameterizer
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildFileExcludeSet(String sourceDir, Collection<String> excludes) buildFileExcludeSet(String sourceDir, Map<String, Object> generateEnvVars) buildResourceExcludeSet(String resourceLocation, Collection<String> excludes) buildResourceExcludeSet(String resourceLocation, Map<String, Object> generateEnvVars) protected static voidprotected static voidprotected static voidcopyResource(String resourceLocation, String destFilename) static voidcopyResources(String resourceLocation, String destDir) protected static booleanexcludeFile(File dir, String name, Set<String> excludeSet) protected static booleanexcludeFile(File f, Set<String> excludeSet) protected static booleanexcludeResource(String resourceLocation, String name, Set<String> excludeSet) protected static booleanfromClasspath(String location) static Stringprotected static InputStreamgetResourceAsStream(String resource) protected static URLgetResourceURL(String resource) protected static booleanlistClasspathDir(String dir) protected static org.yaml.snakeyaml.nodes.Nodeprotected static org.yaml.snakeyaml.nodes.NodeloadResource(String resourceLocation) protected static StringnormalizeFilename(String filename) parameterize(String filename, List<String> srclines, org.yaml.snakeyaml.nodes.MappingNode node, Map<String, Object> generateEnvVars) protected static voidparameterize(String filename, org.yaml.snakeyaml.nodes.Node document, List<String> srclines, File destFile, Map<String, Object> generateEnvVars) readResource(String resourceLocation) protected static StringresolveLocation(String location) static voidstatic voidrewriteAll(String dir, Map<String, Object> generateEnvVars) In place rewriting.static voidstatic voidstatic voidrewriteResource(String filename, String resourceLocation, String destFilename, Map<String, Object> generateEnvVars) static voidprotected static StringstripExtension(String str) static StringtoNonNullString(URL url)
-
Field Details
-
GENERATE_ENV_VARS
- See Also:
-
CLASS_PATH_PREFIX
- See Also:
-
DEFAULT_RESOURCE_LOCATION
- See Also:
-
DEFAULT_DEST_DIR
- See Also:
-
KEY_GENERATE
- See Also:
-
KEY_SKIP_ARRAY
- See Also:
-
KEY_SKIP_MAP
- See Also:
-
KEY_IN_PLACE
- See Also:
-
KEY_EXCLUDE
- See Also:
-
-
Constructor Details
-
YAMLFileParameterizer
public YAMLFileParameterizer()
-
-
Method Details
-
rewriteAll
In place rewriting.- Parameters:
dir- - file dirgenerateEnvVars- - config
-
rewriteAll
-
rewriteFiles
-
rewriteResources
-
copyResources
-
rewriteResource
-
rewriteFile
-
fromClasspath
-
resolveLocation
-
getValue
-
copyResource
-
copyFile
-
getResourceURL
-
getResourceAsStream
-
listClasspathDir
-
loadResource
-
readResource
-
loadFile
-
readFile
-
parameterize
-
parameterize
-
copy
-
stripExtension
-
buildFileExcludeSet
-
buildFileExcludeSet
-
buildResourceExcludeSet
-
buildResourceExcludeSet
protected static Set<String> buildResourceExcludeSet(String resourceLocation, Collection<String> excludes) -
normalizeFilename
-
toNonNullString
-
getAbsolutePath
-
excludeFile
-
excludeFile
-
excludeResource
-