@Test public void testGetFunctionTypeFromDescriptor() { FunctionType type = null; type = getFunctionType("()V", true); assertEquals(VOID, type.getReturnType()); assertEquals(1, type.getParameterTypes().length); assertEquals(ENV_PTR, type.getParameterTypes()[0]); type = getFunctionType("()V", false); assertEquals(VOID, type.getReturnType()); assertEquals(2, type.getParameterTypes().length); assertEquals(ENV_PTR, type.getParameterTypes()[0]); assertEquals(OBJECT_PTR, type.getParameterTypes()[1]); type = getFunctionType("(Ljava/lang/Object;)Ljava/lang/String;", true); assertEquals(OBJECT_PTR, type.getReturnType()); assertEquals(2, type.getParameterTypes().length); assertEquals(ENV_PTR, type.getParameterTypes()[0]); assertEquals(OBJECT_PTR, type.getParameterTypes()[1]); type = getFunctionType("(Ljava/lang/Object;)Ljava/lang/String;", false); assertEquals(OBJECT_PTR, type.getReturnType()); assertEquals(3, type.getParameterTypes().length); assertEquals(ENV_PTR, type.getParameterTypes()[0]); assertEquals(OBJECT_PTR, type.getParameterTypes()[1]); assertEquals(OBJECT_PTR, type.getParameterTypes()[2]); }
public static FunctionType getFunctionType(SootMethod method) { return getFunctionType(method.makeRef()); }
Types { public static FunctionType getFunctionType(SootMethod method) { return getFunctionType(method.makeRef()); } }
Types { public static FunctionType getFunctionType(SootMethod method) { return getFunctionType(method.makeRef()); }  }
Types { public static FunctionType getFunctionType(SootMethod method) { return getFunctionType(method.makeRef()); }  static Type getType(String desc); static Type getLocalType(soot.Type sootType); static Type getType(soot.Type sootType); static boolean isUnsigned(soot.Type type); static String getInternalName(soot.Type t); static String getInternalName(SootClass sc); static String getInternalNameFromDescriptor(String desc); static String getDescriptor(Type t); static String getDescriptor(soot.Type t); static String getDescriptor(SootField field); static String getDescriptor(SootMethod method); @SuppressWarnings("unchecked") static String getDescriptor(SootMethodRef methodRef); static String getDescriptor(List<soot.Type> paramTypes, soot.Type returnType); static String getReturnTypeDescriptor(String methodDescriptor); static List<String> getParameterDescriptors(String methodDescriptor); static boolean isEnum(soot.Type t); static boolean isEnum(SootClass sc); static boolean isPrimitive(String descriptor); static boolean isArray(String descriptor); static boolean isNativeObject(soot.Type t); static boolean isNativeObject(SootClass sc); static boolean isStruct(soot.Type t); static boolean isStruct(SootClass sc); static boolean isPrimitiveComponentType(String descriptor); static boolean isPrimitiveBaseType(String descriptor); static String getBaseType(String descriptor); static FunctionType getFunctionType(SootMethod method); @SuppressWarnings("unchecked") static FunctionType getFunctionType(SootMethodRef methodRef); static FunctionType getFunctionType(String methodDesc, boolean ztatic); static FunctionType getNativeFunctionType(String methodDesc, boolean ztatic); static boolean isSubclass(SootClass sc, String className); static boolean isInstanceOfClass(soot.Type t, String className); static boolean isInstanceOfClass(SootClass sc, String className); static Constant sizeof(AggregateType type); static Constant offsetof(AggregateType type, int ... idx); static StructureType getClassType(OS os, Arch arch, SootClass clazz); static StructureType getInstanceType(OS os, Arch arch, SootClass clazz); static int getFieldAlignment(OS os, Arch arch, SootField f); static int getFieldSize(Arch arch, SootField f); static Value getFieldPtr(Function f, Value base, Constant offset, Type fieldType); static List<SootField> getFields(final OS os, final Arch arch, SootClass clazz, boolean ztatic); static List<SootField> getClassFields(OS os, Arch arch, SootClass clazz); static List<SootField> getInstanceFields(OS os, Arch arch, SootClass clazz); }
Types { public static FunctionType getFunctionType(SootMethod method) { return getFunctionType(method.makeRef()); }  static Type getType(String desc); static Type getLocalType(soot.Type sootType); static Type getType(soot.Type sootType); static boolean isUnsigned(soot.Type type); static String getInternalName(soot.Type t); static String getInternalName(SootClass sc); static String getInternalNameFromDescriptor(String desc); static String getDescriptor(Type t); static String getDescriptor(soot.Type t); static String getDescriptor(SootField field); static String getDescriptor(SootMethod method); @SuppressWarnings("unchecked") static String getDescriptor(SootMethodRef methodRef); static String getDescriptor(List<soot.Type> paramTypes, soot.Type returnType); static String getReturnTypeDescriptor(String methodDescriptor); static List<String> getParameterDescriptors(String methodDescriptor); static boolean isEnum(soot.Type t); static boolean isEnum(SootClass sc); static boolean isPrimitive(String descriptor); static boolean isArray(String descriptor); static boolean isNativeObject(soot.Type t); static boolean isNativeObject(SootClass sc); static boolean isStruct(soot.Type t); static boolean isStruct(SootClass sc); static boolean isPrimitiveComponentType(String descriptor); static boolean isPrimitiveBaseType(String descriptor); static String getBaseType(String descriptor); static FunctionType getFunctionType(SootMethod method); @SuppressWarnings("unchecked") static FunctionType getFunctionType(SootMethodRef methodRef); static FunctionType getFunctionType(String methodDesc, boolean ztatic); static FunctionType getNativeFunctionType(String methodDesc, boolean ztatic); static boolean isSubclass(SootClass sc, String className); static boolean isInstanceOfClass(soot.Type t, String className); static boolean isInstanceOfClass(SootClass sc, String className); static Constant sizeof(AggregateType type); static Constant offsetof(AggregateType type, int ... idx); static StructureType getClassType(OS os, Arch arch, SootClass clazz); static StructureType getInstanceType(OS os, Arch arch, SootClass clazz); static int getFieldAlignment(OS os, Arch arch, SootField f); static int getFieldSize(Arch arch, SootField f); static Value getFieldPtr(Function f, Value base, Constant offset, Type fieldType); static List<SootField> getFields(final OS os, final Arch arch, SootClass clazz, boolean ztatic); static List<SootField> getClassFields(OS os, Arch arch, SootClass clazz); static List<SootField> getInstanceFields(OS os, Arch arch, SootClass clazz); static final StructureType GATEWAY_FRAME; static final Type GATEWAY_FRAME_PTR; static final StructureType TRYCATCH_CONTEXT; static final Type TRYCATCH_CONTEXT_PTR; static final StructureType BC_TRYCATCH_CONTEXT; static final Type BC_TRYCATCH_CONTEXT_PTR; static final Type ENV_PTR; static final StructureType CLASS; static final Type CLASS_PTR; static final StructureType OBJECT; static final StructureType DATA_OBJECT; static final StructureType VITABLE; static final Type VITABLE_PTR; static final Type OBJECT_PTR; static final Type METHOD_PTR; static final Type FIELD_PTR; }