インタフェースConvertInstruction
- すべてのスーパー・インタフェース:
ClassFileElement,CodeElement,Instruction
public sealed interface ConvertInstruction extends Instruction
i2lなどのCode属性のcode配列のプリミティブ変換命令をモデル化します。 対応するopcodesのkindはOpcode.Kind.CONVERTです。 CodeModelの要素をトラバースするときに、CodeElementとして提供されます。
プリミティブ変換命令はコンポジットです:
ConvertInstruction(
TypeKind fromType,
TypeKind toType
)
int,long,floatとdoubleの間(fromType != toType;)intからbyte、charおよびshortまで。
- 導入されたバージョン:
- 24
- 関連項目:
-
メソッドのサマリー
インタフェースjava.lang.classfile.Instructionで宣言されたメソッド
opcode, sizeInBytes
-
メソッドの詳細
-
fromType
-
toType
-
of
static ConvertInstruction of(TypeKind fromType, TypeKind toType) 変換命令を返します。 有効な変換は次のとおりです:int,long,floatとdoubleの間(fromType != toType;)intからbyte、charおよびshortまで。
- パラメータ:
fromType- 変換元の型toType- 変換先の型- 戻り値:
- 変換命令
- スロー:
IllegalArgumentException- これが有効な変換でない場合
-
of
static ConvertInstruction of(Opcode op) 変換命令を返します。- パラメータ:
op- 特定のタイプの変換命令のopcode。Opcode.Kind.CONVERTの種類である必要があります- 戻り値:
- 変換命令
- スロー:
IllegalArgumentException- opcodeの種類がOpcode.Kind.CONVERTでない場合。
-