object AsmUtils
- Source
- AsmUtils.scala
- Alphabetic
- By Inheritance
- AsmUtils
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- def asmify(cnode: ClassNode): String
-
def
checkClass(classNode: ClassNode, dumpNonErroneous: Boolean = false): Option[String]
Run ASM's CheckClassAdapter over a class.
Run ASM's CheckClassAdapter over a class. Returns None if no problem is found, otherwise Some(msg) with the verifier's error message.
- def classBytes(file: String): Array[Byte]
- def classFromBytes(bytes: Array[Byte]): ClassNode
- def main(args: Array[String]): Unit
- def readClass(filename: String): ClassNode
- def readClass(bytes: Array[Byte]): ClassNode
- def sortClassMembers(node: ClassNode): node.type
-
def
textify(insns: InsnList): String
Returns a human-readable representation of the given instruction sequence.
-
def
textify(insns: Iterator[AbstractInsnNode]): String
Returns a human-readable representation of the given instruction sequence.
-
def
textify(insn: AbstractInsnNode): String
Returns a human-readable representation of the given instruction.
-
def
textify(mnode: MethodNode): String
Returns a human-readable representation of the code in the mnode MethodNode.
-
def
textify(cnode: ClassNode): String
Returns a human-readable representation of the cnode ClassNode.
- def traceClass(bytes: Array[Byte]): Unit
- def traceClass(cnode: ClassNode): Unit
-
final
val
traceClassEnabled: Boolean(false)
Print the bytecode of classes generated by GenBCode to the standard output.
- final val traceClassPattern: String("")
- def traceMethod(mnode: MethodNode): Unit
-
final
val
traceMethodEnabled: Boolean(false)
Print the bytecode of methods generated by GenBCode to the standard output.
Print the bytecode of methods generated by GenBCode to the standard output. Only methods whose name contains
traceMethodPattern
are traced. - final val traceMethodPattern: String("")
-
final
val
traceSerializedClassEnabled: Boolean(false)
Print the bytecode of classes as they are serialized by the ASM library.
Print the bytecode of classes as they are serialized by the ASM library. The serialization performed by
asm.ClassWriter
can change the code generated by GenBCode. For example, it introduces stack map frames, it computes the maximal stack sizes, and it replaces dead code by NOPs (see also https://github.com/scala/scala/pull/3726#issuecomment-42861780). - final val traceSerializedClassPattern: String("")
- def zapScalaClassAttrs(node: ClassNode): node.type
The Scala compiler and reflection APIs.