クラスElementFilter
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
-