| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class ElementFilter extends Object
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 Summary | |
---|---|
static List |
constructorsIn(Iterable elements) Returns a list of constructors in . |
static Set |
constructorsIn(Set elements) Returns a set of constructors in . |
static List |
Returns a list of fields in . |
static Set |
Returns a set of fields in . |
static List |
Returns a list of methods in . |
static Set |
Returns a set of methods in . |
static List |
packagesIn(Iterable elements) Returns a list of packages in . |
static Set |
packagesIn(Set elements) Returns a set of packages in . |
static List |
Returns a list of types in . |
static Set |
Returns a set of types in . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static List constructorsIn(Iterable elements)
elements
- the elements to filterpublic static Set constructorsIn(Set elements)
elements
- the elements to filterpublic static List fieldsIn(Iterable elements)
elements
- the elements to filterpublic static Set fieldsIn(Set elements)
elements
- the elements to filterpublic static List methodsIn(Iterable elements)
elements
- the elements to filterpublic static Set methodsIn(Set elements)
elements
- the elements to filterpublic static List packagesIn(Iterable elements)
elements
- the elements to filterpublic static Set packagesIn(Set elements)
elements
- the elements to filterpublic static List typesIn(Iterable elements)
elements
- the elements to filterpublic static Set typesIn(Set elements)
elements
- the elements to filter
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |