Tabnine Logo
SootClass.setApplicationClass
Code IndexAdd Tabnine to your IDE (free)

How to use
setApplicationClass
method
in
soot.SootClass

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

origin: Sable/soot

private void loadNecessaryClass(String name) {
 SootClass c;
 c = loadClassAndSupport(name);
 c.setApplicationClass();
}
origin: Sable/soot

tclass.setApplicationClass();
origin: Sable/soot

s.setApplicationClass();
s.setApplicationClass();
continue;
s.setApplicationClass();
origin: Sable/soot

RTI = new ReflectionTraceInfo(logFilePath);
Scene.v().getSootClass(SootSig.class.getName()).setApplicationClass();
Scene.v().getSootClass(UnexpectedReflectiveCall.class.getName()).setApplicationClass();
Scene.v().getSootClass(IUnexpectedReflectiveCallHandler.class.getName()).setApplicationClass();
Scene.v().getSootClass(DefaultHandler.class.getName()).setApplicationClass();
Scene.v().getSootClass(OpaquePredicate.class.getName()).setApplicationClass();
Scene.v().getSootClass(ReflectiveCalls.class.getName()).setApplicationClass();
reflectiveCallsClass.setApplicationClass();
origin: Sable/soot

/**
 * Load the set of classes that soot needs, including those specified on the command-line. This is the standard way of
 * initialising the list of classes soot should use.
 */
public void loadNecessaryClasses() {
 loadBasicClasses();
 for (String name : Options.v().classes()) {
  loadNecessaryClass(name);
 }
 loadDynamicClasses();
 if (Options.v().oaat()) {
  if (Options.v().process_dir().isEmpty()) {
   throw new IllegalArgumentException("If switch -oaat is used, then also -process-dir must be given.");
  }
 } else {
  for (final String path : Options.v().process_dir()) {
   for (String cl : SourceLocator.v().getClassesUnder(path)) {
    SootClass theClass = loadClassAndSupport(cl);
    if (!theClass.isPhantom) {
     theClass.setApplicationClass();
    }
   }
  }
 }
 prepareClasses();
 setDoneResolving();
}
origin: Sable/soot

private soot.SootClass getSpecialInterfaceAnonClass(soot.SootClass addToClass) {
 // check to see if there is already a special anon class for this
 // interface
 if ((InitialResolver.v().specialAnonMap() != null) && (InitialResolver.v().specialAnonMap().containsKey(addToClass))) {
  return InitialResolver.v().specialAnonMap().get(addToClass);
 } else {
  String specialClassName = addToClass.getName() + "$" + InitialResolver.v().getNextAnonNum();
  // add class to scene and other maps and lists as needed
  soot.SootClass specialClass = new soot.SootClass(specialClassName);
  soot.Scene.v().addClass(specialClass);
  specialClass.setApplicationClass();
  specialClass.addTag(new soot.tagkit.SyntheticTag());
  specialClass.setSuperclass(soot.Scene.v().getSootClass("java.lang.Object"));
  Util.addInnerClassTag(addToClass, specialClass.getName(), addToClass.getName(), null, soot.Modifier.STATIC);
  Util.addInnerClassTag(specialClass, specialClass.getName(), addToClass.getName(), null, soot.Modifier.STATIC);
  InitialResolver.v().addNameToAST(specialClassName);
  references.add(RefType.v(specialClassName));
  if (InitialResolver.v().specialAnonMap() == null) {
   InitialResolver.v().setSpecialAnonMap(new HashMap<SootClass, SootClass>());
  }
  InitialResolver.v().specialAnonMap().put(addToClass, specialClass);
  return specialClass;
 }
}
origin: Sable/soot

/**
 * @ast method 
 * @aspect EmitJimple
 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:186
 */
