インタフェースInstanceOfTree

すべてのスーパー・インタフェース:
ExpressionTree, Tree

public interface InstanceOfTree extends ExpressionTree
instanceof式のツリー・ノード。 たとえば:
  expression instanceof type

  expression instanceof pattern
Java言語仕様を参照してください:
「15.20.2 instanceof演算子」
導入されたバージョン:
1.6
  • ネストされたクラスのサマリー

    インタフェースツリーで宣言されたネストされたクラス/インタフェース

    Tree.Kind
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    テストする式を返します。
    テスト済パターンを返します。このinstanceofでパターンが使用されていない場合はnullを返します。
    チェックするタイプを返します。このinstanceofBindingPatternTree以外のパターンを使用する場合はnullを返します。

    インタフェースツリーで宣言されたメソッド

    accept, getKind
  • メソッドの詳細

    • getExpression

      ExpressionTree getExpression()
      テストする式を返します。
      戻り値:
      表現
    • getType

      Tree getType()
      チェックするタイプを返します。このinstanceofBindingPatternTree以外のパターンを使用する場合はnullを返します。

      パターンなしのinstanceofの場合(つまり、次の形式):

        expression instanceof type
      
      型を返します。

      BindingPatternTreeを含むinstanceofの場合(つまり、次の形式)。

        expression instanceof type variable_name
      
      型を返します。

      次の形式のようなパターンの場合:

        expression instanceof pattern
      
      nullを返します。

      戻り値:
      このinstanceofBindingPatternTree以外のパターンを使用する場合は、型またはnull
      関連項目:
    • getPattern

      PatternTree getPattern()
      テスト済パターンを返します。このinstanceofでパターンが使用されていない場合はnullを返します。

      次の形式のようなパターンの場合:

        expression instanceof pattern
      
      パターンを返します。

      パターンなしのinstanceofの場合(つまり、次の形式):

        expression instanceof type
      
      nullを返します。

      戻り値:
      テスト済パターン。このinstanceofでパターンを使用しない場合はnull
      導入されたバージョン:
      16