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)); } } } }
private static CstProtoRef makeCallSiteProto(final CstMethodRef callSiteMethod) { return new CstProtoRef(callSiteMethod.getPrototype(true)); } }
private static CstProtoRef makeCallSiteProto(final CstMethodRef callSiteMethod) { return new CstProtoRef(callSiteMethod.getPrototype(true)); } }
/** * Creates an instance. * * @param positions {@code null-ok;} positions (line numbers) to encode * @param locals {@code null-ok;} local variables to encode * @param file {@code null-ok;} may only be {@code null} if simply using * this class to do a debug print * @param codeSize * @param regSize * @param isStatic * @param ref */ public DebugInfoEncoder(PositionList positions, LocalList locals, DexFile file, int codeSize, int regSize, boolean isStatic, CstMethodRef ref) { this.positions = positions; this.locals = locals; this.file = file; this.desc = ref.getPrototype(); this.isStatic = isStatic; this.codeSize = codeSize; this.regSize = regSize; output = new ByteArrayAnnotatedOutput(); lastEntryForReg = new LocalList.Entry[regSize]; }
/** * Creates an instance. * * @param positions {@code null-ok;} positions (line numbers) to encode * @param locals {@code null-ok;} local variables to encode * @param file {@code null-ok;} may only be {@code null} if simply using * this class to do a debug print * @param codeSize * @param regSize * @param isStatic * @param ref */ public DebugInfoEncoder(PositionList positions, LocalList locals, DexFile file, int codeSize, int regSize, boolean isStatic, CstMethodRef ref) { this.positions = positions; this.locals = locals; this.file = file; this.desc = ref.getPrototype(); this.isStatic = isStatic; this.codeSize = codeSize; this.regSize = regSize; output = new ByteArrayAnnotatedOutput(); lastEntryForReg = new LocalList.Entry[regSize]; }
/** * Creates an instance. * * @param positions {@code null-ok;} positions (line numbers) to encode * @param locals {@code null-ok;} local variables to encode * @param file {@code null-ok;} may only be {@code null} if simply using * this class to do a debug print * @param codeSize * @param regSize * @param isStatic * @param ref */ public DebugInfoEncoder(PositionList positions, LocalList locals, DexFile file, int codeSize, int regSize, boolean isStatic, CstMethodRef ref) { this.positions = positions; this.locals = locals; this.file = file; this.desc = ref.getPrototype(); this.isStatic = isStatic; this.codeSize = codeSize; this.regSize = regSize; output = new ByteArrayAnnotatedOutput(); lastEntryForReg = new LocalList.Entry[regSize]; }
/** * Creates an instance. * * @param positions {@code null-ok;} positions (line numbers) to encode * @param locals {@code null-ok;} local variables to encode * @param file {@code null-ok;} may only be {@code null} if simply using * this class to do a debug print * @param codeSize * @param regSize * @param isStatic * @param ref */ public DebugInfoEncoder(PositionList positions, LocalList locals, DexFile file, int codeSize, int regSize, boolean isStatic, CstMethodRef ref) { this.positions = positions; this.locals = locals; this.file = file; this.desc = ref.getPrototype(); this.isStatic = isStatic; this.codeSize = codeSize; this.regSize = regSize; output = new ByteArrayAnnotatedOutput(); lastEntryForReg = new LocalList.Entry[regSize]; }
/** * Creates an instance. * * @param positions {@code null-ok;} positions (line numbers) to encode * @param locals {@code null-ok;} local variables to encode * @param file {@code null-ok;} may only be {@code null} if simply using * this class to do a debug print * @param codeSize * @param regSize * @param isStatic * @param ref */ public DebugInfoEncoder(PositionList positions, LocalList locals, DexFile file, int codeSize, int regSize, boolean isStatic, CstMethodRef ref) { this.positions = positions; this.locals = locals; this.file = file; this.desc = ref.getPrototype(); this.isStatic = isStatic; this.codeSize = codeSize; this.regSize = regSize; output = new ByteArrayAnnotatedOutput(); lastEntryForReg = new LocalList.Entry[regSize]; }
/** * Creates an instance. * * @param positions {@code null-ok;} positions (line numbers) to encode * @param locals {@code null-ok;} local variables to encode * @param file {@code null-ok;} may only be {@code null} if simply using * this class to do a debug print * @param codeSize * @param regSize * @param isStatic * @param ref */ public DebugInfoEncoder(PositionList positions, LocalList locals, DexFile file, int codeSize, int regSize, boolean isStatic, CstMethodRef ref) { this.positions = positions; this.locals = locals; this.file = file; this.desc = ref.getPrototype(); this.isStatic = isStatic; this.codeSize = codeSize; this.regSize = regSize; output = new ByteArrayAnnotatedOutput(); lastEntryForReg = new LocalList.Entry[regSize]; }
/** * Creates an instance. * * @param positions {@code null-ok;} positions (line numbers) to encode * @param locals {@code null-ok;} local variables to encode * @param file {@code null-ok;} may only be {@code null} if simply using * this class to do a debug print * @param codeSize * @param regSize * @param isStatic * @param ref */ public DebugInfoEncoder(PositionList positions, LocalList locals, DexFile file, int codeSize, int regSize, boolean isStatic, CstMethodRef ref) { this.positions = positions; this.locals = locals; this.file = file; this.desc = ref.getPrototype(); this.isStatic = isStatic; this.codeSize = codeSize; this.regSize = regSize; output = new ByteArrayAnnotatedOutput(); lastEntryForReg = new LocalList.Entry[regSize]; }
/** * Creates an instance. * * @param positions {@code null-ok;} positions (line numbers) to encode * @param locals {@code null-ok;} local variables to encode * @param file {@code null-ok;} may only be {@code null} if simply using * this class to do a debug print * @param codeSize * @param regSize * @param isStatic * @param ref */ public DebugInfoEncoder(PositionList positions, LocalList locals, DexFile file, int codeSize, int regSize, boolean isStatic, CstMethodRef ref) { this.positions = positions; this.locals = locals; this.file = file; this.desc = ref.getPrototype(); this.isStatic = isStatic; this.codeSize = codeSize; this.regSize = regSize; output = new ByteArrayAnnotatedOutput(); lastEntryForReg = new LocalList.Entry[regSize]; }
this.desc = ref.getPrototype(); this.file = file; this.regSize = regSize;
this.desc = ref.getPrototype(); this.file = file; this.regSize = regSize;
this.desc = ref.getPrototype(); this.file = file; this.regSize = regSize;
this.desc = ref.getPrototype(); this.file = file; this.regSize = regSize;
this.desc = ref.getPrototype(); this.file = file; this.regSize = regSize;
this.desc = ref.getPrototype(); this.file = file; this.regSize = regSize;
this.desc = ref.getPrototype(); this.file = file; this.regSize = regSize;
/** * Extracts all types from the method signature. */ private static void processSignature(CstMethodRef methodRef, Set<String> dependencies) { Prototype prototype= methodRef.getPrototype(); // Parameter types. StdTypeList parameters= prototype.getParameterTypes(); for (int i= 0; i < parameters.size(); ++i) { String parameterType= parameters.get(i).toHuman(); dependencies.add(parameterType); } // Return type. dependencies.add(prototype.getReturnType().getType().toHuman()); }
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)); } } } }