-
Notifications
You must be signed in to change notification settings - Fork 0
andysonnenburg/BC
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
ABOUT BC
========
BC is a simple layer on the ASM bytecode manipulation framework. It adds low
cost type safety to opcode usage, as well as providing a simple and readable
DSL.
USAGE
=====
Simply extend com.github.sonyandy.bc.BC and provide an implementation for
protected[this] defineClass. For example:
object Example extends BC[AnyRef] {
protected[this] defineClass {
public.`final`.`class`("Example") {
public.void("<init>")() {
ALOAD(0)
INVOKESPECIAL("java/lang/Object", "<init>", "()V")
RETURN
}
}
}
}
val exampleClass: Class[AnyRef] = Example
Note that an implicit conversion from BC[A] to Class[A] is provided, using the
ClassLoader of the current thread to load the class.
About
Scala Bytecode DSL built on ASM
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published