public Type getType() { return m.getParameterType(param); }
Type type = iccMethod.getParameterType(i); Local local = lg.generateLocal(type); locals.add(local);
public Type getType() { if (index == PointsToAnalysis.RETURN_NODE) { return method.getReturnType(); } return method.getParameterType(index); }
@Override protected boolean acceptMethod(SootMethod m) { if (!at.possibleSizes.contains(m.getParameterCount())) { return false; } for (int i = 0; i < m.getParameterCount(); i++) { if (at.possibleTypes[i].isEmpty()) { continue; } if (!isReflectionCompatible(m.getParameterType(i), at.possibleTypes[i])) { return false; } } return true; }
final public Node caseParm(int index) { VarNode ret = pag.makeLocalVarNode(new Pair<SootMethod, Integer>(method, new Integer(index)), method.getParameterType(index), method); ret.setInterProcTarget(); return ret; }
public static EquivalentValue getNodeForParameterRef(SootMethod sm, int i) { return new CachedEquivalentValue(new ParameterRef(sm.getParameterType(i), i)); }
/** Sets the method for which a graph is currently being built. */ private void setCurrentMethod(SootMethod m) { method = m; if (!m.isStatic()) { SootClass c = m.getDeclaringClass(); if (c == null) { throw new RuntimeException("Method " + m + " has no declaring class"); } caseThis(); } for (int i = 0; i < m.getParameterCount(); i++) { if (m.getParameterType(i) instanceof RefLikeType) { caseParm(i); } } Type retType = m.getReturnType(); if (retType instanceof RefLikeType) { caseRet(); } }
Type paramType = sm.getParameterType(i); paramRegNum += SootToDexUtils.getDexWords(paramType);
localCount += sizeOfType(method.getParameterType(i));
localCount += sizeOfType(method.getParameterType(i));
protected void buildNative() { ValNode thisNode = null; ValNode retNode = null; if (!method.isStatic()) { thisNode = (ValNode) nodeFactory.caseThis(); } if (method.getReturnType() instanceof RefLikeType) { retNode = (ValNode) nodeFactory.caseRet(); // on library analysis we assume that the return type of an native method can // be anything matching to the declared type. if (pag.getCGOpts().library() != CGOptions.library_disabled) { Type retType = method.getReturnType(); retType.apply(new SparkLibraryHelper(pag, retNode, method)); } } ValNode[] args = new ValNode[method.getParameterCount()]; for (int i = 0; i < method.getParameterCount(); i++) { if (!(method.getParameterType(i) instanceof RefLikeType)) { continue; } args[i] = (ValNode) nodeFactory.caseParm(i); } pag.nativeMethodDriver.process(method, thisNode, retNode, args); }
&& fieldSets.contains(sootMethod.getName())) { found = true; fieldSetGetType = sootMethod.getParameterType(1); // assign
if (!(tgt.getParameterType(i) instanceof RefLikeType)) { continue; if (!(tgt.getParameterType(i) instanceof RefLikeType)) { continue;
for (int i = 0; i < useStmt.getInvokeExpr().getArgCount(); i++) { if (useStmt.getInvokeExpr().getArg(i) == usePair.getValueBox().getValue()) { et = useStmt.getInvokeExpr().getMethod().getParameterType(i); at = et.makeArrayType(); break outer;
public Type getType() { return m.getParameterType(param); }
public Type getType() { return m.getParameterType(param); }
public static EquivalentValue getNodeForParameterRef(SootMethod sm, int i) { return new CachedEquivalentValue(new ParameterRef(sm.getParameterType(i), i)); }
public static EquivalentValue getNodeForParameterRef(SootMethod sm, int i) { return new CachedEquivalentValue(new ParameterRef(sm.getParameterType(i), i)); }
@Override public int compare(SootMethod o1, SootMethod o2) { if (o1.getParameterCount() == o2.getParameterCount()) { int o1Prims = 0, o2Prims = 0; for (int i = 0; i < o1.getParameterCount(); i++) if (o1.getParameterType(i) instanceof PrimType) o1Prims++; for (int i = 0; i < o2.getParameterCount(); i++) if (o2.getParameterType(i) instanceof PrimType) o2Prims++; return o1Prims - o2Prims; } return o1.getParameterCount() - o2.getParameterCount(); }
Local paramLocal = Jimple.v().newLocal("param" + i, method.getParameterType(i)); b.getLocals().add(paramLocal); b.getUnits().add( Jimple.v().newIdentityStmt(paramLocal, Jimple.v().newParameterRef(method.getParameterType(i), i))); if (i == 0) firstParam = paramLocal;