インタフェース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
でない場合。
-