aQute.lib.osgi
Class Verifier

java.lang.Object
  extended by aQute.lib.osgi.Processor
      extended by aQute.lib.osgi.Analyzer
          extended by aQute.lib.osgi.Verifier
All Implemented Interfaces:
Registry, Constants, Reporter, Closeable

public class Verifier
extends Analyzer


Field Summary
static Pattern ANYPATTERN
           
static Pattern BUNDLE_ACTIVATIONPOLICYPATTERN
           
static String[] EES
           
static Pattern FILTERPATTERN
           
static Pattern FQNPATTERN
           
static Pattern HEADER_PATTERN
           
static Pattern ISO639
           
static Pattern NUMBERPATTERN
           
static String[] OSNAMES
           
static Pattern PATHPATTERN
           
static String[] PROCESSORNAMES
           
static Pattern SYMBOLICNAME
           
static String SYMBOLICNAME_STRING
           
static Pattern TOKEN
           
static Pattern TRUEORFALSEPATTERN
           
static Pattern URLPATTERN
           
static Pattern VERSION
           
static String VERSION_STRING
           
static Pattern VERSIONRANGE
           
static Pattern WILDCARDNAMEPATTERN
           
 
Fields inherited from class aQute.lib.osgi.Processor
LIST_SPLITTER
 
Fields inherited from interface aQute.lib.osgi.Constants
BLUEPRINT_TIMEOUT_ATTRIBUTE, BLUEPRINT_WAIT_FOR_DEPENDENCIES_ATTRIBUTE, BND_ADDXMLTOTEST, BND_LASTMODIFIED, BUILDFILES, BUILDPACKAGES, BUILDPATH, BUMPPOLICY, BUNDLE_ACTIVATIONPOLICY, BUNDLE_ACTIVATOR, BUNDLE_BLUEPRINT, BUNDLE_CATEGORY, BUNDLE_CLASSPATH, BUNDLE_CONTACTADDRESS, BUNDLE_COPYRIGHT, BUNDLE_DESCRIPTION, BUNDLE_DOCURL, BUNDLE_ICON, BUNDLE_LICENSE, BUNDLE_LOCALIZATION, BUNDLE_MANIFESTVERSION, BUNDLE_NAME, BUNDLE_NATIVECODE, BUNDLE_REQUIREDEXECUTIONENVIRONMENT, BUNDLE_SPECIFIC_HEADERS, BUNDLE_SYMBOLIC_NAME_ATTRIBUTE, BUNDLE_SYMBOLICNAME, BUNDLE_UPDATELOCATION, BUNDLE_VENDOR, BUNDLE_VERSION, BUNDLE_VERSION_ATTRIBUTE, 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_IMMEDIATE, COMPONENT_IMPLEMENTATION, COMPONENT_MODIFIED, COMPONENT_MULTIPLE, COMPONENT_NAME, COMPONENT_OPTIONAL, COMPONENT_PROPERTIES, COMPONENT_PROVIDE, COMPONENT_SERVICEFACTORY, COMPONENT_VERSION, componentDirectives, CONDITIONAL_PACKAGE, CONDUIT, CONSUMER_POLICY, 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_TESTER_BSN, DEPENDSON, DEPLOY, DEPLOYREPO, DESCRIPTION_ATTRIBUTE, directives, DONOTCOPY, DUPLICATE_MARKER, DYNAMICIMPORT_PACKAGE, EMBEDDED_REPO, EMPTY, EMPTY_HEADER, EXCLUDE_DIRECTIVE, EXPORT_CONTENTS, EXPORT_PACKAGE, EXPORT_SERVICE, EXTENSION_DIRECTIVE, FAIL_OK, FRAGMENT_ATTACHMENT_DIRECTIVE, FRAGMENT_HOST, FROM_DIRECTIVE, headers, IGNORE_PACKAGE, IMPORT_DIRECTIVE, IMPORT_PACKAGE, IMPORT_PRIVATE, IMPORT_REFERENCE, IMPORT_SERVICE, importDirectives, INCLUDE, INCLUDE_DIRECTIVE, INCLUDE_RESOURCE, INCLUDERESOURCE, JIDENTIFIER, KEYSTORE_LOCATION_DIRECTIVE, KEYSTORE_PASSWORD_DIRECTIVE, KEYSTORE_PROVIDER_DIRECTIVE, LANGUAGE_ATTRIBUTE, LAUNCHER_PLUGIN, LIB_DIRECTIVE, LINK_ATTRIBUTE, MAKE, MANDATORY_DIRECTIVE, MANIFEST, METAPACKAGES, METATYPE, NAME_ATTRIBUTE, NAMESECTION, NAMESPACE_STEM, NO_IMPORT_DIRECTIVE, NOANNOTATIONS, NOBUNDLES, NODEFAULTVERSION, NOEXTRAHEADERS, NOMANIFEST, NONE, NOPE, NOUSES, options, OSNAME_ATTRIBUTE, OSVERSION_ATTRIBUTE, PATH_DIRECTIVE, PEDANTIC, PLUGIN, POM, PRESENCE_DIRECTIVE, PRIVATE_DIRECTIVE, PRIVATE_PACKAGE, PROCESSOR_ATTRIBUTE, PROVIDE_DIRECTIVE, PROVIDER_POLICY, RELEASEREPO, REMOVE_ATTRIBUTE_DIRECTIVE, REMOVEHEADERS, REPORTNEWER, REQUIRE_BND, REQUIRE_BUNDLE, RESOLUTION_DIRECTIVE, RESOURCEONLY, RUNBUILDS, RUNBUNDLES, RUNFRAMEWORK, RUNFRAMEWORK_NONE, RUNFRAMEWORK_SERVICES, RUNPATH, RUNPATH_LAUNCHER_DIRECTIVE, RUNPATH_MAIN_DIRECTIVE, RUNPROPERTIES, RUNSTORAGE, RUNSYSTEMPACKAGES, RUNTIMEOUT, RUNTRACE, RUNVM, SAVEMANIFEST, SELECTION_FILTER_ATTRIBUTE, SERVICE_COMPONENT, SET_COMPONENT_DIRECTIVES, SET_COMPONENT_DIRECTIVES_1_1, SIGN, SIGN_PASSWORD_DIRECTIVE, SIGNATURE_TEST, SINGLETON_DIRECTIVE, SIZE_ATTRIBUTE, SNAPSHOT, SOURCEPATH, SOURCES, SPECIFICATION_VERSION, SPLIT_PACKAGE_DIRECTIVE, SUB, TESTCASES, TESTCONTINUOUS, TESTER_PLUGIN, TESTPACKAGES, TESTPATH, TESTREPORT, TOOL, UNDERTEST, USES_DIRECTIVE, USES_USES, VALID_PROPERTY_TYPES, VERBOSE, VERSION_ATTRIBUTE, VERSION_FILTER, VERSIONPOLICY, VERSIONPOLICY_IMPL, VERSIONPOLICY_USES, VISIBILITY_DIRECTIVE, WAB, WABLIB
 
