インタフェースConvertInstruction

すべてのスーパー・インタフェース:
ClassFileElement, CodeElement, Instruction

public sealed interface ConvertInstruction extends Instruction
i2lなどのCode属性のcode配列のプリミティブ変換命令をモデル化します。 対応するopcodesのkindOpcode.Kind.CONVERTです。 CodeModelの要素をトラバースするときに、CodeElementとして提供されます。

プリミティブ変換命令はコンポジットです:

ConvertInstruction(
    TypeKind fromType,
    TypeKind toType
)
これらの変換が有効である場合:
  • int, long, floatdoubleの間(fromType != toType ;)
  • intからbytecharおよびshortまで。

導入されたバージョン:
24
関連項目:
  • メソッドの詳細

    • fromType

      TypeKind fromType()
      変換元のソース・タイプを返します。
      戻り値:
      変換元のソース・タイプ
    • toType

      TypeKind toType()
      変換先の宛先タイプを返します。
      戻り値:
      変換先の宛先タイプ
    • of

      static ConvertInstruction of(TypeKind fromType, TypeKind toType)
      変換命令を返します。 有効な変換は次のとおりです:
      • int, long, floatdoubleの間(fromType != toType ;)
      • intからbytecharおよびshortまで。
      パラメータ:
      fromType - 変換元の型
      toType - 変換先の型
      戻り値:
      変換命令
      スロー:
      IllegalArgumentException - これが有効な変換でない場合
    • of

      static ConvertInstruction of(Opcode op)
      変換命令を返します。
      パラメータ:
      op - 特定のタイプの変換命令のopcode。Opcode.Kind.CONVERTの種類である必要があります
      戻り値:
      変換命令
      スロー:
      IllegalArgumentException - opcodeの種類がOpcode.Kind.CONVERTでない場合。