Package org.osgi.service.repository
Interface ExpressionCombiner
-
@ProviderType public interface ExpressionCombiner
AnExpressionCombiner
can be used to combine requirement expressions into a single complex requirement expression using theand
,or
andnot
operators.- Since:
- 1.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AndExpression
and(RequirementExpression expr1, RequirementExpression expr2)
Combine twoRequirementExpression
s into a requirement expression using theand
operator.AndExpression
and(RequirementExpression expr1, RequirementExpression expr2, RequirementExpression... moreExprs)
Combine multipleRequirementExpression
s into a requirement expression using theand
operator.IdentityExpression
identity(org.osgi.resource.Requirement req)
Wrap aRequirement
in anIdentityExpression
.NotExpression
not(RequirementExpression expr)
Return the negation of aRequirementExpression
.OrExpression
or(RequirementExpression expr1, RequirementExpression expr2)
Combine twoRequirementExpression
s into a requirement expression using theor
operator.OrExpression
or(RequirementExpression expr1, RequirementExpression expr2, RequirementExpression... moreExprs)
Combine multipleRequirementExpression
s into a requirement expression using theor
operator.
-
-
-
Method Detail
-
and
AndExpression and(RequirementExpression expr1, RequirementExpression expr2)
Combine twoRequirementExpression
s into a requirement expression using theand
operator.- Parameters:
expr1
- The first requirement expression to combine into the returned requirement expression.expr2
- The second requirement expression to combine into the returned requirement expression- Returns:
- An
AndExpression
representing anand
of the specified requirement expressions.
-
and
AndExpression and(RequirementExpression expr1, RequirementExpression expr2, RequirementExpression... moreExprs)
Combine multipleRequirementExpression
s into a requirement expression using theand
operator.- Parameters:
expr1
- The first requirement expression to combine into the returned requirement expression.expr2
- The second requirement expression to combine into the returned requirement expressionmoreExprs
- Optional, additional requirement expressions to combine into the returned requirement expression.- Returns:
- An
AndExpression
representing anand
of the specified requirement expressions.
-
identity
IdentityExpression identity(org.osgi.resource.Requirement req)
Wrap aRequirement
in anIdentityExpression
. This can be useful when working with a combination ofRequirement
s andRequirementExpresion
s.- Parameters:
req
- The requirement to wrap in a requirement expression.- Returns:
- An
IdentityExpression
representing the specified requirement.
-
not
NotExpression not(RequirementExpression expr)
Return the negation of aRequirementExpression
.- Parameters:
expr
- The requirement expression to negate.- Returns:
- A
NotExpression
representing thenot
of the specified requirement expression.
-
or
OrExpression or(RequirementExpression expr1, RequirementExpression expr2)
Combine twoRequirementExpression
s into a requirement expression using theor
operator.- Parameters:
expr1
- The first requirement expression to combine into the returned requirement expression.expr2
- The second requirement expression to combine into the returned requirement expression- Returns:
- An
OrExpression
representing anor
of the specified requirement expressions.
-
or
OrExpression or(RequirementExpression expr1, RequirementExpression expr2, RequirementExpression... moreExprs)
Combine multipleRequirementExpression
s into a requirement expression using theor
operator.- Parameters:
expr1
- The first requirement expression to combine into the returned requirement expression.expr2
- The second requirement expression to combine into the returned requirement expressionmoreExprs
- Optional, additional requirement expressions to combine into the returned requirement expression.- Returns:
- An
OrExpression
representing anor
of the specified requirement expressions.
-
-