public class ElementFilter extends Object
If iterables and sets containing null are passed as
arguments to methods in this class, a 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.*;
...
List<VariableElement> fs = fieldsIn(someClass.getEnclosedElements());
| Modifier and Type | Method and Description |
|---|---|
static List<ExecutableElement> |
constructorsIn(Iterable<? extends Element> elements)
Returns a list of constructors in
elements. |
static Set<ExecutableElement> |
constructorsIn(Set<? extends Element> elements)
Returns a set of constructors in
elements. |
static List<ModuleElement.ExportsDirective> |
exportsIn(Iterable<? extends ModuleElement.Directive> directives)
Returns a list of export directives in
directives. |
static List<VariableElement> |
fieldsIn(Iterable<? extends Element> elements)
Returns a list of fields in
elements. |
static Set<VariableElement> |
fieldsIn(Set<? extends Element> elements)
Returns a set of fields in
elements. |
static List<ExecutableElement> |
methodsIn(Iterable<? extends Element> elements)
Returns a list of methods in
elements. |
static Set<ExecutableElement> |
methodsIn(Set<? extends Element> elements)
Returns a set of methods in
elements. |
static List<ModuleElement> |
modulesIn(Iterable<? extends Element> elements)
Returns a list of modules in
elements. |
static Set<ModuleElement> |
modulesIn(Set<? extends Element> elements)
Returns a set of modules in
elements. |
static List<PackageElement> |
packagesIn(Iterable<? extends Element> elements)
Returns a list of packages in
elements. |
static Set<PackageElement> |
packagesIn(Set<? extends Element> elements)
Returns a set of packages in
elements. |
static List<ModuleElement.ProvidesDirective> |
providesIn(Iterable<? extends ModuleElement.Directive> directives)
Returns a list of provides directives in
directives. |
static List<ModuleElement.RequiresDirective> |
requiresIn(Iterable<? extends ModuleElement.Directive> directives)
Returns a list of requires directives in
directives. |
static List<TypeElement> |
typesIn(Iterable<? extends Element> elements)
Returns a list of types in
elements. |
static Set<TypeElement> |
typesIn(Set<? extends Element> elements)
Returns a set of types in
elements. |
static List<ModuleElement.UsesDirective> |
usesIn(Iterable<? extends ModuleElement.Directive> directives)
Returns a list of uses directives in
directives. |
public static List<VariableElement> fieldsIn(Iterable<? extends Element> elements)
elements.elements - the elements to filterelementspublic static Set<VariableElement> fieldsIn(Set<? extends Element> elements)
elements.elements - the elements to filterelementspublic static List<ExecutableElement> constructorsIn(Iterable<? extends Element> elements)
elements.elements - the elements to filterelementspublic static Set<ExecutableElement> constructorsIn(Set<? extends Element> elements)
elements.elements - the elements to filterelementspublic static List<ExecutableElement> methodsIn(Iterable<? extends Element> elements)
elements.elements - the elements to filterelementspublic static Set<ExecutableElement> methodsIn(Set<? extends Element> elements)
elements.elements - the elements to filterelementspublic static List<TypeElement> typesIn(Iterable<? extends Element> elements)
elements.elements - the elements to filterelementspublic static Set<TypeElement> typesIn(Set<? extends Element> elements)
elements.elements - the elements to filterelementspublic static List<PackageElement> packagesIn(Iterable<? extends Element> elements)
elements.elements - the elements to filterelementspublic static Set<PackageElement> packagesIn(Set<? extends Element> elements)
elements.elements - the elements to filterelementspublic static List<ModuleElement> modulesIn(Iterable<? extends Element> elements)
elements.elements - the elements to filterelementspublic static Set<ModuleElement> modulesIn(Set<? extends Element> elements)
elements.elements - the elements to filterelementspublic static List<ModuleElement.ExportsDirective> exportsIn(Iterable<? extends ModuleElement.Directive> directives)
directives.directives - the directives to filterdirectivespublic static List<ModuleElement.ProvidesDirective> providesIn(Iterable<? extends ModuleElement.Directive> directives)
directives.directives - the directives to filterdirectivespublic static List<ModuleElement.RequiresDirective> requiresIn(Iterable<? extends ModuleElement.Directive> directives)
directives.directives - the directives to filterdirectivespublic static List<ModuleElement.UsesDirective> usesIn(Iterable<? extends ModuleElement.Directive> directives)
directives.directives - the directives to filterdirectives Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-04-14-195246.buildd.src