Class AsmUtil
java.lang.Object
sootup.java.bytecode.frontend.conversion.AsmUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull TypearrayTypetoJimpleType(@NonNull String desc) static @NonNull Collection<JavaClassType>asmIdToSignatures(@Nullable Iterable<String> asmClassNames) static ObjectconvertAnnotationValue(Object annotationValue) static Iterable<AnnotationUsage>createAnnotationUsage(List<? extends org.objectweb.asm.tree.AnnotationNode> invisibleParameterAnnotation) static AnnotationUsagecreateAnnotationUsage(org.objectweb.asm.tree.AnnotationNode annotationNode) static EnumSet<FieldModifier>getFieldModifiers(int access) static @NonNull org.objectweb.asm.tree.ClassNodegetModuleDescriptor(Path moduleInfoFile) static booleanDetermines if a type is a dword type.static TypeprimitiveTypeFromOpcode(int op) Returns the primitive result type implied by a bytecode opcode, orUnknownTypewhen the opcode does not carry type information (e.g.static @NonNull JavaClassTypetoJimpleClassType(@NonNull String asmClassName) toJimpleSignatureDesc(@NonNull String desc) Converts n types contained in desc to a list of Jimple Typesstatic @NonNull TypetoJimpleType(@NonNull String desc) static StringtoQualifiedName(@NonNull String str) Converts an str class name to a fully qualified name.static StringtoString(org.objectweb.asm.tree.AbstractInsnNode insn)
-
Field Details
-
SUPPORTED_ASM_OPCODE
public static final int SUPPORTED_ASM_OPCODE- See Also:
-
-
Method Details
-
isDWord
Determines if a type is a dword type.- Parameters:
type- the type to check.- Returns:
trueif its a dword type.
-
toQualifiedName
Converts an str class name to a fully qualified name.- Parameters:
str- str name.- Returns:
- fully qualified name.
-
getFieldModifiers
-
asmIdToSignatures
public static @NonNull Collection<JavaClassType> asmIdToSignatures(@Nullable Iterable<String> asmClassNames) -
toJimpleClassType
-
toJimpleType
-
arrayTypetoJimpleType
-
toJimpleSignatureDesc
Converts n types contained in desc to a list of Jimple Types -
toString
-
createAnnotationUsage
public static AnnotationUsage createAnnotationUsage(org.objectweb.asm.tree.AnnotationNode annotationNode) -
createAnnotationUsage
public static Iterable<AnnotationUsage> createAnnotationUsage(List<? extends org.objectweb.asm.tree.AnnotationNode> invisibleParameterAnnotation) -
convertAnnotationValue
-
getModuleDescriptor
-
primitiveTypeFromOpcode
Returns the primitive result type implied by a bytecode opcode, orUnknownTypewhen the opcode does not carry type information (e.g. ALOAD, AALOAD, ASTORE).Covers:
- var insns: ILOAD/ISTORE → int, LLOAD/LSTORE → long, FLOAD/FSTORE → float, DLOAD/DSTORE → double
- arithmetic + negate (IADD–DNEG, opcodes 96–119): I/L/F/D in groups-of-4
- shift + bitwise (ISHL–LXOR, opcodes 120–131): even → int, odd → long
- comparison results (LCMP, FCMPL/G, DCMPL/G) → int
- ARRAYLENGTH → int
- primitive array loads: IALOAD → int, LALOAD → long, FALOAD → float, DALOAD → double, BALOAD → byte, CALOAD → char, SALOAD → short
-