Interface ExpressionCombiner


  • @ProviderType
    public interface ExpressionCombiner
    An ExpressionCombiner can be used to combine requirement expressions into a single complex requirement expression using the and, or and not operators.
    Since:
    1.1
    • Method Detail

      • and

        AndExpression and​(RequirementExpression expr1,
                          RequirementExpression expr2)
        Combine two RequirementExpressions into a requirement expression using the and 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 an and of the specified requirement expressions.
      • and

        AndExpression and​(RequirementExpression expr1,
                          RequirementExpression expr2,
                          RequirementExpression... moreExprs)
        Combine multiple RequirementExpressions into a requirement expression using the and 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
        moreExprs - Optional, additional requirement expressions to combine into the returned requirement expression.
        Returns:
        An AndExpression representing an and of the specified requirement expressions.
      • identity

        IdentityExpression identity​(org.osgi.resource.Requirement req)
        Wrap a Requirement in an IdentityExpression. This can be useful when working with a combination of Requirements and RequirementExpresions.
        Parameters:
        req - The requirement to wrap in a requirement expression.
        Returns:
        An IdentityExpression representing the specified requirement.
      • or

        OrExpression or​(RequirementExpression expr1,
                        RequirementExpression expr2)
        Combine two RequirementExpressions into a requirement expression using the or 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 an or of the specified requirement expressions.
      • or

        OrExpression or​(RequirementExpression expr1,
                        RequirementExpression expr2,
                        RequirementExpression... moreExprs)
        Combine multiple RequirementExpressions into a requirement expression using the or 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
        moreExprs - Optional, additional requirement expressions to combine into the returned requirement expression.
        Returns:
        An OrExpression representing an or of the specified requirement expressions.