Constructor Summary
Verifier()
           
Verifier(Jar jar)
           
Verifier(Jar jar, Properties properties)
           
 
Method Summary
 void doNative(String nc)
           
 String getProperty(String key, String deflt)
          Get a property with a proper default
 void info()
           
static boolean isBsn(String name)
           
static boolean isFQN(String name)
           
static boolean isIdentifier(String value)
           
static boolean isMember(String value, String[] matches)
           
static boolean isVersion(String version)
           
 void setClassSpace(Map<String,Clazz> classspace, Map<String,Map<String,String>> contained, Map<String,Map<String,String>> referred, Map<String,Set<String>> uses)
           
 void verify()
           
 boolean verifyActivationPolicy()
           
 boolean verifyActivationPolicy(String policy)
           
 void verifyBundleClasspath()
           
 boolean verifyFilter(String value)
           
static int verifyFilter(String expr, int index)
           filter ::= ���(��� filter-comp ���)��� filter-comp ::= and | or | not | operation and ::= ���&��� filter-list or ::= ���|��� filter-list not ::= ���!��� filter filter-list ::= filter | filter filter-list operation ::= simple | present | substring simple ::= attr filter-type value filter-type ::= equal | approx | greater | less equal ::= ���=��� approx ::= ���˜=��� greater ::= ���>=��� less ::= ���<=��� present ::= attr ���=*��� substring ::= attr ���=��� initial any final inital ::= () | value any ::= ���*��� star-value star-value ::= () | value ���*��� star-value final ::= () | value value ::= <see text>
 void verifyNative()
           
 
Methods inherited from class aQute.lib.osgi.Analyzer
_bsn, _classes, _exporters, _findname, _findpath, _md5, _sha1, addClasspath, addClasspath, analyze, analyzeBundleClasspath, begin, calcManifest, calculateExportsFromContents, checkClass, cleanupVersion, clear, close, doUses, findClass, findResource, getBndInfo, getBndLastModified, getBndVersion, getBsn, getBundleClasspath, getClasses, getClasspath, getClassspace, getContained, getExports, getGroups, getImportPackages, getImports, getJar, getManifest, getPackage, getReferred, getTarget, getUnreachable, getUses, getVersion, getVersionPolicy, isNoBundle, mergeManifest, putAll, referred, referTo, setBase, setClasspath, setClasspath, setClasspath, setJar, setJar
 
