- java.lang.Object
- 
- javax.lang.model.util.ElementFilter
 
- 
 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 nullare passed as arguments to methods in this class, aNullPointerExceptionwill be thrown.- Since:
- 1.6
 
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static List<ExecutableElement>constructorsIn(Iterable<? extends Element> elements)Returns a list of constructors inelements.static Set<ExecutableElement>constructorsIn(Set<? extends Element> elements)Returns a set of constructors inelements.static List<ModuleElement.ExportsDirective>exportsIn(Iterable<? extends ModuleElement.Directive> directives)Returns a list ofexportsdirectives indirectives.static List<VariableElement>fieldsIn(Iterable<? extends Element> elements)Returns a list of fields inelements.static Set<VariableElement>fieldsIn(Set<? extends Element> elements)Returns a set of fields inelements.static List<ExecutableElement>methodsIn(Iterable<? extends Element> elements)Returns a list of methods inelements.static Set<ExecutableElement>methodsIn(Set<? extends Element> elements)Returns a set of methods inelements.static List<ModuleElement>modulesIn(Iterable<? extends Element> elements)Returns a list of modules inelements.static Set<ModuleElement>modulesIn(Set<? extends Element> elements)Returns a set of modules inelements.static List<ModuleElement.OpensDirective>opensIn(Iterable<? extends ModuleElement.Directive> directives)Returns a list ofopensdirectives indirectives.static List<PackageElement>packagesIn(Iterable<? extends Element> elements)Returns a list of packages inelements.static Set<PackageElement>packagesIn(Set<? extends Element> elements)Returns a set of packages inelements.static List<ModuleElement.ProvidesDirective>providesIn(Iterable<? extends ModuleElement.Directive> directives)Returns a list ofprovidesdirectives indirectives.static List<ModuleElement.RequiresDirective>requiresIn(Iterable<? extends ModuleElement.Directive> directives)Returns a list ofrequiresdirectives indirectives.static List<TypeElement>typesIn(Iterable<? extends Element> elements)Returns a list of types inelements.static Set<TypeElement>typesIn(Set<? extends Element> elements)Returns a set of types inelements.static List<ModuleElement.UsesDirective>usesIn(Iterable<? extends ModuleElement.Directive> directives)Returns a list ofusesdirectives indirectives.
 
- 
- 
- 
Method Detail- 
fieldsInpublic static List<VariableElement> fieldsIn(Iterable<? extends Element> elements) Returns a list of fields inelements.- Parameters:
- elements- the elements to filter
- Returns:
- a list of fields in elements
 
 - 
fieldsInpublic static Set<VariableElement> fieldsIn(Set<? extends Element> elements) Returns a set of fields inelements.- Parameters:
- elements- the elements to filter
- Returns:
- a set of fields in elements
 
 - 
constructorsInpublic static List<ExecutableElement> constructorsIn(Iterable<? extends Element> elements) Returns a list of constructors inelements.- Parameters:
- elements- the elements to filter
- Returns:
- a list of constructors in elements
 
 - 
constructorsInpublic static Set<ExecutableElement> constructorsIn(Set<? extends Element> elements) Returns a set of constructors inelements.- Parameters:
- elements- the elements to filter
- Returns:
- a set of constructors in elements
 
 - 
methodsInpublic static List<ExecutableElement> methodsIn(Iterable<? extends Element> elements) Returns a list of methods inelements.- Parameters:
- elements- the elements to filter
- Returns:
- a list of methods in elements
 
 - 
methodsInpublic static Set<ExecutableElement> methodsIn(Set<? extends Element> elements) Returns a set of methods inelements.- Parameters:
- elements- the elements to filter
- Returns:
- a set of methods in elements
 
 - 
typesInpublic static List<TypeElement> typesIn(Iterable<? extends Element> elements) Returns a list of types inelements.- Parameters:
- elements- the elements to filter
- Returns:
- a list of types in elements
 
 - 
typesInpublic static Set<TypeElement> typesIn(Set<? extends Element> elements) Returns a set of types inelements.- Parameters:
- elements- the elements to filter
- Returns:
- a set of types in elements
 
 - 
packagesInpublic static List<PackageElement> packagesIn(Iterable<? extends Element> elements) Returns a list of packages inelements.- Parameters:
- elements- the elements to filter
- Returns:
- a list of packages in elements
 
 - 
packagesInpublic static Set<PackageElement> packagesIn(Set<? extends Element> elements) Returns a set of packages inelements.- Parameters:
- elements- the elements to filter
- Returns:
- a set of packages in elements
 
 - 
modulesInpublic static List<ModuleElement> modulesIn(Iterable<? extends Element> elements) Returns a list of modules inelements.- Parameters:
- elements- the elements to filter
- Returns:
- a list of modules in elements
- Since:
- 9
 
 - 
modulesInpublic static Set<ModuleElement> modulesIn(Set<? extends Element> elements) Returns a set of modules inelements.- Parameters:
- elements- the elements to filter
- Returns:
- a set of modules in elements
- Since:
- 9
 
 - 
exportsInpublic static List<ModuleElement.ExportsDirective> exportsIn(Iterable<? extends ModuleElement.Directive> directives) Returns a list ofexportsdirectives indirectives.- Parameters:
- directives- the directives to filter
- Returns:
- a list of exportsdirectives indirectives
- Since:
- 9
 
 - 
opensInpublic static List<ModuleElement.OpensDirective> opensIn(Iterable<? extends ModuleElement.Directive> directives) Returns a list ofopensdirectives indirectives.- Parameters:
- directives- the directives to filter
- Returns:
- a list of opensdirectives indirectives
- Since:
- 9
 
 - 
providesInpublic static List<ModuleElement.ProvidesDirective> providesIn(Iterable<? extends ModuleElement.Directive> directives) Returns a list ofprovidesdirectives indirectives.- Parameters:
- directives- the directives to filter
- Returns:
- a list of providesdirectives indirectives
- Since:
- 9
 
 - 
requiresInpublic static List<ModuleElement.RequiresDirective> requiresIn(Iterable<? extends ModuleElement.Directive> directives) Returns a list ofrequiresdirectives indirectives.- Parameters:
- directives- the directives to filter
- Returns:
- a list of requiresdirectives indirectives
- Since:
- 9
 
 - 
usesInpublic static List<ModuleElement.UsesDirective> usesIn(Iterable<? extends ModuleElement.Directive> directives) Returns a list ofusesdirectives indirectives.- Parameters:
- directives- the directives to filter
- Returns:
- a list of usesdirectives indirectives
- Since:
- 9
 
 
- 
 
-