public class ASMBackendUtils extends Object
| Constructor and Description |
|---|
ASMBackendUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
acceptsStringInitialValue(SootField field)
Determine if the field accepts a string default value, this is only true for fields of type String or a sub-type of
String
|
static org.objectweb.asm.Attribute |
createASMAttribute(Attribute attr)
Create an ASM attribute from an Soot attribute
|
static Object |
getDefaultValue(SootField field)
Get default value of a field for constant pool
|
static int |
sizeOfType(Type t)
Get the size in words for a type.
|
static String |
slashify(String s)
Convert class identifiers and signatures by replacing dots by slashes.
|
static String |
toTypeDesc(List<Type> parameterTypes,
Type returnType)
Compute type description for methods, comprising parameter types and return type.
|
static String |
toTypeDesc(SootMethodRef m)
Compute type description for methods, comprising parameter types and return type.
|
static String |
toTypeDesc(Type type)
Convert type to JVM style type description
|
static String |
translateJavaVersion(int javaVersion)
Translate internal numbering of java versions to real version for debug messages.
|
public static String slashify(String s)
s - String to convertpublic static String toTypeDesc(SootMethodRef m)
m - Method to determine type descriptionpublic static String toTypeDesc(List<Type> parameterTypes, Type returnType)
parameterTypes - The parameters for some methodreturnType - The return type for some methodpublic static String toTypeDesc(Type type)
type - Type to convertpublic static Object getDefaultValue(SootField field)
field - Field to get default value fornull if there is no default value.public static boolean acceptsStringInitialValue(SootField field)
field - Fieldtrue if the field is of type String or sub-type, false otherwise.public static int sizeOfType(Type t)
t - Typepublic static org.objectweb.asm.Attribute createASMAttribute(Attribute attr)
attr - Soot attributepublic static String translateJavaVersion(int javaVersion)
javaVersion - Internal java version numberCopyright © 2020 Soot OSS. All rights reserved.