モジュール java.compiler
パッケージ javax.lang.model.util

クラスElementFilter


  • public class ElementFilter
    extends Object
    要素のコレクションから目的の要素だけを選択するためのフィルタです。 返されるセットおよびリストは新しいコレクションで、引数をバッキング・ストアとして使用します。 このクラスのメソッドは、引数が並行して変更されないように保護することはありません。 返されるセットおよびリストは可変ですが、並行アクセスに対して安全ではありません。 返されるセットの繰返し順序は、メソッドに設定される引数と同じです。

    nullを含む反復可能なオブジェクトおよびセットがこのクラスのメソッドに引数として渡されると、NullPointerExceptionがスローされます。

    導入されたバージョン:
    1.6
    • メソッドの詳細

      • fieldsIn

        public static List<VariableElement> fieldsIn​(Iterable<? extends Element> elements)
        elements内のフィールドのリストを返します。
        パラメータ:
        elements - フィルタ処理する要素
        戻り値:
        elements内のフィールドのリスト
      • fieldsIn

        public static Set<VariableElement> fieldsIn​(Set<? extends Element> elements)
        elements内のフィールドのセットを返します。
        パラメータ:
        elements - フィルタ処理する要素
        戻り値:
        elements内のフィールドのセット
      • constructorsIn

        public static List<ExecutableElement> constructorsIn​(Iterable<? extends Element> elements)
        elements内のコンストラクタのリストを返します。
        パラメータ:
        elements - フィルタ処理する要素
        戻り値:
        elements内のコンストラクタのリスト
      • constructorsIn

        public static Set<ExecutableElement> constructorsIn​(Set<? extends Element> elements)
        elements内のコンストラクタのセットを返します。
        パラメータ:
        elements - フィルタ処理する要素
        戻り値:
        elements内のコンストラクタのセット
      • methodsIn

        public static List<ExecutableElement> methodsIn​(Iterable<? extends Element> elements)
        elements内のメソッドのリストを返します。
        パラメータ:
        elements - フィルタ処理する要素
        戻り値:
        elements内のメソッドのリスト
      • methodsIn

        public static Set<ExecutableElement> methodsIn​(Set<? extends Element> elements)
        elements内のメソッドのセットを返します。
        パラメータ:
        elements - フィルタ処理する要素
        戻り値:
        elements内のメソッドのセット
      • typesIn

        public static List<TypeElement> typesIn​(Iterable<? extends Element> elements)
        elements内の型のリストを返します。
        パラメータ:
        elements - フィルタ処理する要素
        戻り値:
        elements内の型のリスト
      • typesIn

        public static Set<TypeElement> typesIn​(Set<? extends Element> elements)
        elements内の型のセットを返します。
        パラメータ:
        elements - フィルタ処理する要素
        戻り値:
        elements内の型のセット
      • packagesIn

        public static List<PackageElement> packagesIn​(Iterable<? extends Element> elements)
        elements内のパッケージのリストを返します。
        パラメータ:
        elements - フィルタ処理する要素
        戻り値:
        elements内のパッケージのリスト
      • packagesIn

        public static Set<PackageElement> packagesIn​(Set<? extends Element> elements)
        elements内のパッケージのセットを返します。
        パラメータ:
        elements - フィルタ処理する要素
        戻り値:
        elements内のパッケージのセット
      • modulesIn

        public static List<ModuleElement> modulesIn​(Iterable<? extends Element> elements)
        elements内のモジュールのリストを返します。
        パラメータ:
        elements - フィルタ処理する要素
        戻り値:
        elements内のモジュールのリスト
        導入されたバージョン:
        9
      • modulesIn

        public static Set<ModuleElement> modulesIn​(Set<? extends Element> elements)
        elements内のモジュールのセットを返します。
        パラメータ:
        elements - フィルタ処理する要素
        戻り値:
        elements内のモジュールのセット
        導入されたバージョン:
        9
      • exportsIn

        public static List<ModuleElement.ExportsDirective> exportsIn​(Iterable<? extends ModuleElement.Directive> directives)
        directives内のexportsディレクティブのリストを返します。
        パラメータ:
        directives - フィルタするディレクティブ
        戻り値:
        directives内のexportsディレクティブのリスト
        導入されたバージョン:
        9
      • opensIn

        public static List<ModuleElement.OpensDirective> opensIn​(Iterable<? extends ModuleElement.Directive> directives)
        directives内のopensディレクティブのリストを返します。
        パラメータ:
        directives - フィルタするディレクティブ
        戻り値:
        directives内のopensディレクティブのリスト
        導入されたバージョン:
        9
      • providesIn

        public static List<ModuleElement.ProvidesDirective> providesIn​(Iterable<? extends ModuleElement.Directive> directives)
        directives内のprovidesディレクティブのリストを返します。
        パラメータ:
        directives - フィルタするディレクティブ
        戻り値:
        directives内のprovidesディレクティブのリスト
        導入されたバージョン:
        9
      • requiresIn

        public static List<ModuleElement.RequiresDirective> requiresIn​(Iterable<? extends ModuleElement.Directive> directives)
        directives内のrequiresディレクティブのリストを返します。
        パラメータ:
        directives - フィルタするディレクティブ
        戻り値:
        directives内のrequiresディレクティブのリスト
        導入されたバージョン:
        9
      • usesIn

        public static List<ModuleElement.UsesDirective> usesIn​(Iterable<? extends ModuleElement.Directive> directives)
        directives内のusesディレクティブのリストを返します。
        パラメータ:
        directives - フィルタするディレクティブ
        戻り値:
        directives内のusesディレクティブのリスト
        導入されたバージョン:
        9