public class ElementFilter extends Object
If iterables or sets containing null
are passed as arguments to methods in this class, a NullPointerException
will be thrown.
Modifier and Type | Method | Description |
---|---|---|
static List |
constructorsIn |
Returns a list of constructors in elements . |
static Set |
constructorsIn |
Returns a set of constructors in elements . |
static List |
exportsIn |
Returns a list of exports directives in directives . |
static List |
fieldsIn |
Returns a list of fields in elements . |
static Set |
fieldsIn |
Returns a set of fields in elements . |
static List |
methodsIn |
Returns a list of methods in elements . |
static Set |
methodsIn |
Returns a set of methods in elements . |
static List |
modulesIn |
Returns a list of modules in elements . |
static Set |
modulesIn |
Returns a set of modules in elements . |
static List |
opensIn |
Returns a list of opens directives in directives . |
static List |
packagesIn |
Returns a list of packages in elements . |
static Set |
packagesIn |
Returns a set of packages in elements . |
static List |
providesIn |
Returns a list of provides directives in directives . |
static List |
recordComponentsIn |
Returns a list of record components in elements . |
static Set |
recordComponentsIn |
Returns a set of record components in elements . |
static List |
requiresIn |
Returns a list of requires directives in directives . |
static List |
typesIn |
Returns a list of classes and interfaces in elements . |
static Set |
typesIn |
Returns a set of types in elements . |
static List |
usesIn |
Returns a list of uses directives in directives . |
public static List<VariableElement> fieldsIn(Iterable<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static Set<VariableElement> fieldsIn(Set<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static List<RecordComponentElement> recordComponentsIn(Iterable<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static Set<RecordComponentElement> recordComponentsIn(Set<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static List<ExecutableElement> constructorsIn(Iterable<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static Set<ExecutableElement> constructorsIn(Set<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static List<ExecutableElement> methodsIn(Iterable<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static Set<ExecutableElement> methodsIn(Set<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static List<TypeElement> typesIn(Iterable<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static Set<TypeElement> typesIn(Set<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static List<PackageElement> packagesIn(Iterable<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static Set<PackageElement> packagesIn(Set<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static List<ModuleElement> modulesIn(Iterable<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static Set<ModuleElement> modulesIn(Set<? extends Element> elements)
elements
.elements
- the elements to filterelements
public static List<ModuleElement.ExportsDirective> exportsIn(Iterable<? extends ModuleElement.Directive> directives)
exports
directives in directives
.directives
- the directives to filterexports
directives in directives
public static List<ModuleElement.OpensDirective> opensIn(Iterable<? extends ModuleElement.Directive> directives)
opens
directives in directives
.directives
- the directives to filteropens
directives in directives
public static List<ModuleElement.ProvidesDirective> providesIn(Iterable<? extends ModuleElement.Directive> directives)
provides
directives in directives
.directives
- the directives to filterprovides
directives in directives
public static List<ModuleElement.RequiresDirective> requiresIn(Iterable<? extends ModuleElement.Directive> directives)
requires
directives in directives
.directives
- the directives to filterrequires
directives in directives
public static List<ModuleElement.UsesDirective> usesIn(Iterable<? extends ModuleElement.Directive> directives)
uses
directives in directives
.directives
- the directives to filteruses
directives in directives
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.compiler/javax/lang/model/util/ElementFilter.html