public void jimplify1phase2() {
 SootClass sc = getSootClassDecl();
 sc.setResolvingLevel(SootClass.DANGLING);
 sc.setModifiers(sootTypeModifiers());
 sc.setApplicationClass();
 SourceFileTag st = new soot.tagkit.SourceFileTag(sourceNameWithoutPath());
 st.setAbsolutePath(compilationUnit().pathName());
 sc.addTag(st);
 sc.setSuperclass(typeObject().getSootClassDecl());
 for(Iterator iter = superinterfacesIterator(); iter.hasNext(); ) {
  TypeDecl typeDecl = (TypeDecl)iter.next();
  if(typeDecl != typeObject() && !sc.implementsInterface(typeDecl.getSootClassDecl().getName()))
   sc.addInterface(typeDecl.getSootClassDecl());
 }
 if(isNestedType())
  sc.setOuterClass(enclosingType().getSootClassDecl());
 sc.setResolvingLevel(SootClass.HIERARCHY);
 super.jimplify1phase2();
 sc.setResolvingLevel(SootClass.SIGNATURES);
}
/**
origin: Sable/soot

/**
 * @ast method 
 * @aspect EmitJimple
 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:163
 */
public void jimplify1phase2() {
 SootClass sc = getSootClassDecl();
 sc.setResolvingLevel(SootClass.DANGLING);
 sc.setModifiers(sootTypeModifiers());
 sc.setApplicationClass();
 SourceFileTag st = new soot.tagkit.SourceFileTag(sourceNameWithoutPath());
 st.setAbsolutePath(compilationUnit().pathName());
 sc.addTag(st);
 if(hasSuperclass()) {
  sc.setSuperclass(superclass().getSootClassDecl());
 }
 for(Iterator iter = interfacesIterator(); iter.hasNext(); ) {
  TypeDecl typeDecl = (TypeDecl)iter.next();
  if(!sc.implementsInterface(typeDecl.getSootClassDecl().getName()))
   sc.addInterface(typeDecl.getSootClassDecl());
 }
 if(isNestedType())
  sc.setOuterClass(enclosingType().getSootClassDecl());
 sc.setResolvingLevel(SootClass.HIERARCHY);
 super.jimplify1phase2();
 sc.setResolvingLevel(SootClass.SIGNATURES);
}
/**
origin: Sable/soot

mediatingClass.setApplicationClass();
mediatingClass.setInScene(true);
origin: Sable/soot

clazz.setApplicationClass();
origin: com.bugvm/bugvm-soot

private void loadNecessaryClass(String name) {
  SootClass c;
  c = loadClassAndSupport(name);
  c.setApplicationClass();
}
/** Load the set of classes that soot needs, including those specified on the
origin: ibinti/bugvm

private void loadNecessaryClass(String name) {
  SootClass c;
  c = loadClassAndSupport(name);
  c.setApplicationClass();
}
/** Load the set of classes that soot needs, including those specified on the
origin: com.bugvm/bugvm-soot

/** Load the set of classes that soot needs, including those specified on the
 *  command-line. This is the standard way of initialising the list of
 *  classes soot should use.
 */
public void loadNecessaryClasses() {
loadBasicClasses();
  Iterator<String> it = Options.v().classes().iterator();
  while (it.hasNext()) {
    String name = (String) it.next();
    loadNecessaryClass(name);
  }
  loadDynamicClasses();
  for( Iterator<String> pathIt = Options.v().process_dir().iterator(); pathIt.hasNext(); ) {
    final String path = (String) pathIt.next();
    for (String cl : SourceLocator.v().getClassesUnder(path)) {
      loadClassAndSupport(cl).setApplicationClass();
    }
  }
  prepareClasses();
  // RoboVM note: In RoboVM we're never done resolving
  //setDoneResolving();
}
origin: ibinti/bugvm

/** Load the set of classes that soot needs, including those specified on the
 *  command-line. This is the standard way of initialising the list of
 *  classes soot should use.
 */
public void loadNecessaryClasses() {
loadBasicClasses();
  Iterator<String> it = Options.v().classes().iterator();
  while (it.hasNext()) {
    String name = (String) it.next();
    loadNecessaryClass(name);
  }
  loadDynamicClasses();
  for( Iterator<String> pathIt = Options.v().process_dir().iterator(); pathIt.hasNext(); ) {
    final String path = (String) pathIt.next();
    for (String cl : SourceLocator.v().getClassesUnder(path)) {
      loadClassAndSupport(cl).setApplicationClass();
    }
  }
  prepareClasses();
  // RoboVM note: In RoboVM we're never done resolving
  //setDoneResolving();
}
origin: com.bugvm/bugvm-soot

