public class BundleLocationCondition
extends java.lang.Object
Pattern matching is done according to the filter string matching rules.
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.
|
public static Condition getCondition(Bundle bundle, ConditionInfo info)
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.Copyright © OSGi Alliance (2000, 2020). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0