public class Processor extends Domain implements Reporter, Registry, Constants, Closeable
Modifier and Type | Class and Description |
---|---|
static class |
Processor.CL |
static class |
Processor.FileLine |
Reporter.SetLocation
Report.Location
Modifier and Type | Field and Description |
---|---|
static String |
LIST_SPLITTER |
BASELINE, BASELINEREPO, BLUEPRINT_TIMEOUT_ATTRIBUTE, BLUEPRINT_WAIT_FOR_DEPENDENCIES_ATTRIBUTE, BND_ADDXMLTOTEST, BND_LASTMODIFIED, BNDDRIVER, BNDDRIVER_ANT, BNDDRIVER_BND, BNDDRIVER_ECLIPSE, BNDDRIVER_GRADLE, BNDDRIVER_GRADLE_NATIVE, BNDDRIVER_INTELLIJ, BNDDRIVER_MAVEN, BNDDRIVER_OSMORC, BNDDRIVER_SBT, BUILDFILES, BUILDPACKAGES, BUILDPATH, BUMPPOLICY, BUNDLE_ACTIVATIONPOLICY, BUNDLE_ACTIVATOR, BUNDLE_BLUEPRINT, BUNDLE_CATEGORY, BUNDLE_CLASSPATH, BUNDLE_CONTACTADDRESS, BUNDLE_CONTRIBUTORS, BUNDLE_COPYRIGHT, BUNDLE_DESCRIPTION, BUNDLE_DEVELOPERS, BUNDLE_DOCURL, BUNDLE_ICON, BUNDLE_LICENSE, BUNDLE_LOCALIZATION, BUNDLE_MANIFESTVERSION, BUNDLE_NAME, BUNDLE_NATIVECODE, BUNDLE_REQUIREDEXECUTIONENVIRONMENT, BUNDLE_SCM, BUNDLE_SPECIFIC_HEADERS, BUNDLE_SYMBOLIC_NAME_ATTRIBUTE, BUNDLE_SYMBOLICNAME, BUNDLE_UPDATELOCATION, BUNDLE_VENDOR, BUNDLE_VERSION, BUNDLE_VERSION_ATTRIBUTE, CACHEDIR, CLASSPATH, COMMAND_DIRECTIVE, COMPILER_SOURCE, COMPILER_TARGET, COMPONENT_ACTIVATE, COMPONENT_CONFIGURATION_POLICY, COMPONENT_DEACTIVATE, COMPONENT_DESCRIPTORS, COMPONENT_DESIGNATE, COMPONENT_DESIGNATEFACTORY, COMPONENT_DYNAMIC, COMPONENT_ENABLED, COMPONENT_FACTORY, COMPONENT_GREEDY, COMPONENT_IMMEDIATE, COMPONENT_IMPLEMENTATION, COMPONENT_MODIFIED, COMPONENT_MULTIPLE, COMPONENT_NAME, COMPONENT_NAMESPACE, COMPONENT_OPTIONAL, COMPONENT_PROPERTIES, COMPONENT_PROVIDE, COMPONENT_SERVICEFACTORY, COMPONENT_VERSION, componentDirectives, CONDITIONAL_PACKAGE, CONDITIONALPACKAGE, CONDUIT, CONSUMER_POLICY, CONTRACT, CREATED_BY, CURRENT_PACKAGE, CURRENT_USES, CURRENT_VERSION, DEBUG, DEFAULT_BAR_EXTENSION, DEFAULT_BND_EXTENSION, DEFAULT_BNDRUN_EXTENSION, DEFAULT_CHARSET, DEFAULT_DO_NOT_COPY, DEFAULT_JAR_EXTENSION, DEFAULT_LAUNCHER_BSN, DEFAULT_PREPROCESSS_MATCHERS, DEFAULT_PROP_BIN_DIR, DEFAULT_PROP_SRC_DIR, DEFAULT_PROP_TARGET_DIR, DEFAULT_PROP_TESTBIN_DIR, DEFAULT_PROP_TESTSRC_DIR, DEFAULT_TESTER_BSN, DEPENDSON, DEPLOY, DEPLOYREPO, DESCRIPTION_ATTRIBUTE, DIFFIGNORE, DIGESTS, directives, DONOTCOPY, DSANNOTATIONS, DUPLICATE_MARKER, DYNAMICIMPORT_PACKAGE, EEPROFILE, EEPROFILE_AUTO_ATTRIBUTE, EFFECTIVE_DIRECTIVE, EMBEDDED_REPO, EMPTY, EMPTY_HEADER, EXCLUDE_DIRECTIVE, EXPERIMENTS, EXPORT, EXPORT_CONTENTS, EXPORT_PACKAGE, EXPORT_SERVICE, EXTENSION, EXTENSION_DIRECTIVE, FAIL_OK, FILTER_DIRECTIVE, FIXUPMESSAGES, FIXUPMESSAGES_IS_DIRECTIVE, FIXUPMESSAGES_IS_ERROR, FIXUPMESSAGES_IS_IGNORE, FIXUPMESSAGES_IS_WARNING, FIXUPMESSAGES_REPLACE_DIRECTIVE, FIXUPMESSAGES_RESTRICT_DIRECTIVE, FRAGMENT_ATTACHMENT_DIRECTIVE, FRAGMENT_HOST, FROM_DIRECTIVE, GESTALT, GESTALT_BATCH, GESTALT_CI, GESTALT_INTERACTIVE, GESTALT_OFFLINE, GESTALT_SHELL, headers, IGNORE_PACKAGE, IMPORT_DIRECTIVE, IMPORT_PACKAGE, IMPORT_PRIVATE, IMPORT_REFERENCE, IMPORT_SERVICE, importDirectives, INCLUDE, INCLUDE_DIRECTIVE, INCLUDE_RESOURCE, INCLUDERESOURCE, INVALIDFILENAMES, JAVAAGENT, JIDENTIFIER, KEYSTORE_LOCATION_DIRECTIVE, KEYSTORE_PASSWORD_DIRECTIVE, KEYSTORE_PROVIDER_DIRECTIVE, LANGUAGE_ATTRIBUTE, LAUNCHER_PLUGIN, LIB_DIRECTIVE, LINK_ATTRIBUTE, LITERAL_ATTRIBUTE, MAKE, MANDATORY_DIRECTIVE, MANIFEST, MANIFEST_NAME, META_PERSISTENCE, METAPACKAGES, METATYPE, METATYPE_ANNOTATIONS, NAME_ATTRIBUTE, NAMESECTION, NAMESPACE_STEM, NO_IMPORT_DIRECTIVE, NOANNOTATIONS, NOBUILDINCACHE, NOBUNDLES, NODEFAULTVERSION, NOEE, NOEXTRAHEADERS, NOJUNIT, NOJUNITOSGI, NOMANIFEST, NONE, NOUSES, options, OSNAME_ATTRIBUTE, OSVERSION_ATTRIBUTE, OUTPUT, OUTPUTMASK, PACKAGE, PACKAGE_JPM, PATH_DIRECTIVE, PEDANTIC, PLUGIN, PLUGINPATH, PLUGINPATH_SHA1_ATTR, PLUGINPATH_URL_ATTR, POM, PREPROCESSMATCHERS, PRESENCE_DIRECTIVE, PRIVATE_DIRECTIVE, PRIVATE_PACKAGE, PRIVATEPACKAGE, PROCESSOR_ATTRIBUTE, PROFILE, PROVIDE_CAPABILITY, PROVIDE_DIRECTIVE, PROVIDER_POLICY, PROVIDER_TYPE_DIRECTIVE, RELEASEREPO, REMOVE_ATTRIBUTE_DIRECTIVE, REMOVEHEADERS, REPORTNEWER, REPOSITORIES, REQUIRE_BND, REQUIRE_BUNDLE, REQUIRE_CAPABILITY, RESOLUTION_DIRECTIVE, RESOLVE, RESOURCEONLY, RUNBLACKLIST, RUNBUILDS, RUNBUNDLES, RUNEE, RUNENV, RUNFRAMEWORK, RUNFRAMEWORK_NONE, RUNFRAMEWORK_SERVICES, RUNFW, RUNJDB, RUNNOREFERENCES, RUNPATH, RUNPATH_LAUNCHER_DIRECTIVE, RUNPATH_MAIN_DIRECTIVE, RUNPROGRAMARGS, RUNPROPERTIES, RUNREPOS, RUNREQUIRE, RUNREQUIRES, RUNSTORAGE, RUNSYSTEMCAPABILITIES, RUNSYSTEMPACKAGES, RUNTIMEOUT, RUNTRACE, RUNVM, SAVEMANIFEST, SELECTION_FILTER_ATTRIBUTE, SERVICE_COMPONENT, SET_COMPONENT_DIRECTIVES, SET_COMPONENT_DIRECTIVES_1_1, SET_COMPONENT_DIRECTIVES_1_2, SIGN, SIGN_PASSWORD_DIRECTIVE, SIGNATURE_TEST, SINGLETON_DIRECTIVE, SIZE_ATTRIBUTE, SNAPSHOT, SOURCEPATH, SOURCES, SPECIFICATION_VERSION, SPLIT_PACKAGE_DIRECTIVE, STRICT, SUB, SYSTEMPROPERTIES, TESTCASES, TESTCONTINUOUS, TESTER_PLUGIN, TESTPACKAGES, TESTPATH, TESTREPORT, TESTSOURCES, TESTSUITES, TESTUNRESOLVED, TOOL, UNDERTEST, UPTO, USES_DIRECTIVE, USES_USES, VALID_PROPERTY_TYPES, VERBOSE, VERSION_ATTR_LATEST, VERSION_ATTR_PROJECT, VERSION_ATTR_SNAPSHOT, VERSION_ATTRIBUTE, VERSION_FILTER, VISIBILITY_DIRECTIVE, WAB, WABLIB
Constructor and Description |
---|
Processor() |
Processor(Processor child) |
Processor(Properties parent) |
Modifier and Type | Method and Description |
---|---|
String |
_basedir(String[] args) |
String |
_native_capability(String[] args)
Generates a Capability string, in the format specified by the OSGi
Provide-Capability header, representing the current native platform
according to OSGi RFC 188.
|
String |
_propertiesdir(String[] args) |
String |
_propertiesname(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).
|
void |
addBasicPlugin(Object plugin)
These plugins are added to the total list of plugins.
|
void |
addClose(Closeable jar) |
protected void |
addExtensions(Set<Object> plugins)
Is called when all plugins are loaded
|
void |
addIncluded(File file) |
void |
addProperties(File file) |
void |
addProperties(Map<?,?> properties) |
static String |
append(String... strings) |
static String |
appendPath(String... parts)
Append two strings to for a path in a ZIP or JAR file.
|
protected void |
begin() |
protected Processor |
beginHandleErrors(String message)
Set the current command thread.
|
boolean |
check(String... pattern) |
void |
clear() |
void |
close() |
<T> T[] |
concat(Class<T> type,
T[] prefix,
T suffix)
Add an element to an array, creating a new one if necessary
|
protected <T> T |
customize(T plugin,
Attrs map)
Set the initial parameters of a plugin
|
static Attrs |
doAttrbutes(Object[] attrs,
Clazz clazz,
Macro macro)
Parse the a=b strings and return a map of them.
|
void |
doIncludeFile(File file,
boolean overwrite,
Properties target) |
void |
doIncludeFile(File file,
boolean overwrite,
Properties target,
String extensionName) |
protected void |
endHandleErrors(Processor previous)
End a command.
|
Reporter.SetLocation |
error(String string,
Object... args)
Create an error.
|
Reporter.SetLocation |
error(String string,
Throwable t,
Object... args) |
Reporter.SetLocation |
exception(Throwable t,
String format,
Object... args)
Dedicated message for an exception.
|
boolean |
exists() |
static Processor.FileLine |
findHeader(File f,
Pattern header) |
static Processor.FileLine |
findHeader(File f,
String header) |
void |
forceRefresh() |
static String |
formatArrays(String string,
Object... parms)
This method is the same as String.format but it makes sure that any
arrays are transformed to strings.
|
String |
get(String key)
Overrides for the Domain class
|
String |
get(String key,
String deflt) |
File |
getBase() |
Class<?> |
getClass(String type,
File jar) |
static long |
getDuration(String tm,
long dflt) |
List<String> |
getErrors()
Return the errors.
|
static Executor |
getExecutor() |
static File |
getFile(File base,
String file) |
File |
getFile(String file) |
Properties |
getFlattenedProperties()
Return the properties but expand all macros.
|
Properties |
getFlattenedProperties(boolean ignoreInstructions)
Return the properties but expand all macros.
|
Processor.FileLine |
getHeader(Pattern header) |
Processor.FileLine |
getHeader(String header)
Get a header relative to this processor, tking its parents and includes
into account.
|
List<File> |
getIncluded() |
void |
getInfo(Reporter processor) |
void |
getInfo(Reporter processor,
String prefix) |
Jar |
getJarFromName(String name,
String from)
Try to get a Jar from a file name/path or a url, or in last resort from
the classpath name part of their files.
|
static int |
getLine(String s,
int index) |
protected Processor.CL |
getLoader() |
Report.Location |
getLocation(String msg)
Return the errors for the given error or warning.
|
protected Object[] |
getMacroDomains()
This should be overridden by subclasses to add extra macro command
domains on the search list.
|
static Properties |
getManifestAsProperties(InputStream in)
Read a manifest but return a properties object.
|
Processor |
getParent() |
<T> T |
getPlugin(Class<T> clazz)
Returns the first plugin it can find of the given type.
|
Set<Object> |
getPlugins()
Return a list of plugins.
|
<T> List<T> |
getPlugins(Class<T> clazz)
Return a list of plugins that implement the given class.
|
Properties |
getProperties()
Property handling ...
|
File |
getPropertiesFile() |
String |
getProperty(String key) |
String |
getProperty(String key,
String deflt)
Get a property with preprocessing it with a proper default
|
String |
getProperty(String key,
String deflt,
String separator) |
Set<String> |
getPropertyKeys(boolean inherit)
Return all inherited property keys
|
Macro |
getReplacer() |
Processor |
getTop() |
String |
getUnprocessedProperty(String key,
String deflt)
Get a property without preprocessing it with a proper default
|
List<String> |
getWarnings()
Return the warnings.
|
boolean |
is(String propertyName)
Simplified way to check booleans
|
static boolean |
isDuplicate(String name) |
boolean |
isExceptions() |
boolean |
isFailOk()
Indicates that this run should ignore errors and succeed anyway
|
boolean |
isMissingPlugin(String name)
Answer if the name is a missing plugin's command name.
|
boolean |
isOk()
Check if this report has any relevant errors that should make the run
associated with this report invalid.
|
boolean |
isPedantic()
The provider of the reporter wants pedantic reporting, meaning every
possible warning should be reported.
|
boolean |
isPerfect() |
boolean |
isTrace() |
static boolean |
isTrue(String value) |
Iterator<String> |
iterator() |
static String |
join(Collection<?>... list) |
static String |
join(Collection<?> list,
String delimeter)
Join a list.
|
static String |
join(Object[] list,
String delimeter) |
static String |
join(String delimeter,
Collection<?>... list) |
static <T> String |
join(T[] list) |
Set<String> |
keySet() |
long |
lastModified() |
protected void |
loadPlugins(Set<Object> instances,
String pluginString,
String pluginPathString)
Magic to load the plugins.
|
Properties |
loadProperties(File file)
Helper to load a properties file from disk.
|
static Object |
makePrintable(Object object)
Check if the object is an array and turn it into a string if it is,
otherwise unchanged.
|
static String |
merge(String... strings) |
void |
mergeProperties(File file,
boolean override) |
void |
mergeProperties(Properties properties,
boolean override) |
String |
mergeProperties(String key)
Return merged properties.
|
String |
mergeProperties(String key,
String separator) |
static <K,V> Map<K,V> |
newHashMap() |
<T> List<T> |
newList() |
<T> List<T> |
newList(Collection<T> t) |
static <K,V> Map<K,V> |
newMap() |
<K,V> Map<K,V> |
newMap(Map<K,V> t) |
<T> Set<T> |
newSet() |
<T> Set<T> |
newSet(Collection<T> t) |
String |
normalize(File f) |
String |
normalize(String f)
Make the file short if it is inside our base directory, otherwise long.
|
Parameters |
parseHeader(String value) |
static Parameters |
parseHeader(String value,
Processor logger)
Standard OSGi header parser.
|
static void |
printClause(Map<?,?> map,
StringBuilder sb) |
static String |
printClauses(Map<?,? extends Map<?,?>> exports)
Print a standard Map based OSGi header.
|
static String |
printClauses(Map<?,? extends Map<?,?>> exports,
boolean checkMultipleVersions) |
int |
printExceptionSummary(Throwable e,
PrintStream out) |
void |
printStackTrace(Throwable e,
int count,
PrintStream out) |
void |
progress(float progress,
String format,
Object... args)
Create a warning.
|
void |
progress(String format,
Object... args) |
void |
propertiesChanged() |
static boolean |
quote(Appendable sb,
String value) |
static String |
read(InputStream in) |
boolean |
refresh() |
void |
removeBasicPlugin(Object plugin) |
void |
removeClose(Closeable jar) |
static String |
removeDuplicateMarker(String key) |
static Properties |
replaceAll(Properties p,
String pattern,
String replacement)
Replace a string in all the values of the map.
|
String |
replaceExtension(String s,
String extension,
String newExtension)
Utiltity to replace an extension
|
protected void |
report(Appendable out) |
void |
report(Map<String,Object> table)
Report the details of this processor.
|
void |
set(String key,
String value) |
void |
setBase(File base) |
void |
setExceptions(boolean exceptions) |
void |
setFileMustExist(boolean mustexist) |
void |
setForceLocal(Collection<String> local) |
void |
setParent(Processor processor) |
void |
setPedantic(boolean pedantic) |
void |
setProperties(File propertiesFile)
Set the properties by file.
|
void |
setProperties(File propertiesFile,
File base) |
void |
setProperties(Properties properties) |
void |
setProperty(String key,
String value)
Add or override a new property.
|
void |
setTrace(boolean x) |
protected void |
setTypeSpecificPlugins(Set<Object> list) |
void |
signal() |
boolean |
since(Version introduced) |
static Collection<String> |
split(String s) |
static void |
split(String s,
Collection<String> set) |
static Collection<String> |
split(String s,
String splitter) |
String |
toString()
Printout of the status of this processor for toString()
|
void |
trace(String msg,
Object... parms)
Create a warning.
|
void |
unsetProperty(String string) |
boolean |
updateModified(long time,
String reason) |
void |
use(Processor reporter) |
Reporter.SetLocation |
warning(String string,
Object... args)
Create a warning.
|
domain, domain, domain, domain, getBundleActivator, getBundleClasspath, getBundleClassPath, getBundleRequiredExecutionEnvironment, getBundleSymbolicName, getBundleVersion, getDynamicImportPackage, getExportContents, getExportPackage, getFragmentHost, getIcon, getImportPackage, getIncludeResource, getParameters, getParameters, getParameters, getParameters, getPrivatePackage, getProvideCapability, getRequireBundle, getRequireCapability, isSources, setBundleActivator, setBundleClasspath, setBundleRequiredExecutionEnvironment, setBundleSymbolicName, setBundleVersion, setBundleVersion, setConditionalPackage, setExportPackage, setFailOk, setImportPackage, setIncludeResource, setPrivatePackage, setSources, setTranslation, translate, translate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final String LIST_SPLITTER
public Processor()
public Processor(Properties parent)
public Processor(Processor child)
public void setParent(Processor processor)
public Processor getParent()
public Processor getTop()
public void getInfo(Reporter processor)
public Reporter.SetLocation warning(String string, Object... args)
Reporter
public Reporter.SetLocation error(String string, Object... args)
Reporter
public void progress(float progress, String format, Object... args)
Reporter
public Reporter.SetLocation exception(Throwable t, String format, Object... args)
Reporter
public Reporter.SetLocation error(String string, Throwable t, Object... args)
public int printExceptionSummary(Throwable e, PrintStream out)
public void printStackTrace(Throwable e, int count, PrintStream out)
public void signal()
public List<String> getWarnings()
Report
getWarnings
in interface Report
public List<String> getErrors()
Report
public static Parameters parseHeader(String value, Processor logger)
value
- public Parameters parseHeader(String value)
public void addClose(Closeable jar)
public void removeClose(Closeable jar)
public boolean isPedantic()
Reporter
isPedantic
in interface Reporter
public void setPedantic(boolean pedantic)
public void use(Processor reporter)
public <T> List<T> getPlugins(Class<T> clazz)
getPlugins
in interface Registry
clazz
- Each returned plugin implements this class/interfacepublic <T> T getPlugin(Class<T> clazz)
public Set<Object> getPlugins()
protected void addExtensions(Set<Object> plugins)
plugins
- protected void loadPlugins(Set<Object> instances, String pluginString, String pluginPathString)
After that, we load the plugin paths, these can use the built in connectors.
Last but not least, we load the remaining plugins.
instances
- pluginString
- protected <T> T customize(T plugin, Attrs map)
plugin
- entry
- public boolean isFailOk()
public File getBase()
public void setBase(File base)
public void clear()
public void trace(String msg, Object... parms)
Reporter
public <T> List<T> newList()
public <T> Set<T> newSet()
public static <K,V> Map<K,V> newMap()
public static <K,V> Map<K,V> newHashMap()
public <T> List<T> newList(Collection<T> t)
public <T> Set<T> newSet(Collection<T> t)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public Properties getProperties()
public void mergeProperties(File file, boolean override)
public void mergeProperties(Properties properties, boolean override)
public void setProperties(Properties properties)
public void addProperties(Map<?,?> properties)
public void addIncluded(File file)
public void doIncludeFile(File file, boolean overwrite, Properties target) throws Exception
file
- parent
- done
- overwrite
- FileNotFoundException
IOException
Exception
public void doIncludeFile(File file, boolean overwrite, Properties target, String extensionName) throws Exception
file
- parent
- done
- overwrite
- extensionName
- FileNotFoundException
IOException
Exception
public void unsetProperty(String string)
public boolean refresh()
public void forceRefresh()
public void propertiesChanged()
public void setProperties(File propertiesFile) throws IOException
propertiesFile
- FileNotFoundException
IOException
protected void begin()
public static boolean isTrue(String value)
public String getUnprocessedProperty(String key, String deflt)
headerName
- deflt
- public String getProperty(String key, String deflt)
headerName
- deflt
- public Properties loadProperties(File file) throws IOException
file
- IOException
public static Properties replaceAll(Properties p, String pattern, String replacement)
public static String printClauses(Map<?,? extends Map<?,?>> exports) throws IOException
exports
- map { name => Map { attribute|directive => value } }IOException
public static String printClauses(Map<?,? extends Map<?,?>> exports, boolean checkMultipleVersions) throws IOException
IOException
public static void printClause(Map<?,?> map, StringBuilder sb) throws IOException
IOException
public static boolean quote(Appendable sb, String value) throws IOException
sb
- value
- IOException
public Macro getReplacer()
protected Object[] getMacroDomains()
public Properties getFlattenedProperties()
public Properties getFlattenedProperties(boolean ignoreInstructions)
public Set<String> getPropertyKeys(boolean inherit)
public boolean updateModified(long time, String reason)
public long lastModified()
public void setProperty(String key, String value)
key
- value
- public static Properties getManifestAsProperties(InputStream in) throws IOException
in
- IOException
public File getPropertiesFile()
public void setFileMustExist(boolean mustexist)
public static String read(InputStream in) throws Exception
Exception
public static String join(Collection<?> list, String delimeter)
args
- public static String join(String delimeter, Collection<?>... list)
public static String join(Collection<?>... list)
public static <T> String join(T[] list)
public static void split(String s, Collection<String> set)
public static Collection<String> split(String s)
public static Collection<String> split(String s, String splitter)
public boolean isExceptions()
public void setExceptions(boolean exceptions)
public String normalize(String f)
f
- public static boolean isDuplicate(String name)
public void setTrace(boolean x)
protected Processor.CL getLoader()
public boolean exists()
public boolean isOk()
Report
public boolean check(String... pattern) throws IOException
IOException
protected void report(Appendable out) throws IOException
IOException
public boolean isPerfect()
public void setForceLocal(Collection<String> local)
public boolean isMissingPlugin(String name)
name
- public static String appendPath(String... parts)
"/" + "abc/def/" becomes "abc/def" @param prefix @param suffix @return
public static Attrs doAttrbutes(Object[] attrs, Clazz clazz, Macro macro)
attrs
- clazz
- public static String formatArrays(String string, Object... parms)
string
- parms
- public static Object makePrintable(Object object)
object
- the object to make printablepublic boolean isTrace()
public static long getDuration(String tm, long dflt)
public String _random(String[] args)
public String _native_capability(String[] args) throws IllegalArgumentException
Generates a Capability string, in the format specified by the OSGi Provide-Capability header, representing the current native platform according to OSGi RFC 188. For example on Windows7 running on an x86_64 processor it should generate the following:
osgi.native;osgi.native.osname:List<String>="Windows7,Windows 7,Win32";osgi.native.osversion:Version=6.1.0;osgi.native.processor:List<String>="x86-64,amd64,em64t,x86_64"
args
- The array of properties. For example: the macro invocation of
"${native_capability;osversion=3.2.4;osname=Linux}" results in
an args array of
[native_capability, osversion=3.2.4, osname=Linux]IllegalArgumentException
protected Processor beginHandleErrors(String message)
#end(Processor)
method. The method returns the previous command
owner or null. The command owner will receive all warnings and error
reports.protected void endHandleErrors(Processor previous)
previous
- public static Executor getExecutor()
public void addBasicPlugin(Object plugin)
plugin
- public void removeBasicPlugin(Object plugin)
public String toString()
public String replaceExtension(String s, String extension, String newExtension)
s
- extension
- newExtension
- public Report.Location getLocation(String msg)
Report
getLocation
in interface Report
msg
- The messagepublic Processor.FileLine getHeader(String header) throws Exception
location
- header
- IOException
Exception
public Processor.FileLine getHeader(Pattern header) throws Exception
Exception
public static Processor.FileLine findHeader(File f, String header) throws IOException
IOException
public static Processor.FileLine findHeader(File f, Pattern header) throws IOException
IOException
public static int getLine(String s, int index)
public boolean since(Version introduced)
public void report(Map<String,Object> table) throws Exception
table
- Exception
public boolean is(String propertyName)
public String mergeProperties(String key)
public <T> T[] concat(Class<T> type, T[] prefix, T suffix)
public Jar getJarFromName(String name, String from)
name
- URL or filename relative to the basefrom
- Message identifying the caller for errorsCopyright © 2015 aQute SARL. All rights reserved.