BundleLocationCondition
Date: 2016-06-24

org.osgi.service.condpermadmin

## Class BundleLocationCondition

- java.lang.Object
- - org.osgi.service.condpermadmin.BundleLocationCondition

-     public class BundleLocationCondition
      extends java.lang.Object

  Condition to test if the location of a bundle matches or does not match a pattern. Since the bundle's location cannot be changed, this condition is immutable.

  Pattern matching is done according to the filter string matching rules.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Condition` | `getCondition(Bundle bundle, ConditionInfo info)` Constructs a condition that tries to match the passed Bundle's location to the location pattern.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getCondition

          public static Condition getCondition(Bundle bundle,
                               ConditionInfo info)

      Constructs a condition that tries to match the passed Bundle's location to the location pattern.
      Parameters:
        `bundle` - The Bundle being evaluated.
        `info` - The ConditionInfo from which to construct the condition. The ConditionInfo must specify one or two arguments. The first argument of the ConditionInfo specifies the location pattern against which to match the bundle location. Matching is done according to the filter string matching rules. Any '*' characters in the first argument are used as wildcards when matching bundle locations unless they are escaped with a '\' character. The Condition is satisfied if the bundle location matches the pattern. The second argument of the ConditionInfo is optional. If a second argument is present and equal to "!", then the satisfaction of the Condition is negated. That is, the Condition is satisfied if the bundle location does NOT match the pattern. If the second argument is present but does not equal "!", then the second argument is ignored.
      Returns:
        Condition object for the requested condition.