Search in sources :

Example 6 with Prototype

use of com.android.dx.rop.type.Prototype in project AndroidLife by CaMnter.

the class ClassReferenceListBuilder method addDependencies.

private void addDependencies(ConstantPool pool) {
    for (Constant constant : pool.getEntries()) {
        if (constant instanceof CstType) {
            checkDescriptor(((CstType) constant).getClassType());
        } else if (constant instanceof CstFieldRef) {
            checkDescriptor(((CstFieldRef) constant).getType());
        } else if (constant instanceof CstMethodRef) {
            Prototype proto = ((CstMethodRef) constant).getPrototype();
            checkDescriptor(proto.getReturnType());
            StdTypeList args = proto.getParameterTypes();
            for (int i = 0; i < args.size(); i++) {
                checkDescriptor(args.get(i));
            }
        }
    }
}
Also used : Prototype(com.android.dx.rop.type.Prototype) StdTypeList(com.android.dx.rop.type.StdTypeList) Constant(com.android.dx.rop.cst.Constant) CstType(com.android.dx.rop.cst.CstType) CstFieldRef(com.android.dx.rop.cst.CstFieldRef) CstMethodRef(com.android.dx.rop.cst.CstMethodRef)

Example 7 with Prototype

use of com.android.dx.rop.type.Prototype in project J2ME-Loader by nikita36078.

the class Ropper method setFirstFrame.

/**
 * Sets up the first frame to contain all the incoming parameters in
 * locals.
 */
private void setFirstFrame() {
    Prototype desc = method.getEffectiveDescriptor();
    startFrames[0].initializeWithParameters(desc.getParameterTypes());
    startFrames[0].setImmutable();
}
Also used : Prototype(com.android.dx.rop.type.Prototype)

Aggregations

Prototype (com.android.dx.rop.type.Prototype)7 CstType (com.android.dx.rop.cst.CstType)5 StdTypeList (com.android.dx.rop.type.StdTypeList)5 Constant (com.android.dx.rop.cst.Constant)3 CstFieldRef (com.android.dx.rop.cst.CstFieldRef)3 CstMethodRef (com.android.dx.rop.cst.CstMethodRef)3 BasicBlock (com.android.dx.rop.code.BasicBlock)2 Insn (com.android.dx.rop.code.Insn)2 InsnList (com.android.dx.rop.code.InsnList)2 PlainCstInsn (com.android.dx.rop.code.PlainCstInsn)2 PlainInsn (com.android.dx.rop.code.PlainInsn)2 RegisterSpec (com.android.dx.rop.code.RegisterSpec)2 SourcePosition (com.android.dx.rop.code.SourcePosition)2 ThrowingCstInsn (com.android.dx.rop.code.ThrowingCstInsn)2 ThrowingInsn (com.android.dx.rop.code.ThrowingInsn)2 Type (com.android.dx.rop.type.Type)2