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

How to use
getInterfaces
method
in
soot.SootClass

Best Java code snippets using soot.SootClass.getInterfaces (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

/**
 * Get whole tree of interfaces on {@code Scene} for class/interface.
 *
 * @param sc
 *          class or interface to get all its interfaces
 * @return all interfaces on {@code Scene} for class or interface
 */
public static List<SootClass> getAllInterfacesOf(SootClass sc) {
 Hierarchy hierarchy = Scene.v().getActiveHierarchy();
 Stream<SootClass> superClassInterfaces = sc.isInterface() ? Stream.empty()
   : hierarchy.getSuperclassesOf(sc).stream().map(HierarchyUtils::getAllInterfacesOf).flatMap(Collection::stream);
 Stream<SootClass> directInterfaces = Stream.concat(sc.getInterfaces().stream(),
   sc.getInterfaces().stream().map(HierarchyUtils::getAllInterfacesOf).flatMap(Collection::stream));
 return Stream.concat(superClassInterfaces, directInterfaces).collect(toList());
}
origin: Sable/soot

private Set<SootClass> getParentsOfIncluding(Collection<SootClass> classes) {
 final Set<SootClass> parents = new HashSet<>(classes);
 for (SootClass clazz : classes) {
  // add implementing interfaces
  parents.addAll(clazz.getInterfaces());
  // add extending class if any
  if (!clazz.isInterface() && clazz.hasSuperclass()) {
   parents.add(clazz.getSuperclass());
  }
  // and superclasses (superinterfaces) of passed applicationClass
  parents.addAll(clazz.isInterface() ? Scene.v().getActiveHierarchy().getSuperinterfacesOfIncluding(clazz)
    : Scene.v().getActiveHierarchy().getSuperclassesOfIncluding(clazz));
 }
 return parents;
}
origin: Sable/soot

if (c.isInterface()) {
 List<SootClass> l2 = interfaceToDirSuperinterfaces.get(c);
 for (SootClass i : c.getInterfaces()) {
  if (c.resolvingLevel() < SootClass.HIERARCHY) {
   continue;
 for (SootClass i : c.getInterfaces()) {
  if (c.resolvingLevel() < SootClass.HIERARCHY) {
   continue;
origin: Sable/soot

for (Iterator<SootClass> i = sClass.getInterfaces().iterator(); i.hasNext();) {
 TypeNode parent = hierarchy.typeNode(RefType.v((i.next()).getName()));
 plist.add(parent);
origin: Sable/soot

private static Collection<AncestryTreeNode> buildAncestryTree(RefType root) {
 if (root.getSootClass().isPhantom()) {
  return Collections.emptyList();
 }
 LinkedList<AncestryTreeNode> leafs = new LinkedList<AncestryTreeNode>();
 leafs.add(new AncestryTreeNode(null, root));
 LinkedList<AncestryTreeNode> r = new LinkedList<AncestryTreeNode>();
 final RefType objectType = RefType.v("java.lang.Object");
 while (!leafs.isEmpty()) {
  AncestryTreeNode node = leafs.remove();
  if (TypeResolver.typesEqual(node.type, objectType)) {
   r.add(node);
  } else {
   SootClass sc = node.type.getSootClass();
   for (SootClass i : sc.getInterfaces()) {
    leafs.add(new AncestryTreeNode(node, (i).getType()));
   }
   // The superclass of all interfaces is Object
   // -- try to discard phantom interfaces.
   if ((!sc.isInterface() || sc.getInterfaceCount() == 0) && !sc.isPhantom()) {
    leafs.add(new AncestryTreeNode(node, sc.getSuperclass().getType()));
   }
  }
 }
 return r;
}
origin: Sable/soot

public void reResolveHierarchy(SootClass sc, int level) {
 // Bring superclasses to hierarchy
 SootClass superClass = sc.getSuperclassUnsafe();
 if (superClass != null) {
  addToResolveWorklist(superClass, level);
 }
 SootClass outerClass = sc.getOuterClassUnsafe();
 if (outerClass != null) {
  addToResolveWorklist(outerClass, level);
 }
 for (SootClass iface : sc.getInterfaces()) {
  addToResolveWorklist(iface, level);
 }
}
origin: Sable/soot

private List<SootClass> getExceptionSpec(SootClass intrface, NumberedString sig) {
 SootMethod sm = intrface.getMethodUnsafe(sig);
 if (sm != null) {
  return sm.getExceptions();
 }
 List<SootClass> result = null;
 SootClass obj = Scene.v().getSootClass("java.lang.Object");
 sm = obj.getMethodUnsafe(sig);
 if (sm.getExceptionsUnsafe() == null) {
  return Collections.emptyList();
 }
 if (sm != null) {
  result = new Vector<SootClass>(sm.getExceptions());
 }
 for (SootClass suprintr : intrface.getInterfaces()) {
  List<SootClass> other = getExceptionSpec(suprintr, sig);
  if (other != null) {
   if (result == null) {
    result = other;
   } else {
    result.retainAll(other);
   }
  }
 }
 return result;
}
origin: Sable/soot

for (SootClass interf : sc.getInterfaces()) {
 if (canStoreClassClassic(interf, parent)) {
  return true;
origin: Sable/soot

private List<SootClass> getParentsOfIncluding(SootClass applicationClass) {
 // result contains of interfaces that implements passed applicationClass
 final List<SootClass> result = HierarchyUtils.getAllInterfacesOf(applicationClass);
 // add implementing interfaces
 result.addAll(applicationClass.getInterfaces());
 // add extending class if any
 if (!applicationClass.isInterface() && applicationClass.hasSuperclass()) {
  result.add(applicationClass.getSuperclass());
 }
 // and superclasses (superinterfaces) of passed applicationClass
 result.addAll(
   applicationClass.isInterface() ? Scene.v().getActiveHierarchy().getSuperinterfacesOfIncluding(applicationClass)
     : Scene.v().getActiveHierarchy().getSuperclassesOfIncluding(applicationClass));
 return result;
}
origin: Sable/soot

final Queue<SootClass> queue = new ArrayDeque<>(selectedClass.getInterfaces());
while (!queue.isEmpty()) {
 final SootClass iface = queue.poll();
 queue.addAll(iface.getInterfaces());
origin: Sable/soot

Iterator<SootClass> interfaceIt = cl.getInterfaces().iterator();
origin: Sable/soot

Iterator<SootClass> interfaceIt = cl.getInterfaces().iterator();
while (interfaceIt.hasNext()) {
 String interfacePackage = ((SootClass) interfaceIt.next()).toString();
Iterator<SootClass> interfaceIt = cl.getInterfaces().iterator();
origin: Sable/soot

Iterator<SootClass> implementedInterfaces = sc.getInterfaces().iterator();
int i = 0;
while (implementedInterfaces.hasNext()) {
origin: Sable/soot

Iterator interfaceIt = c.getInterfaces().iterator();
while (interfaceIt.hasNext()) {
 SootClass interfaceClass = (SootClass) interfaceIt.next();
origin: Sable/soot

for (Iterator<SootClass> i = sClass.getInterfaces().iterator(); i.hasNext();) {
 TypeNode parent = hierarchy.typeNode(ArrayType.v(RefType.v((i.next()).getName()), type.numDimensions));
 plist.add(parent);
origin: Sable/soot

  = xmlClassNode.addChild("interfaces", "", new String[] { "count" }, new String[] { cl.getInterfaceCount() + "" });
Iterator<SootClass> interfaceIt = cl.getInterfaces().iterator();
if (interfaceIt.hasNext()) {
 while (interfaceIt.hasNext()) {
origin: Sable/soot

if (!c.getInterfaces().isEmpty()) {
 interfaces = new ArrayList<String>();
 for (SootClass ifc : c.getInterfaces()) {
  interfaces.add(SootToDexUtils.getDexTypeDescriptor(ifc.getType()));
origin: Sable/soot

queue.addAll(cl.getInterfaces());
while (true) {
 SootClass iface = queue.poll();
  return checkStatic(ifaceField);
 queue.addAll(iface.getInterfaces());
origin: Sable/soot

for (final SootClass supercl : cl.getInterfaces()) {
 if (cl.isInterface()) {
  interfaceToSubinterfaces.put(supercl, cl);
origin: Sable/soot

Iterator<SootClass> interfaceIt = sootClass.getInterfaces().iterator();
sootSootClassgetInterfaces

Javadoc

Returns a backed Chain of the interfaces that are directly implemented by this class. (see getInterfaceCount())

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.
  • 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
  • getType
    Returns the RefType corresponding to this class.
  • getMethod,
  • getType,
  • isApplicationClass,
  • isLibraryClass,
  • addField,
  • isAbstract,
  • isPhantom,
  • <init>,
  • declaresField

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • putExtra (Intent)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JLabel (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
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