public abstract class VarExpansion<Param>
extends java.lang.Object
expandBundleEntries(String)
for syntax
expandVariables(Object)
for syntax
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
PATTERN_BUNDLE_ENTRY |
protected java.lang.String |
template |
static java.lang.String |
VAR_FILE_EXTENSION |
static java.lang.String |
VAR_FILE_NAME |
static java.lang.String |
VAR_FILE_NAME_ONLY |
static java.lang.String |
VAR_FILE_PATH |
static java.lang.String |
VAR_FILE_SHORT_PATH |
static java.lang.String |
VAR_PROJECT_SOURCE_LANG |
static java.lang.String |
VAR_PROJECT_SOURCE_LANG_CODE |
static java.lang.String |
VAR_PROJECT_TARGET_LANG |
static java.lang.String |
VAR_PROJECT_TARGET_LANG_CODE |
static java.lang.String |
VAR_SOURCE_TEXT |
static java.lang.String |
VAR_TARGET_TEXT |
Constructor and Description |
---|
VarExpansion(java.lang.String template) |
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
expandBundleEntries(java.lang.String localTemplate)
Replace bundle entries with their translation
Format : #{BUNDLE_ENTRY_NAME}[param0][param1][param2]... |
java.lang.String |
expandFileName(java.lang.String localTemplate,
java.lang.String filePath,
java.lang.String baseDir) |
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}, ...
|
abstract java.lang.String |
expandVariables(Param param) |
public static final java.lang.String VAR_SOURCE_TEXT
public static final java.lang.String VAR_TARGET_TEXT
public static final java.lang.String VAR_PROJECT_SOURCE_LANG
public static final java.lang.String VAR_PROJECT_SOURCE_LANG_CODE
public static final java.lang.String VAR_PROJECT_TARGET_LANG
public static final java.lang.String VAR_PROJECT_TARGET_LANG_CODE
public static final java.lang.String VAR_FILE_NAME
public static final java.lang.String VAR_FILE_NAME_ONLY
public static final java.lang.String VAR_FILE_EXTENSION
public static final java.lang.String VAR_FILE_PATH
public static final java.lang.String VAR_FILE_SHORT_PATH
public static final java.util.regex.Pattern PATTERN_BUNDLE_ENTRY
protected java.lang.String template
protected static java.lang.String expandBundleEntries(java.lang.String localTemplate)
localTemplate
- Initial template.public java.lang.String expandFileNames(java.lang.String localTemplate, java.lang.String[] filePaths, java.lang.String baseDir)
localTemplate
- initial template. If null, use instance's template but does not modify itfilePath
- path used by variable ${fileShortPath}public java.lang.String expandFileName(java.lang.String localTemplate, java.lang.String filePath, java.lang.String baseDir)
public abstract java.lang.String expandVariables(Param param)