Types { public static StructureType getInstanceType(OS os, Arch arch, SootClass clazz) { return new StructureType(DATA_OBJECT, getInstanceType0(os, arch, clazz, 1, new int[] {0})); }  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(ModuleBuilder mb, 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; static final String INFO_STRUCT_ALIAS; static final String CLASS_TYPE_ALIAS; }
@Test public void testGetInstanceType() throws Exception { StructureType type = Types.getInstanceType(OS.ios, Arch.thumbv7, getSootClass(D.class.getName())); int size = getAllocSize(type, "thumbv7-unknown-ios"); assertEquals(48, size); }