Methods inherited from class aQute.lib.osgi.Processor
_basedir, _random, addBasicPlugin, addClose, addIncluded, addProperties, append, appendPath, beginHandleErrors, customize, doAttrbutes, doIncludeFile, endHandleErrors, error, error, exists, forceRefresh, formatArrays, getBase, getClass, getDuration, getErrors, getExecutor, getFile, getFile, getFlattenedProperties, getInfo, getInfo, getMacroDomains, getManifestAsProperties, getParent, getPlugin, getPlugins, getPlugins, getProperties, getPropertiesFile, getProperty, getReplacer, getTop, getWarnings, isDuplicate, isExceptions, isFailOk, isMissingPlugin, isOk, isPedantic, isPerfect, isTrace, isTrue, join, join, join, join, join, lastModified, loadPlugins, loadProperties, makePrintable, merge, merge, mergeProperties, mergeProperties, newHashMap, newList, newList, newMap, newMap, newSet, newSet, normalize, normalize, parseHeader, parseHeader, printClause, printClauses, printClauses, progress, propertiesChanged, read, refresh, removeBasicPlugin, removeDuplicateMarker, replaceAll, setExceptions, setFileMustExist, setForceLocal, setParent, setPedantic, setProperties, setProperties, setProperties, setProperty, setTrace, setTypeSpecificPlugins, signal, split, split, split, trace, unsetProperty, updateModified, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYMBOLICNAME_STRING

public static final String SYMBOLICNAME_STRING
See Also:
Constant Field Values

SYMBOLICNAME

public static final Pattern SYMBOLICNAME

VERSION_STRING

public static final String VERSION_STRING
See Also:
Constant Field Values

VERSION

public static final Pattern VERSION

VERSIONRANGE

public static final Pattern VERSIONRANGE

ISO639

public static final Pattern ISO639

HEADER_PATTERN

public static final Pattern HEADER_PATTERN

TOKEN

public static final Pattern TOKEN

NUMBERPATTERN

public static final Pattern NUMBERPATTERN

PATHPATTERN

public static final Pattern PATHPATTERN

FQNPATTERN

public static final Pattern FQNPATTERN

URLPATTERN

public static final Pattern URLPATTERN

ANYPATTERN

public static final Pattern ANYPATTERN

FILTERPATTERN

public static final Pattern FILTERPATTERN

TRUEORFALSEPATTERN

public static final Pattern TRUEORFALSEPATTERN

WILDCARDNAMEPATTERN

public static final Pattern WILDCARDNAMEPATTERN

BUNDLE_ACTIVATIONPOLICYPATTERN

public static final Pattern BUNDLE_ACTIVATIONPOLICYPATTERN

EES

public static final String[] EES

OSNAMES

public static final String[] OSNAMES

PROCESSORNAMES

public static final String[] PROCESSORNAMES
Constructor Detail

Verifier

public Verifier(Jar jar)
         throws Exception
Throws:
Exception

Verifier

public Verifier(Jar jar,
                Properties properties)
         throws Exception
Throws:
Exception

Verifier

public Verifier()
Method Detail

verifyNative

public void verifyNative()

doNative

public void doNative(String nc)

verifyFilter

public boolean verifyFilter(String value)

info

public void info()

verify

public void verify()
            throws Exception
Throws:
Exception

verifyActivationPolicy

public boolean verifyActivationPolicy()

verifyActivationPolicy

public boolean verifyActivationPolicy(String policy)

verifyBundleClasspath

public void verifyBundleClasspath()

isBsn

public static boolean isBsn(String name)
Parameters:
name -
Returns:

verifyFilter

public static int verifyFilter(String expr,
                               int index)
         filter ::= ���(��� filter-comp ���)���
         filter-comp ::= and | or | not | operation
         and ::= ���&��� filter-list
         or ::= ���|��� filter-list
         not ::= ���!��� filter
         filter-list ::= filter | filter filter-list
         operation ::= simple | present | substring
         simple ::= attr filter-type value
         filter-type ::= equal | approx | greater | less
         equal ::= ���=���
         approx ::= ���˜=���
         greater ::= ���>=���
         less ::= ���<=���
         present ::= attr ���=*���
         substring ::= attr ���=��� initial any final
         inital ::= () | value
         any ::= ���*��� star-value
         star-value ::= () | value ���*��� star-value
         final ::= () | value
         value ::= <see text>
 

Parameters:
expr -
index -
Returns:

getProperty

public String getProperty(String key,
                          String deflt)
Description copied from class: Processor
Get a property with a proper default

Overrides:
getProperty in class Processor
Returns:

setClassSpace

public void setClassSpace(Map<String,Clazz> classspace,
                          Map<String,Map<String,String>> contained,
                          Map<String,Map<String,String>> referred,
                          Map<String,Set<String>> uses)

isVersion

public static boolean isVersion(String version)

isIdentifier

public static boolean isIdentifier(String value)

isMember

public static boolean isMember(String value,
                               String[] matches)

isFQN

public static boolean isFQN(String name)


Copyright © 2012 aQute SARL. All Rights Reserved.