java.lang.Object
javax.lang.model.util.ElementFilter
public class ElementFilter extends Object
要素のコレクションから目的の要素だけを選択するためのフィルタです。 返されるセットおよびリストは新しいコレクションで、引数をバッキング・ストアとして使用します。 このクラスのメソッドは、引数が並行して変更されないように保護することはありません。 返されるセットおよびリストは可変ですが、並行アクセスに対して安全ではありません。 返されるセットの繰返し順序は、メソッドに設定される引数と同じです。
null
を含む反復可能なオブジェクトおよびセットがこのクラスのメソッドに引数として渡されると、NullPointerException
がスローされます。
- 導入されたバージョン:
- 1.6
-
メソッドのサマリー
修飾子と型メソッド説明static List<ExecutableElement>
constructorsIn
(Iterable<? extends Element> elements) elements
内のコンストラクタのリストを返します。static Set<ExecutableElement>
constructorsIn
(Set<? extends Element> elements) elements
内のコンストラクタのセットを返します。static List<ModuleElement.ExportsDirective>
exportsIn
(Iterable<? extends ModuleElement.Directive> directives) directives
のexports
ディレクティブのリストを返します。static List<VariableElement>
elements
内のフィールドのリストを返します。static Set<VariableElement>
elements
内のフィールドのセットを返します。static List<ExecutableElement>
elements
内のメソッドのリストを返します。static Set<ExecutableElement>
elements
内のメソッドのセットを返します。static List<ModuleElement>
elements
内のモジュールのリストを返します。static Set<ModuleElement>
elements
内のモジュールのセットを返します。static List<ModuleElement.OpensDirective>
opensIn
(Iterable<? extends ModuleElement.Directive> directives) directives
のopens
ディレクティブのリストを返します。static List<PackageElement>
packagesIn
(Iterable<? extends Element> elements) elements
内のパッケージのリストを返します。static Set<PackageElement>
packagesIn
(Set<? extends Element> elements) elements
内のパッケージのセットを返します。static List<ModuleElement.ProvidesDirective>
providesIn
(Iterable<? extends ModuleElement.Directive> directives) directives
のprovides
ディレクティブのリストを返します。static List<RecordComponentElement>
recordComponentsIn
(Iterable<? extends Element> elements) elements
のレコード・コンポーネントのリストを戻します。static Set<RecordComponentElement>
recordComponentsIn
(Set<? extends Element> elements) elements
の一連のレコード・コンポーネントを返します。static List<ModuleElement.RequiresDirective>
requiresIn
(Iterable<? extends ModuleElement.Directive> directives) directives
のrequires
ディレクティブのリストを返します。static List<TypeElement>
elements
のクラスおよびインタフェースのリストを返します。static Set<TypeElement>
elements
内の型のセットを返します。static List<ModuleElement.UsesDirective>
usesIn
(Iterable<? extends ModuleElement.Directive> directives) directives
のuses
ディレクティブのリストを返します。
-
メソッドの詳細
-
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
内のフィールドのセット
-
recordComponentsIn
public static List<RecordComponentElement> recordComponentsIn(Iterable<? extends Element> elements) elements
のレコード・コンポーネントのリストを戻します。- パラメータ:
elements
- フィルタ処理する要素- 戻り値:
elements
のレコード・コンポーネントのリスト- 導入されたバージョン:
- 16
-
recordComponentsIn
public static Set<RecordComponentElement> recordComponentsIn(Set<? extends Element> elements) elements
の一連のレコード・コンポーネントを返します。- パラメータ:
elements
- フィルタ処理する要素- 戻り値:
elements
のレコード・コンポーネントのセット- 導入されたバージョン:
- 16
-
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
-