if( s.isPhantom() ) continue;
if(Options.v().app()) {
  s.setApplicationClass();
  s.setApplicationClass();
  continue;
  final String pkg = (String) pkgIt.next();
  if ((s.getPackageName()+".").startsWith(pkg))
    s.setApplicationClass();
origin: viadee/vPAV

sootClass.setApplicationClass();
Scene.v().loadNecessaryClasses();
for (SootMethod method : sootClass.getMethods()) {
origin: secure-software-engineering/FlowDroid

/**
 * Creates the main method based on the current callback information, injects it
 * into the Soot scene.
 * 
 * @param The class name of a component to create a main method containing only
 *            that component, or null to create main method for all components
 */
private void createMainMethod(SootClass component) {
  // There is no need to create a main method if we don't want to generate
  // a callgraph
  if (config.getSootIntegrationMode() == SootIntegrationMode.UseExistingCallgraph)
    return;
  // Always update the entry point creator to reflect the newest set
  // of callback methods
  entryPointCreator = createEntryPointCreator(component);
  SootMethod dummyMainMethod = entryPointCreator.createDummyMain();
  Scene.v().setEntryPoints(Collections.singletonList(dummyMainMethod));
  if (!dummyMainMethod.getDeclaringClass().isInScene())
    Scene.v().addClass(dummyMainMethod.getDeclaringClass());
  // addClass() declares the given class as a library class. We need to
  // fix this.
  dummyMainMethod.getDeclaringClass().setApplicationClass();
}
origin: secure-software-engineering/FlowDroid

createdClass.setApplicationClass();
Local localVal = generateClassConstructor(createdClass, body);
if (localVal == null) {
origin: secure-software-engineering/FlowDroid

@Override
public SootMethod createDummyMain() {
  // Load the substitution classes
  if (substituteCallParams)
    for (String className : substituteClasses)
      Scene.v().forceResolve(className, SootClass.BODIES).setApplicationClass();
  // Create the empty main method
  createAdditionalFields();
  createAdditionalMethods();
  createEmptyMainMethod();
  body = mainMethod.getActiveBody();
  // We provide some helper objects
  final Body body = mainMethod.getActiveBody();
  generator = new LocalGenerator(body);
  // Make sure that we have an opaque predicate
  conditionCounter = 0;
  intCounter = generator.generateLocal(IntType.v());
  body.getUnits().add(Jimple.v().newAssignStmt(intCounter, IntConstant.v(conditionCounter)));
  return createDummyMainInternal();
}
origin: edu.psu.cse.siis/coal

@Override
protected void initializeAnalysis(A commandLineArguments) {
 addSceneTransformer();
 Options.v().set_no_bodies_for_excluded(true);
 Options.v().set_allow_phantom_refs(true);
 Options.v().set_output_format(Options.output_format_none);
 Options.v().set_whole_program(true);
 Options.v().set_soot_classpath(
   commandLineArguments.getInput() + File.pathSeparator + commandLineArguments.getClasspath());
 Options.v().setPhaseOption("cg.spark", "on");
 // do not merge variables (causes problems with PointsToSets)
 Options.v().setPhaseOption("jb.ulp", "off");
 // Options.v().setPhaseOption("jb.ne", "off");
 Options.v().setPhaseOption("jb.uce", "remove-unreachable-traps:true");
 Options.v().setPhaseOption("cg", "trim-clinit:false");
 Options.v().set_prepend_classpath(true);
 Options.v().set_src_prec(Options.src_prec_java);
 for (String analysisClass : AnalysisParameters.v().getAnalysisClasses()) {
  SootClass sootClass = Scene.v().loadClassAndSupport(analysisClass);
  Scene.v().forceResolve(analysisClass, SootClass.BODIES);
  sootClass.setApplicationClass();
 }
 Scene.v().loadNecessaryClasses();
 Scene.v().setMainClassFromOptions();
 Scene.v().setEntryPoints(EntryPoints.v().application());
}
sootSootClasssetApplicationClass

Javadoc

Makes this class an application class.

Popular methods of SootClass

  • isInterface
    Convenience method; returns true if this class is an interface.
  • getMethods
  • getName
    Returns the name of this 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
  • getType
    Returns the RefType corresponding to this class.
  • getMethod,
  • getType,
  • isApplicationClass,
  • isLibraryClass,
  • addField,
  • isAbstract,
  • isPhantom,
  • <init>,
  • declaresField

Popular in Java

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JFrame (javax.swing)
  • Join (org.hibernate.mapping)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now