Codota Logo
soot
Code IndexAdd Codota to your IDE (free)

How to use soot

Best Java code snippets using soot (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: Sable/soot

public void toString(UnitPrinter up) {
 if (!supressDeclaringClass) {
  up.type(fieldRef.declaringClass().getType());
  up.literal(".");
 }
 up.fieldRef(fieldRef);
}
origin: Sable/soot

private SootMethodRef makeMethodRef(String methodName, ArrayList args) {
 // make MethodRef for methodName
 SootMethod method = Scene.v().makeSootMethod(methodName, args, RefType.v("java.lang.Object"));
 // set the declaring class of new method to be the DavaSuperHandler
 // class
 method.setDeclaringClass(new SootClass("DavaSuperHandler"));
 return method.makeRef();
}
origin: Sable/soot

public void toString(UnitPrinter up) {
 testExprBox.getValue().toString(up);
 up.literal(" ? ");
 trueExprBox.getValue().toString(up);
 up.literal(" : ");
 falseExprBox.getValue().toString(up);
}
origin: Sable/soot

private synchronized void ensureClassHasBodies(SootClass cl) {
 assert Scene.v().hasFastHierarchy();
 if (cl.resolvingLevel() < SootClass.BODIES) {
  Scene.v().forceResolve(cl.getName(), SootClass.BODIES);
  Scene.v().getOrMakeFastHierarchy();
 }
 assert Scene.v().hasFastHierarchy();
}
origin: Sable/soot

private void loadBooleanValue(PatchingChain<Unit> units, SootField f, Unit insert) {
 units.insertBefore(Baf.v().newStaticGetInst(f.makeRef()), insert);
 if (f.getType() instanceof RefType) {
  SootMethod boolInit = ((RefType) f.getType()).getSootClass().getMethod("boolean booleanValue()");
  units.insertBefore(Baf.v().newVirtualInvokeInst(boolInit.makeRef()), insert);
 }
}
origin: Sable/soot

public void handleNewAnalysis(Transform t, Body b) {
 // here save current phase name and only send if actual data flow analysis exists
 if (PhaseOptions.getBoolean(PhaseOptions.v().getPhaseOptions(t.getPhaseName()), "enabled")) {
  String name = t.getPhaseName() + " for method: " + b.getMethod().getName();
  currentPhaseName(name);
  currentPhaseEnabled(true);
  doneCurrent(false);
 } else {
  currentPhaseEnabled(false);
  setInteractThisAnalysis(false);
 }
}
origin: Sable/soot

 /**
  * Returns true if the given method is visible to client code.
  */
 private static boolean visible(SootMethod mPrime) {
  SootClass cPrime = mPrime.getDeclaringClass();
  return (cPrime.isPublic() || cPrime.isProtected() || (!cPrime.isPrivate() && !ASSUME_PACKAGES_SEALED))
    && (mPrime.isPublic() || mPrime.isProtected() || (!mPrime.isPrivate() && !ASSUME_PACKAGES_SEALED));
 }
}
origin: Sable/soot

public ClassHierarchy(Singletons.Global g) {
 typeNodeMap.put(BooleanType.v(), BOOLEAN);
 typeNodeMap.put(ByteType.v(), BYTE);
 typeNodeMap.put(ShortType.v(), SHORT);
 typeNodeMap.put(CharType.v(), CHAR);
 typeNodeMap.put(IntType.v(), INT);
}
origin: Sable/soot

 @Override
 public List<Value> load(SootMethod m) throws Exception {
  return m.getActiveBody().getParameterRefs();
 }
});
origin: Sable/soot

 public void toString(UnitPrinter up) {
  up.startUnitBox(this);
  up.unitRef(unit, isBranchTarget());
  up.endUnitBox(this);
 }
}
origin: Sable/soot

protected void addToResolveWorklist(Type type, int level) {
 // We go from Type -> SootClass directly, since RefType.getSootClass
 // calls makeClassRef anyway
 if (type instanceof RefType) {
  addToResolveWorklist(((RefType) type).getSootClass(), level);
 } else if (type instanceof ArrayType) {
  addToResolveWorklist(((ArrayType) type).baseType, level);
 }
 // Other types ignored
}
origin: Sable/soot

@Override
public void toString(UnitPrinter up) {
 up.literal(Jimple.IF);
 up.literal(" ");
 conditionBox.toString(up);
 up.literal(" ");
 up.literal(Jimple.GOTO);
 up.literal(" ");
 targetBox.toString(up);
}
origin: Sable/soot

private Map<String, String> mapForPhase(String phaseName) {
 HasPhaseOptions phase = getPM().getPhase(phaseName);
 if (phase == null) {
  return null;
 }
 return mapForPhase(phase);
}
origin: Sable/soot

public void toString(UnitPrinter up) {
 opBox.toString(up);
 up.literal(" ");
 up.literal(Jimple.INSTANCEOF);
 up.literal(" ");
 up.type(checkType);
}
origin: Sable/soot

/**
 * Retrieves the active hierarchy
 */
public Hierarchy getActiveHierarchy() {
 if (!hasActiveHierarchy()) {
  // throw new RuntimeException("no active Hierarchy present for
  // scene");
  setActiveHierarchy(new Hierarchy());
 }
 return activeHierarchy;
}
origin: Sable/soot

public static AnySubType v(RefType base) {
 if (base.getAnySubType() == null) {
  synchronized (base) {
   if (base.getAnySubType() == null) {
    base.setAnySubType(new AnySubType(base));
   }
  }
 }
 return base.getAnySubType();
}
origin: Sable/soot

/**
 * Convenience method returning true if this method is private.
 */
@Override
public boolean isPrivate() {
 return Modifier.isPrivate(this.getModifiers());
}
origin: Sable/soot

/**
 * Convenience method returning true if this method is final.
 */
public boolean isFinal() {
 return Modifier.isFinal(this.getModifiers());
}
origin: Sable/soot

/**
 * Convenience method returning true if this class is static.
 */
public boolean isStatic() {
 return Modifier.isStatic(this.getModifiers());
}
origin: Sable/soot

public void toString(UnitPrinter up) {
 leftBox.toString(up);
 up.literal(" = ");
 rightBox.toString(up);
}
soot

Most used classes

  • Scene
    Manages the SootClasses of the application being analyzed.
  • SootClass
    Soot representation of a Java class. They are usually created by a Scene, but can also be constructe
  • SootMethod
    Soot representation of a Java method. Can be declared to belong to a SootClass. Does not contain the
  • Body
    Abstract base class that models the body (code attribute) of a Java method. Classes that implement a
  • Value
    Data used as, for instance, arguments to instructions; typical implementations are constants or expr
  • G,
  • RefType,
  • DefinitionStmt,
  • InstanceInvokeExpr,
  • InvokeExpr,
  • Stmt,
  • Options,
  • SootField,
  • Type,
  • ReturnStmt,
  • CallGraph,
  • Hierarchy,
  • PackManager,
  • ValueBox
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now