o

scala.tools.partest

ASMConverters

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
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ASMConverters
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class AsmToScala extends AnyRef
  2. case class ExceptionHandler(start: Label, end: Label, handler: Label, desc: Option[String]) extends Product with Serializable
  3. case class Field(opcode: Int, owner: String, name: String, desc: String) extends Instruction with Product with Serializable
  4. case class FrameEntry(type: Int, local: List[Any], stack: List[Any]) extends Instruction with Product with Serializable
  5. case class Incr(opcode: Int, var: Int, incr: Int) extends Instruction with Product with Serializable
  6. sealed abstract class Instruction extends Product
  7. case class IntOp(opcode: Int, operand: Int) extends Instruction with Product with Serializable
  8. case class Invoke(opcode: Int, owner: String, name: String, desc: String, itf: Boolean) extends Instruction with Product with Serializable
  9. case class InvokeDynamic(opcode: Int, name: String, desc: String, bsm: MethodHandle, bsmArgs: List[AnyRef]) extends Instruction with Product with Serializable
  10. case class Jump(opcode: Int, label: Label) extends Instruction with Product with Serializable
  11. case class Label(offset: Int) extends Instruction with Product with Serializable
  12. case class Ldc(opcode: Int, cst: Any) extends Instruction with Product with Serializable
  13. case class LineNumber(line: Int, start: Label) extends Instruction with Product with Serializable
  14. case class LocalVariable(name: String, desc: String, signature: Option[String], start: Label, end: Label, index: Int) extends Product with Serializable
  15. case class LookupSwitch(opcode: Int, dflt: Label, keys: List[Int], labels: List[Label]) extends Instruction with Product with Serializable
  16. case class Method(instructions: List[Instruction], handlers: List[ExceptionHandler], localVars: List[LocalVariable]) extends Product with Serializable
  17. case class MethodHandle(tag: Int, owner: String, name: String, desc: String, itf: Boolean) extends Product with Serializable
  18. case class NewArray(opcode: Int, desc: String, dims: Int) extends Instruction with Product with Serializable
  19. case class Op(opcode: Int) extends Instruction with Product with Serializable
  20. implicit final class RichInstructionLists extends AnyVal
  21. case class TableSwitch(opcode: Int, min: Int, max: Int, dflt: Label, labels: List[Label]) extends Instruction with Product with Serializable
  22. case class TypeOp(opcode: Int, desc: String) extends Instruction with Product with Serializable
  23. case class VarOp(opcode: Int, var: Int) extends Instruction with Product with Serializable

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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.

  5. def applyToMethod(method: MethodNode, instructions: List[Instruction]): Unit
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. def convertMethod(meth: MethodNode): Method
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. 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.

  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def instructionsFromMethod(meth: MethodNode): List[Instruction]

    Transform the instructions of an ASM Method into a list of Instructions.

  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. def opcodeToString(op: Int, default: Any = "?"): String
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. def unconvertBsmArgs(a: List[AnyRef]): Array[AnyRef]
  24. def unconvertMethodHandle(h: MethodHandle): Handle
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped