public int getOpcode ( final int opcode ) { if ( opcode == Opcodes . IALOAD || opcode == Opcodes . IASTORE ) { // the offset for IALOAD or IASTORE is in byte 1 of 'off' for // primitive types (buf == null) return opcode + ( buf == null ? ( off & 0xFF00 ) >> 8 : 4 ) ; } else { // the offset for other instructions is in byte 2 of 'off' for // primitive types (buf == null) return opcode + ( buf == null ? ( off & 0xFF0000 ) >> 16 : 4 ) ; } }
Returns a JVM instruction opcode adapted to this Java type . This method must not be used for method types .