No cache version.


Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.
javax.lang.model.util

Class 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 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());
     
    Since:
    1.6
    • Method Detail

      • fieldsIn

        public static List<VariableElement> fieldsIn(Iterable<? extends Element> elements)
        Returns a list of fields in elements.
        Parameters:
        elements - the elements to filter
        Returns:
        a list of fields in elements
      • fieldsIn

        public static Set<VariableElement> fieldsIn(Set<? extends Element> elements)
        Returns a set of fields in elements.
        Parameters:
        elements - the elements to filter
        Returns:
        a set of fields in elements
      • constructorsIn

        public static List<ExecutableElement> constructorsIn(Iterable<? extends Element> elements)
        Returns a list of constructors in elements.
        Parameters:
        elements - the elements to filter
        Returns:
        a list of constructors in elements
      • constructorsIn

        public static Set<ExecutableElement> constructorsIn(Set<? extends Element> elements)
        Returns a set of constructors in elements.
        Parameters:
        elements - the elements to filter
        Returns:
        a set of constructors in elements
      • methodsIn

        public static List<ExecutableElement> methodsIn(Iterable<? extends Element> elements)
        Returns a list of methods in elements.
        Parameters:
        elements - the elements to filter
        Returns:
        a list of methods in elements
      • methodsIn

        public static Set<ExecutableElement> methodsIn(Set<? extends Element> elements)
        Returns a set of methods in elements.
        Parameters:
        elements - the elements to filter
        Returns:
        a set of methods in elements
      • typesIn

        public static List<TypeElement> typesIn(Iterable<? extends Element> elements)
        Returns a list of types in elements.
        Parameters:
        elements - the elements to filter
        Returns:
        a list of types in elements
      • typesIn

        public static Set<TypeElement> typesIn(Set<? extends Element> elements)
        Returns a set of types in elements.
        Parameters:
        elements - the elements to filter
        Returns:
        a set of types in elements
      • packagesIn

        public static List<PackageElement> packagesIn(Iterable<? extends Element> elements)
        Returns a list of packages in elements.
        Parameters:
        elements - the elements to filter
        Returns:
        a list of packages in elements
      • packagesIn

        public static Set<PackageElement> packagesIn(Set<? extends Element> elements)
        Returns a set of packages in elements.
        Parameters:
        elements - the elements to filter
        Returns:
        a set of packages in elements

Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-javax/lang/model/util/ElementFilter.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut