org.apache.felix.ipojo.manipulator.spi.helper
Class Predicates

java.lang.Object
  extended by org.apache.felix.ipojo.manipulator.spi.helper.Predicates

public class Predicates
extends java.lang.Object

Ready-to-use Predicate implementations.

Author:
Felix Project Team

Nested Class Summary
static class Predicates.Matcher
           
static class Predicates.Node
           
static class Predicates.Reference
           
 
Constructor Summary
Predicates()
           
 
Method Summary
static Predicate alwaysTrue()
          Always return true.
static Predicate and(Predicate... predicates)
          Successful if all given predicates are satisfied.
static Predicates.Node node()
           
static Predicate on(java.lang.annotation.ElementType type)
          Restrict to the given ElementType.
static Predicate onlySupportedElements(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Restrict to the supported ElementType(s) of the annotation (use the @Target, if provided).
static Predicate or(java.util.Collection<Predicate> predicates)
          Successful if at least one of the given predicates is satisfied.
static Predicate or(Predicate... predicates)
          Successful if at least one of the given predicates is satisfied.
static Predicates.Matcher pattern(java.lang.String regex)
           
static Predicates.Reference reference(java.lang.String refId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Predicates

public Predicates()
Method Detail

node

public static Predicates.Node node()

reference

public static Predicates.Reference reference(java.lang.String refId)

pattern

public static Predicates.Matcher pattern(java.lang.String regex)

on

public static Predicate on(java.lang.annotation.ElementType type)
Restrict to the given ElementType.

Parameters:
type - expected ElementType

alwaysTrue

public static Predicate alwaysTrue()
Always return true.


and

public static Predicate and(Predicate... predicates)
Successful if all given predicates are satisfied.

Parameters:
predicates - predicates to be satisfied

or

public static Predicate or(java.util.Collection<Predicate> predicates)
Successful if at least one of the given predicates is satisfied.

Parameters:
predicates - predicates to be satisfied (at least one)

or

public static Predicate or(Predicate... predicates)
Successful if at least one of the given predicates is satisfied.

Parameters:
predicates - predicates to be satisfied (at least one)

onlySupportedElements

public static Predicate onlySupportedElements(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Restrict to the supported ElementType(s) of the annotation (use the @Target, if provided).

Parameters:
annotationType - annotation to explore


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.