object ASMConverters
Makes using ASM from ByteCodeTests more convenient.
Wraps ASM instructions in case classes so that equals and toString work for the purpose of bytecode diffing and pretty printing.
- Source
- ASMConverters.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- ASMConverters
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
- class AsmToScala extends AnyRef
- case class ExceptionHandler(start: Label, end: Label, handler: Label, desc: Option[String]) extends Product with Serializable
- case class Field(opcode: Int, owner: String, name: String, desc: String) extends Instruction with Product with Serializable
- case class FrameEntry(type: Int, local: List[Any], stack: List[Any]) extends Instruction with Product with Serializable
- case class Incr(opcode: Int, var: Int, incr: Int) extends Instruction with Product with Serializable
- sealed abstract class Instruction extends Product
- case class IntOp(opcode: Int, operand: Int) extends Instruction with Product with Serializable
- case class Invoke(opcode: Int, owner: String, name: String, desc: String, itf: Boolean) extends Instruction with Product with Serializable
- case class InvokeDynamic(opcode: Int, name: String, desc: String, bsm: MethodHandle, bsmArgs: List[AnyRef]) extends Instruction with Product with Serializable
- case class Jump(opcode: Int, label: Label) extends Instruction with Product with Serializable
- case class Label(offset: Int) extends Instruction with Product with Serializable
- case class Ldc(opcode: Int, cst: Any) extends Instruction with Product with Serializable
- case class LineNumber(line: Int, start: Label) extends Instruction with Product with Serializable
- case class LocalVariable(name: String, desc: String, signature: Option[String], start: Label, end: Label, index: Int) extends Product with Serializable
- case class LookupSwitch(opcode: Int, dflt: Label, keys: List[Int], labels: List[Label]) extends Instruction with Product with Serializable
- case class Method(instructions: List[Instruction], handlers: List[ExceptionHandler], localVars: List[LocalVariable]) extends Product with Serializable
- case class MethodHandle(tag: Int, owner: String, name: String, desc: String, itf: Boolean) extends Product with Serializable
- case class NewArray(opcode: Int, desc: String, dims: Int) extends Instruction with Product with Serializable
- case class Op(opcode: Int) extends Instruction with Product with Serializable
- implicit final class RichInstructionLists extends AnyVal
- case class TableSwitch(opcode: Int, min: Int, max: Int, dflt: Label, labels: List[Label]) extends Instruction with Product with Serializable
- case class TypeOp(opcode: Int, desc: String) extends Instruction with Product with Serializable
- case class VarOp(opcode: Int, var: Int) extends Instruction with Product with Serializable
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
applyToMethod(asmMethod: MethodNode, method: Method): Unit
Convert back a Method to ASM land.
Convert back a Method to ASM land. The code is emitted into the parameter
asmMethod
. - def applyToMethod(method: MethodNode, instructions: List[Instruction]): Unit
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def convertMethod(meth: MethodNode): Method
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
equivalentBytecode(as: List[Instruction], bs: List[Instruction], varMap: Map[Int, Int] = MMap(), labelMap: Map[Int, Int] = MMap()): Boolean
Bytecode is equal modulo local variable numbering and label numbering.
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
instructionsFromMethod(meth: MethodNode): List[Instruction]
Transform the instructions of an ASM Method into a list of Instructions.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def opcodeToString(op: Int, default: Any = "?"): String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def unconvertBsmArgs(a: List[AnyRef]): Array[AnyRef]
- def unconvertMethodHandle(h: MethodHandle): Handle
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()