|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectaQute.bnd.osgi.Macro
public class Macro
Provide a macro processor. This processor 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 processor (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.
| Field Summary | |
|---|---|
static String |
_fileHelp
|
static String |
_fmodifiedHelp
|
static String |
_nowHelp
|
static String |
_sizeHelp
|
| Constructor Summary | |
|---|---|
Macro(Processor domain,
Object... targets)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String _nowHelp
public static final String _fmodifiedHelp
public static final String _fileHelp
public static final String _sizeHelp
| Constructor Detail |
|---|
public Macro(Processor domain,
Object... targets)
| Method Detail |
|---|
public String process(String line,
Processor source)
public static char getTerminator(char c)
protected String getMacro(String key,
aQute.bnd.osgi.Macro.Link link)
public String replace(String key,
aQute.bnd.osgi.Macro.Link link)
public String _uniq(String[] args)
public String _pathseparator(String[] args)
public String _separator(String[] args)
public String _filter(String[] args)
public String _select(String[] args)
public String _filterout(String[] args)
public String _reject(String[] args)
public String _sort(String[] args)
public String _nsort(String[] args)
public String _join(String[] args)
public String _sjoin(String[] args)
throws Exception
Exceptionpublic String _if(String[] args)
public Object _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 _version(String[] args)
public String _range(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 Properties getFlattenedProperties()
There are some rules
public Properties getFlattenedProperties(boolean ignoreInstructions)
Property names starting with an underscore ('_') are ignored. These are reserved for properties that cause an unwanted side effect when expanded unnecessary
public String _osfile(String[] args)
public String _path(String[] args)
public int _size(String[] args)
public static Properties getParent(Properties p)
public String process(String line)
public boolean isNosystem()
public boolean setNosystem(boolean nosystem)
public String _unescape(String[] args)
public String _startswith(String[] args)
throws Exception
Exception
public String _endswith(String[] args)
throws Exception
Exception
public String _extension(String[] args)
throws Exception
Exception
public String _substring(String[] args)
throws Exception
Exception
public long _rand(String[] args)
throws Exception
Exception
public int _length(String[] args)
throws Exception
Exception
public String _get(String[] args)
throws Exception
Exception
public String _sublist(String[] args)
throws Exception
Exception
public String _first(String[] args)
throws Exception
Exception
public String _last(String[] args)
throws Exception
Exception
public String _max(String[] args)
throws Exception
Exception
public String _min(String[] args)
throws Exception
Exception
public String _nmax(String[] args)
throws Exception
Exception
public String _nmin(String[] args)
throws Exception
Exception
public String _sum(String[] args)
throws Exception
Exception
public String _average(String[] args)
throws Exception
Exception
public String _reverse(String[] args)
throws Exception
Exception
public int _indexof(String[] args)
throws Exception
Exception
public int _lastindexof(String[] args)
throws Exception
Exception
public int _find(String[] args)
throws Exception
Exception
public int _findlast(String[] args)
throws Exception
Exception
public String _split(String[] args)
throws Exception
Exception
public Object _js(String[] args)
throws Exception
Exception
public String _toupper(String[] args)
throws Exception
Exception
public String _tolower(String[] args)
throws Exception
Exception
public int _compare(String[] args)
throws Exception
Exception
public int _ncompare(String[] args)
throws Exception
Exception
public boolean _matches(String[] args)
throws Exception
Exception
public StringBuffer _subst(String[] args)
throws Exception
Exception
public String _trim(String[] args)
throws Exception
Exception
public String _format(String[] args)
throws Exception
Exception
public boolean _isempty(String[] args)
throws Exception
Exception
public boolean _isnumber(String[] args)
throws Exception
Exception
public boolean _is(String[] args)
throws Exception
Exception
public String _map(String[] args)
throws Exception
Exception
public String _foreach(String[] args)
throws Exception
Exception
public String _apply(String[] args)
throws Exception
Exceptionpublic String _bytes(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||