Basics
December 9, 2023 ยท View on GitHub
In Jasm, attributes and classes, methods and fields are represented via declarations
The most simple declarations are:
Class
.class modifiers name { [members] }
Members is a list of declarations
Valid members for a class declaration are:
Modifiers
Valid modifiers for the class type are:
public private protected static final native abstract interface synthetic strict annotation enum super module
Method
.method modifiers name descriptor {
parameters: { parameter... }, // optional
exceptions: { exception... }, // optional
code: { // optional
instruction...
}
}
Modifiers
Valid modifiers for the method type are:
public private protected static final native abstract interface synthetic strict annotation enum synchronized bridge varargs
Exception
A exception is a try catch handler descriptor object, it is structured like this:
{ start, end, handler, exception }
start, end and handler are identifiers of the label they represent, so A, Q or AB.
the exception is either the internal of the class, or to have an all catch block simply use *
Field
.field modifiers name descriptor
Modifiers
Valid modifiers for the field type are:
public private protected static final native abstract interface synthetic strict annotation enum volatile transient