Class VarExpansion<Param>

    • Field Detail

      • VAR_PROJECT_SOURCE_LANG

        public static final java.lang.String VAR_PROJECT_SOURCE_LANG
        See Also:
        Constant Field Values
      • VAR_PROJECT_SOURCE_LANG_CODE

        public static final java.lang.String VAR_PROJECT_SOURCE_LANG_CODE
        See Also:
        Constant Field Values
      • VAR_PROJECT_TARGET_LANG

        public static final java.lang.String VAR_PROJECT_TARGET_LANG
        See Also:
        Constant Field Values
      • VAR_PROJECT_TARGET_LANG_CODE

        public static final java.lang.String VAR_PROJECT_TARGET_LANG_CODE
        See Also:
        Constant Field Values
      • VAR_FILE_NAME_ONLY

        public static final java.lang.String VAR_FILE_NAME_ONLY
        See Also:
        Constant Field Values
      • VAR_FILE_EXTENSION

        public static final java.lang.String VAR_FILE_EXTENSION
        See Also:
        Constant Field Values
      • VAR_FILE_SHORT_PATH

        public static final java.lang.String VAR_FILE_SHORT_PATH
        See Also:
        Constant Field Values
      • PATTERN_BUNDLE_ENTRY

        public static final java.util.regex.Pattern PATTERN_BUNDLE_ENTRY
    • Constructor Detail

      • VarExpansion

        public VarExpansion​(java.lang.String template)
    • Method Detail

      • expandFileNames

        public java.lang.String expandFileNames​(java.lang.String localTemplate,
                                                java.lang.String[] filePaths,
                                                java.lang.String baseDir)
        Expands all variables relating to file name :
        • ${filePath} = full file path
        • ${fileShortPath} = file path relative to given root
        • ${fileName} = full file name (w/o path but with extension)
        • ${fileNameOnly} = file name without extension
        • ${fileNameOnly-1}, ${fileNameOnly-2}, ... = filename with 1, 2, ... extensions
        • ${fileExtension} = all extensions after '.'
        • ${fileExtension-1}, ${fileExtension-2}, ... = ${fileExtension} after removing 1, 2, ... extensions
        Parameters:
        localTemplate - initial template. If null, use instance's template but does not modify it
        filePath - path used by variable ${fileShortPath}
        Returns:
        Copy of the template with mentioned variables expanded. Other variables remain unchanged
      • expandFileName

        public java.lang.String expandFileName​(java.lang.String localTemplate,
                                               java.lang.String filePath,
                                               java.lang.String baseDir)
      • expandVariables

        public abstract java.lang.String expandVariables​(Param param)