| Package | Description |
|---|---|
| jasm.attributes |
Provides classes for representing class file attributes, including code necessary for encoding and decoding them.
|
| jasm.io |
Provides classes for reading/writing class files and Jasm files.
|
| jasm.lang |
Provides core class for representing JVM class files, bytecodes, types and constants.
|
| Modifier and Type | Field and Description |
|---|---|
JvmType[] |
StackMapTable.Frame.types
The array of types for this frame.
|
| Constructor and Description |
|---|
Frame(int numLocals,
int numStackItems,
JvmType[] types) |
| Modifier and Type | Method and Description |
|---|---|
protected JvmType |
ClassFileReader.decodeInstructionType(int offset) |
JvmType |
ClassFileReader.getConstantType(int index)
Get the type of the constant value from this classfile's constant pool.
|
static JvmType |
ClassFileReader.parseDescriptor(String descriptor)
This method parses a general type descriptor.
|
static JvmType |
JasmFileReader.parseType(char c) |
| Modifier and Type | Method and Description |
|---|---|
protected Triple<JvmType.Clazz,String,JvmType> |
ClassFileReader.decodeInstructionOwnerNameType(int offset,
int line) |
static Pair<JvmType,Integer> |
ClassFileReader.parseInternalDescriptor(String descriptor,
int pos) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
JasmFileWriter.writeTypeWithoutBounds(JvmType t) |
| Modifier and Type | Interface and Description |
|---|---|
static interface |
JvmType.Primitive
The Primitive type abstracts all the primitive types.
|
static interface |
JvmType.Reference
The Reference type abstracts all the reference types, including class
types, array types, variable and wildcard types.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
JvmType.Array
The Array type captures array types! The elementType gives the types of
the elements held in the array.
|
static class |
JvmType.Bool
Represents the Java type "boolean"
|
static class |
JvmType.Byte
Represents the Java type "byte"
|
static class |
JvmType.Char
Represents the Java type "char"
|
static class |
JvmType.Clazz
This represents a reference to a class.
|
static class |
JvmType.Double
Represents the Java type "double"
|
static class |
JvmType.Float
Represents the Java type "float"
|
static class |
JvmType.Function
Represents the type of a method.
|
static class |
JvmType.Int
Represents the Java type "int"
|
static class |
JvmType.Intersection
An intersection type represents a (unknown) type which known to be a
subtype of several types.
|
static class |
JvmType.Long
Represents the Java type "long"
|
static class |
JvmType.Null
The Null type is a special type given to the null value.
|
static class |
JvmType.Short
Represents the Java type "short"
|
static class |
JvmType.Variable
Represents a Generic type variable.
|
static class |
JvmType.Void
The Void type is used to represent "void" types, found in method
declarations.
|
static class |
JvmType.Wildcard
This represents the special "?" type.
|
| Modifier and Type | Field and Description |
|---|---|
protected JvmType |
ClassFile.Field.type |
JvmType |
Bytecode.Store.type |
JvmType |
Bytecode.Load.type |
JvmType |
Bytecode.Return.type |
JvmType |
Bytecode.Neg.type |
JvmType |
Bytecode.BinOp.type |
JvmType |
Bytecode.PutField.type |
JvmType |
Bytecode.GetField.type |
JvmType |
Bytecode.Cmp.type |
JvmType |
Bytecode.IfCmp.type |
JvmType |
Bytecode.Pop.type |
JvmType |
Bytecode.Dup.type |
JvmType |
Bytecode.New.type |
JvmType |
Bytecode.CheckCast.type |
| Modifier and Type | Method and Description |
|---|---|
JvmType |
JvmType.Array.element() |
JvmType |
JvmType.Function.returnType() |
static JvmType |
JvmTypes.stripGenerics(JvmType.Variable vt) |
static JvmType |
JvmTypes.stripGenerics(JvmType.Wildcard wt) |
static JvmType |
JvmTypes.stripGenerics(JvmType t)
The purpose of this method is to strip the generic information from a
type.
|
JvmType |
ClassFile.Field.type() |
| Modifier and Type | Method and Description |
|---|---|
List<JvmType> |
JvmType.Function.parameterTypes() |
| Modifier and Type | Method and Description |
|---|---|
static int |
JvmTypes.arrayDepth(JvmType t)
Return the depth of array nesting.
|
static Constant.FieldRef |
Constant.buildFieldRef(JvmType.Clazz owner,
String name,
JvmType type)
Creates a CONSTANT_FieldRef object.
|
static Constant.InterfaceMethodRef |
Constant.buildInterfaceMethodRef(JvmType.Reference owner,
String name,
JvmType type)
Creates a CONSTANT_InterfaceMethodRef object.
|
static Constant.MethodRef |
Constant.buildMethodRef(JvmType.Reference owner,
String name,
JvmType type)
Creates a CONSTANT_MethodRef object.
|
int |
JvmType.Null.compareTo(JvmType t) |
int |
JvmType.Void.compareTo(JvmType t) |
int |
JvmType.Bool.compareTo(JvmType t) |
int |
JvmType.Byte.compareTo(JvmType t) |
int |
JvmType.Char.compareTo(JvmType t) |
int |
JvmType.Short.compareTo(JvmType t) |
int |
JvmType.Int.compareTo(JvmType t) |
int |
JvmType.Long.compareTo(JvmType t) |
int |
JvmType.Float.compareTo(JvmType t) |
int |
JvmType.Double.compareTo(JvmType t) |
int |
JvmType.Array.compareTo(JvmType t) |
int |
JvmType.Clazz.compareTo(JvmType t) |
int |
JvmType.Wildcard.compareTo(JvmType t) |
int |
JvmType.Variable.compareTo(JvmType t) |
int |
JvmType.Intersection.compareTo(JvmType t) |
int |
JvmType.Function.compareTo(JvmType t) |
static String |
ClassFile.descriptor(JvmType t,
boolean generic)
This method returns a JVM descriptor string for the type in question.
|
static boolean |
JvmTypes.isBoxedType(JvmType t)
Determine whether or not the given type is a wrapper for a primitive
type.
|
static boolean |
JvmTypes.isBoxedTypeOf(JvmType t,
String wrapper)
Determine whether or not the given type is a wrapper for a primitive
type.
|
static boolean |
JvmTypes.isClass(String pkg,
String clazz,
JvmType t) |
static boolean |
JvmTypes.isGeneric(JvmType t) |
static boolean |
JvmTypes.isGenericArray(JvmType t) |
static boolean |
JvmTypes.isJavaLangObject(JvmType t)
Check wither a given type is a reference to java.lang.Object or not.
|
static boolean |
JvmTypes.isJavaLangString(JvmType t)
Check wither a given type is a reference to java.lang.String or not.
|
void |
ClassFile.Field.setType(JvmType t) |
static int |
ClassFile.slotSize(JvmType type)
Determine the slot size for the corresponding Java type.
|
static JvmType |
JvmTypes.stripGenerics(JvmType t)
The purpose of this method is to strip the generic information from a
type.
|
| Constructor and Description |
|---|
Array(JvmType element) |
BinOp(int op,
JvmType type) |
CheckCast(JvmType type)
Check a reference on the stack has the given type.
|
Cmp(JvmType type,
int op)
Construct a cmp bytecode.
|
Dup(JvmType type) |
Field(String name,
JvmType type,
List<Modifier> modifiers) |
Function(JvmType returnType,
JvmType... parameters) |
Function(JvmType returnType,
JvmType... parameters) |
Function(JvmType returnType,
List<JvmType> parameters) |
Function(JvmType returnType,
List<JvmType> parameters,
List<JvmType.Variable> typeArgs) |
GetField(JvmType.Clazz owner,
String name,
JvmType type,
Bytecode.FieldMode mode) |
IfCmp(int cond,
JvmType type,
String label) |
IfCmp(int cond,
JvmType type,
String label,
boolean islong) |
Load(int slot,
JvmType type) |
Neg(JvmType type) |
New(JvmType type) |
New(JvmType type,
int dims) |
Pop(JvmType type) |
PutField(JvmType.Clazz owner,
String name,
JvmType type,
Bytecode.FieldMode mode) |
Return(JvmType type) |
Store(int slot,
JvmType type) |
| Constructor and Description |
|---|
Function(JvmType returnType,
List<JvmType> parameters) |
Function(JvmType returnType,
List<JvmType> parameters,
List<JvmType.Variable> typeArgs) |
Copyright © 2016. All rights reserved.