Codota Logo
SootClass.getType
Code IndexAdd Codota to your IDE (free)

How to use
getType
method
in
soot.SootClass

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

  • Common ways to obtain SootClass
private void myMethod () {
SootClass s =
  • Codota IconString className;Scene.v().getSootClass(className)
  • Codota IconSootMethod sm;sm.getDeclaringClass()
  • Codota IconRefType refType;refType.getSootClass()
  • Smart code suggestions by Codota
}
origin: Sable/soot

/**
 * @ast method
 * @aspect EmitJimple
 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:46
 */
private Type refined_EmitJimple_TypeDecl_getSootType() {
  return getSootClassDecl().getType();
}
origin: Sable/soot

private Collection<Type> getTransitiveSubClasses(Set<SootClass> classRoots) {
 LinkedList<SootClass> worklist = new LinkedList<>(classRoots);
 Set<Type> resolved = new HashSet<>();
 while (!worklist.isEmpty()) {
  SootClass cls = worklist.removeFirst();
  if (!resolved.add(cls.getType())) {
   continue;
  }
  worklist.addAll(fh.getSubclassesOf(cls));
 }
 return resolved;
}
origin: Sable/soot

public boolean validateMatchesForField(SparkField field) {
 if (field instanceof ArrayElement) {
  return true;
 }
 SootField sootField = (SootField) field;
 String fieldTypeStr = sootField.getDeclaringClass().getType().toString();
 for (String typeName : importantTypes) {
  if (fieldTypeStr.equals(typeName)) {
   return true;
  }
 }
 return false;
}
origin: Sable/soot

public boolean validFromBothEnds(SparkField field) {
 if (field instanceof SootField) {
  SootField sootField = (SootField) field;
  RefType declaringType = sootField.getDeclaringClass().getType();
  for (RefType type : notBothEndsTypes) {
   if (manager.castNeverFails(declaringType, type)) {
    return false;
   }
  }
 }
 return true;
}
origin: Sable/soot

private static RefType isHandlerUnit(Chain<Trap> traps, Unit h) {
 Iterator<Trap> it = traps.iterator();
 while (it.hasNext()) {
  Trap t = (Trap) it.next();
  if (t.getHandlerUnit() == h) {
   return t.getException().getType();
  }
 }
 return null;
}
origin: Sable/soot

/** Get type variable for the given soot class. **/
public TypeVariableBV typeVariable(SootClass sootClass) {
 return typeVariable(hierarchy.typeNode(sootClass.getType()));
}
origin: Sable/soot

/** Get type variable for the given soot class. **/
public TypeVariable typeVariable(SootClass sootClass) {
 return typeVariable(hierarchy.typeNode(sootClass.getType()));
}
origin: Sable/soot

public SootMethod resolveSpecial(SpecialInvokeExpr iie, NumberedString subSig, SootMethod container, boolean appOnly) {
 SootMethod target = iie.getMethod();
 /* cf. JVM spec, invokespecial instruction */
 if (Scene.v().getOrMakeFastHierarchy().canStoreType(container.getDeclaringClass().getType(),
   target.getDeclaringClass().getType())
   && container.getDeclaringClass().getType() != target.getDeclaringClass().getType()
   && !target.getName().equals("<init>") && subSig != sigClinit) {
  return resolveNonSpecial(container.getDeclaringClass().getSuperclass().getType(), subSig, appOnly);
 } else {
  return target;
 }
}
origin: Sable/soot

public void toString(UnitPrinter up) {
 up.type(methodRef.declaringClass().getType());
 up.literal(".");
 super.toString(up);
}
origin: Sable/soot

final public Node caseThis() {
 VarNode ret = pag.makeLocalVarNode(new Pair<SootMethod, String>(method, PointsToAnalysis.THIS_NODE),
   method.getDeclaringClass().getType(), method);
 ret.setInterProcTarget();
 return ret;
}
origin: Sable/soot

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

public void caseFieldGetInst(FieldGetInst i) {
 remove_types = new Type[] { i.getField().getDeclaringClass().getType() };
 add_types = new Type[] { i.getField().getType() };
}
origin: Sable/soot

public void caseFieldPutInst(FieldPutInst i) {
 remove_types = new Type[] { i.getField().getDeclaringClass().getType(), i.getField().getType() };
 add_types = null;
}
origin: Sable/soot

public static EquivalentValue getNodeForThisRef(SootMethod sm) {
 return new CachedEquivalentValue(new ThisRef(sm.getDeclaringClass().getType()));
}
origin: Sable/soot

private void handleInstanceFieldRef(InstanceFieldRef ifr, Stmt stmt) {
 ifr.setBase(this.uv.visit(ifr.getBase(), ifr.getFieldRef().declaringClass().getType(), stmt));
}
origin: Sable/soot

