Package Summary  Overview Summary

class:ElementFilter [CHANGED]



  • public class ElementFilter
    extends java.lang.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


  • public class ElementFilter
    extends java.lang.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


  • public class ElementFilter
    extends java.lang.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.

    Since:
    1.6

method:fieldsIn(java.lang.Iterable) [NONE]

  • fieldsIn

    public static java.util.List<javax.lang.model.element.VariableElement> fieldsIn(java.lang.Iterable<? extends Element> elements)
    Returns a list of fields in elements.
    Parameters:
    elements - the elements to filter
    Returns:
    a list of fields in elements

method:fieldsIn(java.util.Set) [NONE]

  • fieldsIn

    public static java.util.Set<javax.lang.model.element.VariableElement> fieldsIn(java.util.Set<? extends Element> elements)
    Returns a set of fields in elements.
    Parameters:
    elements - the elements to filter
    Returns:
    a set of fields in elements

method:constructorsIn(java.lang.Iterable) [NONE]

  • constructorsIn

    public static java.util.List<javax.lang.model.element.ExecutableElement> constructorsIn(java.lang.Iterable<? extends Element> elements)
    Returns a list of constructors in elements.
    Parameters:
    elements - the elements to filter
    Returns:
    a list of constructors in elements

method:constructorsIn(java.util.Set) [NONE]

  • constructorsIn

    public static java.util.Set<javax.lang.model.element.ExecutableElement> constructorsIn(java.util.Set<? extends Element> elements)
    Returns a set of constructors in elements.
    Parameters:
    elements - the elements to filter
    Returns:
    a set of constructors in elements

method:methodsIn(java.lang.Iterable) [NONE]

  • methodsIn

    public static java.util.List<javax.lang.model.element.ExecutableElement> methodsIn(java.lang.Iterable<? extends Element> elements)
    Returns a list of methods in elements.
    Parameters:
    elements - the elements to filter
    Returns:
    a list of methods in elements

method:methodsIn(java.util.Set) [NONE]

  • methodsIn

    public static java.util.Set<javax.lang.model.element.ExecutableElement> methodsIn(java.util.Set<? extends Element> elements)
    Returns a set of methods in elements.
    Parameters:
    elements - the elements to filter
    Returns:
    a set of methods in elements

method:typesIn(java.lang.Iterable) [NONE]

  • typesIn

    public static java.util.List<javax.lang.model.element.TypeElement> typesIn(java.lang.Iterable<? extends Element> elements)
    Returns a list of types in elements.
    Parameters:
    elements - the elements to filter
    Returns:
    a list of types in elements

method:typesIn(java.util.Set) [NONE]

  • typesIn

    public static java.util.Set<javax.lang.model.element.TypeElement> typesIn(java.util.Set<? extends Element> elements)
    Returns a set of types in elements.
    Parameters:
    elements - the elements to filter
    Returns:
    a set of types in elements

method:packagesIn(java.lang.Iterable) [NONE]

  • packagesIn

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

method:packagesIn(java.util.Set) [NONE]

  • packagesIn

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

method:modulesIn(java.lang.Iterable) [ADDED]

  • modulesIn

    public static java.util.List<ModuleElement> modulesIn(java.lang.Iterable<? extends Element> elements)
    
    Returns a list of modules in elements.
    Parameters:
    elements - the elements to filter
    Returns:
    a list of modules in elements
    Since:
    9

method:modulesIn(java.util.Set) [ADDED]

  • modulesIn

    public static java.util.Set<ModuleElement> modulesIn(java.util.Set<? extends Element> elements)
    
    Returns a set of modules in elements.
    Parameters:
    elements - the elements to filter
    Returns:
    a set of modules in elements
    Since:
    9

method:exportsIn(java.lang.Iterable) [ADDED]

  • exportsIn

    public static java.util.List<ModuleElement.ExportsDirective> exportsIn(java.lang.Iterable<? extends ModuleElement.Directive> directives)
    
    Returns a list of exports directives in directives.
    Parameters:
    directives - the directives to filter
    Returns:
    a list of exports directives in directives
    Since:
    9

method:opensIn(java.lang.Iterable) [ADDED]

  • opensIn

    public static java.util.List<ModuleElement.OpensDirective> opensIn(java.lang.Iterable<? extends ModuleElement.Directive> directives)
    
    Returns a list of opens directives in directives.
    Parameters:
    directives - the directives to filter
    Returns:
    a list of opens directives in directives
    Since:
    9

method:providesIn(java.lang.Iterable) [ADDED]

  • providesIn

    public static java.util.List<ModuleElement.ProvidesDirective> providesIn(java.lang.Iterable<? extends ModuleElement.Directive> directives)
    
    Returns a list of provides directives in directives.
    Parameters:
    directives - the directives to filter
    Returns:
    a list of provides directives in directives
    Since:
    9

method:requiresIn(java.lang.Iterable) [ADDED]

  • requiresIn

    public static java.util.List<ModuleElement.RequiresDirective> requiresIn(java.lang.Iterable<? extends ModuleElement.Directive> directives)
    
    Returns a list of requires directives in directives.
    Parameters:
    directives - the directives to filter
    Returns:
    a list of requires directives in directives
    Since:
    9

method:usesIn(java.lang.Iterable) [ADDED]

  • usesIn

    public static java.util.List<ModuleElement.UsesDirective> usesIn(java.lang.Iterable<? extends ModuleElement.Directive> directives)
    
    Returns a list of uses directives in directives.
    Parameters:
    directives - the directives to filter
    Returns:
    a list of uses directives in directives
    Since:
    9