Class Verifier

All Implemented Interfaces:
Constants, Registry, aQute.service.reporter.Report, aQute.service.reporter.Reporter, Closeable, AutoCloseable, Iterable<String>

public class Verifier extends Processor
  • Field Details

    • EES

      public static final String[] EES
    • ReservedFileNames

      public static final Pattern ReservedFileNames
    • TOKEN

      public static final Pattern TOKEN
    • EXTENDED_S

      public static final String EXTENDED_S
      See Also:
    • EXTENDED_P

      public static final Pattern EXTENDED_P
    • QUOTEDSTRING

      public static final String QUOTEDSTRING
      See Also:
    • QUOTEDSTRING_P

      public static final Pattern QUOTEDSTRING_P
    • ARGUMENT_S

      public static final String ARGUMENT_S
      See Also:
    • ARGUMENT_P

      public static final Pattern ARGUMENT_P
    • SYMBOLICNAME_STRING

      public static final String SYMBOLICNAME_STRING
      See Also:
    • SYMBOLICNAME

      public static final Pattern SYMBOLICNAME
    • VERSION_STRING

      public static final String VERSION_STRING
      See Also:
    • VERSION_S

      public static final String VERSION_S
      See Also:
    • VERSION

      public static final Pattern VERSION
    • VERSION_P

      public static final Pattern VERSION_P
    • VERSIONRANGE

      public static final Pattern VERSIONRANGE
    • VERSION_RANGE_S

      public static final String VERSION_RANGE_S
      See Also:
    • VERSIONRANGE_P

      public static final Pattern VERSIONRANGE_P
    • ISO639

      public static final Pattern ISO639
    • HEADER_PATTERN

      public static final Pattern HEADER_PATTERN
    • NUMBERPATTERN

      public static final Pattern NUMBERPATTERN
    • FLOATPATTERN

      public static final Pattern FLOATPATTERN
    • BOOLEANPATTERN

      public static final Pattern BOOLEANPATTERN
    • PACKAGEPATTERN

      public static final Pattern PACKAGEPATTERN
    • PACKAGEPATTERN_OR_EMPTY

      public static final Pattern PACKAGEPATTERN_OR_EMPTY
    • MULTIPACKAGEPATTERN

      public static final Pattern MULTIPACKAGEPATTERN
    • 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
    • OSNAMES

      public static final String[] OSNAMES
    • PROCESSORNAMES

      public static final String[] PROCESSORNAMES
  • Constructor Details

  • Method Details

    • verifyNative

      public void verifyNative()
    • doNative

      public void doNative(String nc)
    • verifyFilter

      public boolean verifyFilter(String value)
    • validateFilter

      public static String validateFilter(String value)
    • 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 - the String to test
      Returns:
      true if the given name matches a Bundle Symbolic Name, otherwise false
    • 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 - the String to test
      index - the index within expr to start with
      Returns:
      the index of the last character within expr that was evaluated
    • 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)
    • verifyChecksums

      public void verifyChecksums(boolean all) throws Exception
      Verify the checksums from the manifest against the real thing.
      Parameters:
      all - true if each resource must be digested, otherwise false
      Throws:
      Exception
    • isExtended

      public static boolean isExtended(String key)
      Verify the EXTENDED_S syntax
      Parameters:
      key - the String to test
      Returns:
      true if the given String matches the EXTENDED_S syntax, otherwise false
    • isArgument

      public static boolean isArgument(String arg)
      Verify the ARGUMENT_S syntax
      Parameters:
      arg - the String to test
      Returns:
      true if the given String matches the ARGUMENT_S syntax, otherwise false
    • isQuotedString

      public static boolean isQuotedString(String s)
      Verify the QUOTEDSTRING syntax
      Parameters:
      s - the String to test
      Returns:
      true if the given String matches the QUOTEDSTRING syntax, otherwise false
    • isVersionRange

      public static boolean isVersionRange(String range)
      Verify the VERSION_RANGE_S syntax
      Parameters:
      range - the String to test
      Returns:
      true if the given String matches the VERSION_RANGE_S syntax, otherwise false
    • verifyMetaPersistence

      public void verifyMetaPersistence() throws Exception
      Verify the Meta-Persistence header
      Throws:
      Exception
    • isFrombuilder

      public boolean isFrombuilder()
      Returns:
      the frombuilder
    • setFrombuilder

      public void setFrombuilder(boolean frombuilder)
      Parameters:
      frombuilder - the frombuilder to set
    • isNumber

      public static boolean isNumber(String number)
    • isSpaceSeparated

      public static boolean isSpaceSeparated(String r)
      The -runvm header is often wrongly used as a space separated header instead of a properties. This checks if a header uses commas to separate the parts or spaces.
      Parameters:
      r - a header
      Returns:
      true if spaces are used for separation, false if 1 parameter or commas used