|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.common.collect.testing.features.FeatureUtil
public class FeatureUtil
Utilities for collecting and validating tester requirements from annotations.
This class can be referenced in GWT tests.
Constructor Summary | |
---|---|
FeatureUtil()
|
Method Summary | ||
---|---|---|
static Set<Feature<?>> |
addImpliedFeatures(Set<Feature<?>> features)
Given a set of features, add to it all the features directly or indirectly implied by any of them, and return it. |
|
static TesterRequirements |
buildDeclaredTesterRequirements(AnnotatedElement classOrMethod)
Construct the set of requirements specified by annotations directly on a tester class or method. |
|
static Iterable<Annotation> |
getTesterAnnotations(AnnotatedElement classOrMethod)
Find all the tester annotations declared on a tester class or method. |
|
static TesterRequirements |
getTesterRequirements(Class<?> testerClass)
Get the full set of requirements for a tester class. |
|
static TesterRequirements |
getTesterRequirements(Method testerMethod)
Get the full set of requirements for a tester class. |
|
static Set<Feature<?>> |
impliedFeatures(Set<Feature<?>> features)
Given a set of features, return a new set of all features directly or indirectly implied by any of them. |
|
static
|
intersection(Set<? extends T>... sets)
Construct a new Set that is the intersection
of all the given sets. |
|
static
|
intersection(Set<? extends T> set1,
Set<? extends T> set2)
Construct a new Set that is the intersection
of the given sets. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FeatureUtil()
Method Detail |
---|
public static Set<Feature<?>> addImpliedFeatures(Set<Feature<?>> features)
features
- the set of features to expand
public static Set<Feature<?>> impliedFeatures(Set<Feature<?>> features)
features
- the set of features whose implications to find
public static TesterRequirements getTesterRequirements(Class<?> testerClass) throws ConflictingRequirementsException
testerClass
- a tester class
ConflictingRequirementsException
- if the requirements are mutually
inconsistent.public static TesterRequirements getTesterRequirements(Method testerMethod) throws ConflictingRequirementsException
testerMethod
- a test method of a tester class
ConflictingRequirementsException
- if the requirements are
mutually inconsistent.public static TesterRequirements buildDeclaredTesterRequirements(AnnotatedElement classOrMethod) throws ConflictingRequirementsException
classOrMethod
- a tester class or a test method thereof
ConflictingRequirementsException
- if the requirements are mutually
inconsistent.public static Iterable<Annotation> getTesterAnnotations(AnnotatedElement classOrMethod)
classOrMethod
- a class or method whose tester annotations to find
public static <T> Set<T> intersection(Set<? extends T> set1, Set<? extends T> set2)
Set
that is the intersection
of the given sets.
public static <T> Set<T> intersection(Set<? extends T>... sets)
Set
that is the intersection
of all the given sets.
sets
- the sets to intersect
IllegalArgumentException
- if there are no sets to
intersect
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |