|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectaQute.libg.reporter.ReporterAdapter
aQute.libg.sed.ReplacerAdapter
public class ReplacerAdapter
Provide a macro Domain. This Domain can replace variables in strings based on a properties and a domain. The domain can implement functions that start with a "_" and take args[], the names of these functions are available as functions in the macro Domain (without the _). Macros can nest to any depth but may not contain loops. Add POSIX macros: ${#parameter} String length. ${parameter%word} Remove smallest suffix pattern. ${parameter%%word} Remove largest suffix pattern. ${parameter#word} Remove smallest prefix pattern. ${parameter##word} Remove largest prefix pattern.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface aQute.service.reporter.Reporter |
|---|
Reporter.SetLocation |
| Nested classes/interfaces inherited from interface aQute.service.reporter.Report |
|---|
Report.Location |
| Field Summary | |
|---|---|
static String |
_fileHelp
|
static String |
_fmodifiedHelp
|
| Constructor Summary | |
|---|---|
ReplacerAdapter(Domain domain)
|
|
ReplacerAdapter(Map<String,String> domain)
|
|
| Method Summary | |
|---|---|
String |
_basename(String[] args)
|
String |
_cat(String[] args)
Get the contents of a file. |
String |
_currenttime(String[] args)
|
String |
_def(String[] args)
|
String |
_dir(String[] args)
|
String |
_env(String[] args)
|
String |
_error(String[] args)
|
String |
_filter(String[] args)
|
String |
_filterout(String[] args)
|
String |
_fmodified(String[] args)
|
long |
_freeMemory(String[] args)
|
String |
_if(String[] args)
|
String |
_isdir(String[] args)
|
String |
_isfile(String[] args)
|
String |
_join(String[] args)
|
String |
_literal(String[] args)
|
String |
_long2date(String[] args)
|
String |
_lsa(String[] args)
|
String |
_lsr(String[] args)
Wildcard a directory. |
long |
_maxMemory(String[] args)
|
long |
_nanoTime(String[] args)
|
String |
_now(String[] args)
|
String |
_osfile(String[] args)
|
String |
_path(String[] args)
|
String |
_pathseparator(String[] args)
|
int |
_processors(String[] args)
|
String |
_random(String[] args)
Generate a random string, which is guaranteed to be a valid Java identifier (first character is an ASCII letter, subsequent characters are ASCII letters or numbers). |
String |
_replace(String[] args)
replace ;
|
String |
_separator(String[] args)
|
String |
_sort(String[] args)
|
String |
_system_allow_fail(String[] args)
|
String |
_system(String[] args)
|
String |
_toclassname(String[] args)
|
String |
_toclasspath(String[] args)
|
String |
_tstamp(String[] args)
|
String |
_uniq(String[] args)
|
String |
_warning(String[] args)
|
Map<String,String> |
getFlattenedProperties()
Take all the properties and translate them to actual values. |
static Properties |
getParent(Properties p)
|
String |
getProcessed(String key)
|
static char |
getTerminator(char c)
|
String |
process(String line)
|
String |
process(String line,
Domain source)
|
protected String |
replace(String key,
aQute.libg.sed.ReplacerAdapter.Link link)
|
void |
setReporter(Reporter reporter)
|
String |
system_internal(boolean allowFail,
String[] args)
System command. |
ReplacerAdapter |
target(File base)
|
ReplacerAdapter |
target(Object target)
|
static void |
verifyCommand(String[] args,
String help,
Pattern[] patterns,
int low,
int high)
|
| Methods inherited from class aQute.libg.reporter.ReporterAdapter |
|---|
addErrors, addWarnings, check, error, exception, getErrors, getInfo, getInfo, getLocation, getMessages, getOut, getWarnings, isExceptions, isOk, isPedantic, isPerfect, isTrace, progress, report, run, setExceptions, setPedantic, setTrace, trace, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String _fmodifiedHelp
public static final String _fileHelp
| Constructor Detail |
|---|
public ReplacerAdapter(Domain domain)
public ReplacerAdapter(Map<String,String> domain)
| Method Detail |
|---|
public ReplacerAdapter target(Object target)
public ReplacerAdapter target(File base)
public String process(String line,
Domain source)
public static char getTerminator(char c)
public String getProcessed(String key)
protected String replace(String key,
aQute.libg.sed.ReplacerAdapter.Link link)
public String _uniq(String[] args)
public String _pathseparator(String[] args)
public String _separator(String[] args)
public String _filter(String[] args)
public String _filterout(String[] args)
public String _sort(String[] args)
public String _join(String[] args)
public String _if(String[] args)
public String _now(String[] args)
public String _fmodified(String[] args)
throws Exception
Exceptionpublic String _long2date(String[] args)
public String _literal(String[] args)
public String _def(String[] args)
public String _replace(String[] args)
args -
public String _warning(String[] args)
public String _error(String[] args)
public String _toclassname(String[] args)
public String _toclasspath(String[] args)
public String _dir(String[] args)
public String _basename(String[] args)
public String _isfile(String[] args)
public String _isdir(String[] args)
public String _tstamp(String[] args)
public String _lsr(String[] args)
public String _lsa(String[] args)
public String _currenttime(String[] args)
public String system_internal(boolean allowFail,
String[] args)
throws Exception
args - help - patterns - low - high -
Exception
public String _system(String[] args)
throws Exception
Exception
public String _system_allow_fail(String[] args)
throws Exception
Exceptionpublic String _env(String[] args)
public String _cat(String[] args)
throws IOException
in -
IOException
public static void verifyCommand(String[] args,
String help,
Pattern[] patterns,
int low,
int high)
public Map<String,String> getFlattenedProperties()
public String _osfile(String[] args)
public String _path(String[] args)
public static Properties getParent(Properties p)
public String process(String line)
process in interface Replacerpublic String _random(String[] args)
public void setReporter(Reporter reporter)
public int _processors(String[] args)
public long _maxMemory(String[] args)
public long _freeMemory(String[] args)
public long _nanoTime(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||