Save This Page
Home » Open-JDK-6.b17-src » javax.lang » model » util » [javadoc | source]
javax.lang.model.util
public class: ElementFilter [javadoc | source]
java.lang.Object
   javax.lang.model.util.ElementFilter
Filters for selecting just the elements of interest from a collection of elements. The returned sets and lists are new collections and do use the argument as a backing store. The methods in this class do not make any attempts to guard against concurrent modifications of the arguments. The returned sets and lists are mutable but unsafe for concurrent access. A returned set has the same iteration order as the argument set to a method.

If iterables and sets containing {@code null} are passed as arguments to methods in this class, a {@code NullPointerException} will be thrown.

Note that a static import statement can make the text of calls to the methods in this class more concise; for example:

    import static javax.lang.model.util.ElementFilter.*;
    ...
        {@code List} fs = fieldsIn(someClass.getEnclosedElements());
Method from javax.lang.model.util.ElementFilter Summary:
constructorsIn,   constructorsIn,   fieldsIn,   fieldsIn,   methodsIn,   methodsIn,   packagesIn,   packagesIn,   typesIn,   typesIn
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.lang.model.util.ElementFilter Detail:
 public static List<ExecutableElement> constructorsIn(Iterable<Element> elements) 
    Returns a list of constructors in {@code elements}.
 public static Set<ExecutableElement> constructorsIn(Set<Element> elements) 
    Returns a set of constructors in {@code elements}.
 public static List<VariableElement> fieldsIn(Iterable<Element> elements) 
    Returns a list of fields in {@code elements}.
 public static Set<VariableElement> fieldsIn(Set<Element> elements) 
    Returns a set of fields in {@code elements}.
 public static List<ExecutableElement> methodsIn(Iterable<Element> elements) 
    Returns a list of methods in {@code elements}.
 public static Set<ExecutableElement> methodsIn(Set<Element> elements) 
    Returns a set of methods in {@code elements}.
 public static List<PackageElement> packagesIn(Iterable<Element> elements) 
    Returns a list of packages in {@code elements}.
 public static Set<PackageElement> packagesIn(Set<Element> elements) 
    Returns a set of packages in {@code elements}.
 public static List<TypeElement> typesIn(Iterable<Element> elements) 
    Returns a list of types in {@code elements}.
 public static Set<TypeElement> typesIn(Set<Element> elements) 
    Returns a set of types in {@code elements}.