@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { List<SootClass> thrownExceptions; if (exceptions == null || exceptions.length == 0) { thrownExceptions = Collections.emptyList(); } else { int len = exceptions.length; thrownExceptions = new ArrayList<SootClass>(len); for (int i = 0; i != len; i++) { String ex = AsmUtil.toQualifiedName(exceptions[i]); addDep(RefType.v(ex)); thrownExceptions.add(SootResolver.v().makeClassRef(ex)); } } List<soot.Type> sigTypes = AsmUtil.toJimpleDesc(desc); for (soot.Type type : sigTypes) { addDep(type); } SootMethod method = Scene.v().makeSootMethod(name, sigTypes, sigTypes.remove(sigTypes.size() - 1), access, thrownExceptions); if (signature != null) { method.addTag(new SignatureTag(signature)); } method = klass.getOrAddMethod(method); return new MethodBuilder(method, this, desc, exceptions); }
= Scene.v().makeSootMethod(name, parameterTypes, returnType, isStatic() ? Modifier.STATIC : 0); phantomMethod.setPhantom(true); phantomMethod = selectedClass.getOrAddMethod(phantomMethod); checkStatic(phantomMethod); return phantomMethod; SootMethod method = Scene.v().makeSootMethod(name, parameterTypes, returnType, isStatic() ? Modifier.STATIC : 0); method.setPhantom(true); method = declaringClass.getOrAddMethod(method); checkStatic(method); return method;
return declaringClass.getOrAddMethod(m);