@ApiStatus.Experimental
public class BytecodeUtils
extends java.lang.Object
| Constructor and Description |
|---|
BytecodeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Class<?> |
boxed(java.lang.Class<?> clazz) |
static java.lang.String |
desc(java.lang.Class<?> clazz)
Get the descriptor for the given class.
|
static java.lang.String |
desc(java.lang.reflect.Method method)
Get the descriptor for the given method.
|
static java.lang.String |
desc(java.lang.String className)
Get a descriptor for the given class name.
|
static java.lang.String |
dot(java.lang.String className)
Replace all slashes with dots.
|
static java.lang.String |
getLoadOpcode(java.lang.Class<?> clazz)
Get the fitting return opcode for the given type.
|
static java.lang.String |
getReturnOpcode(java.lang.Class<?> clazz)
Get the fitting return opcode for the given type.
|
static int |
getStackSize(java.lang.Class<?> clazz)
Get the stack size for the given type.
|
static java.lang.String |
mdesc(java.lang.Class<?> returnType,
java.lang.Class<?>... parameterTypes)
Get the descriptor for the given parameter types and return type.
|
static java.lang.String |
slash(java.lang.Class<?> clazz)
Get the name of the class with slashes instead of dots.
|
static java.lang.String |
slash(java.lang.String className)
Replace all dots with slashes.
|
static java.lang.Class<?> |
unboxed(java.lang.Class<?> clazz) |
public static java.lang.String slash(java.lang.String className)
className - The class namepublic static java.lang.String slash(java.lang.Class<?> clazz)
clazz - The classpublic static java.lang.String dot(java.lang.String className)
className - The class namepublic static java.lang.String desc(java.lang.String className)
className - The class namepublic static java.lang.String desc(java.lang.Class<?> clazz)
clazz - The classpublic static java.lang.String desc(java.lang.reflect.Method method)
method - The methodpublic static java.lang.String mdesc(java.lang.Class<?> returnType,
java.lang.Class<?>... parameterTypes)
parameterTypes - The parameter typesreturnType - The return typepublic static java.lang.String getLoadOpcode(java.lang.Class<?> clazz)
clazz - The typepublic static java.lang.String getReturnOpcode(java.lang.Class<?> clazz)
Void will return RETURN.clazz - The typepublic static int getStackSize(java.lang.Class<?> clazz)
clazz - The typepublic static java.lang.Class<?> boxed(java.lang.Class<?> clazz)
public static java.lang.Class<?> unboxed(java.lang.Class<?> clazz)