final public Node caseNewInstance(VarNode cls) {
 if (cls instanceof ContextVarNode) {
  cls = pag.findLocalVarNode(cls.getVariable());
 }
 VarNode local = pag.makeGlobalVarNode(cls, rtObject);
 for (SootClass cl : Scene.v().dynamicClasses()) {
  AllocNode site = pag.makeAllocNode(new Pair<VarNode, SootClass>(cls, cl), cl.getType(), null);
  pag.addEdge(site, local);
 }
 return local;
}
origin: Sable/soot

private soot.SootMethod makeLiFieldAccessMethod(soot.SootClass classToInvoke, polyglot.types.LocalInstance li) {
 String name = "access$" + soot.javaToJimple.InitialResolver.v().getNextPrivateAccessCounter() + "00";
 ArrayList paramTypes = new ArrayList();
 paramTypes.add(classToInvoke.getType());
 soot.SootMethod meth = Scene.v().makeSootMethod(name, paramTypes, Util.getSootType(li.type()), soot.Modifier.STATIC);
 classToInvoke.addMethod(meth);
 PrivateFieldAccMethodSource src
   = new PrivateFieldAccMethodSource(Util.getSootType(li.type()), "val$" + li.name(), false, classToInvoke);
 meth.setActiveBody(src.getBody(meth, null));
 meth.addTag(new soot.tagkit.SyntheticTag());
 return meth;
}
origin: Sable/soot

private static soot.SootMethod makeOuterThisAccessMethod(soot.SootClass classToInvoke) {
 String name = "access$" + soot.javaToJimple.InitialResolver.v().getNextPrivateAccessCounter() + "00";
 ArrayList paramTypes = new ArrayList();
 paramTypes.add(classToInvoke.getType());
 soot.SootMethod meth
   = Scene.v().makeSootMethod(name, paramTypes, classToInvoke.getFieldByName("this$0").getType(), soot.Modifier.STATIC);
 classToInvoke.addMethod(meth);
 PrivateFieldAccMethodSource src = new PrivateFieldAccMethodSource(classToInvoke.getFieldByName("this$0").getType(),
   "this$0", classToInvoke.getFieldByName("this$0").isStatic(), classToInvoke);
 meth.setActiveBody(src.getBody(meth, null));
 meth.addTag(new soot.tagkit.SyntheticTag());
 return meth;
}
origin: Sable/soot

private void handleInvokeExpr(InvokeExpr ie, Stmt stmt) {
 SootMethodRef m = ie.getMethodRef();
 if (ie instanceof InstanceInvokeExpr) {
  InstanceInvokeExpr iie = (InstanceInvokeExpr) ie;
  iie.setBase(this.uv.visit(iie.getBase(), m.declaringClass().getType(), stmt));
 }
 for (int i = 0; i < ie.getArgCount(); i++) {
  ie.setArg(i, this.uv.visit(ie.getArg(i), m.parameterType(i), stmt));
 }
}
origin: Sable/soot

@Override
protected void internalTransform(Body b, String phaseName, Map<String, String> options) {
 for (Trap t : b.getTraps()) {
  // If the first statement already catches the exception, we're fine
  if (isCaughtExceptionRef(t.getHandlerUnit())) {
   continue;
  }
  // Add the exception reference
  Local l = new LocalGenerator(b).generateLocal(t.getException().getType());
  Stmt caughtStmt = Jimple.v().newIdentityStmt(l, Jimple.v().newCaughtExceptionRef());
  b.getUnits().add(caughtStmt);
  b.getUnits().add(Jimple.v().newGotoStmt(t.getHandlerUnit()));
  t.setHandlerUnit(caughtStmt);
 }
}
sootSootClassgetType

Javadoc

Returns the RefType corresponding to this class.

Popular methods of SootClass

  • isInterface
    Convenience method; returns true if this class is an interface.
  • getMethods
  • getName
    Returns the name of this class.
  • setApplicationClass
    Makes this class an application class.
  • getFields
    Returns a backed Chain of fields.
  • getInterfaces
    Returns a backed Chain of the interfaces that are directly implemented by this class. (see getInterf
  • getSuperclass
    WARNING: interfaces are subclasses of the java.lang.Object class! Returns the superclass of this cla
  • hasSuperclass
    WARNING: interfaces are subclasses of the java.lang.Object class! Does this class have a superclass?
  • resolvingLevel
  • addMethod
    Adds the given method to this class.
  • declaresMethod
    Does this class declare a method with the given subsignature?
  • getMethod
  • declaresMethod,
  • getMethod,
  • isApplicationClass,
  • isLibraryClass,
  • addField,
  • isAbstract,
  • isPhantom,
  • <init>,
  • declaresField

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
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