Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 19 20 package soot; 21 import soot.options.*; 22 import soot.toolkits.astmetrics.ComputeASTMetrics; 23 24 import java.io.*; 25 import java.util.*; 26 import soot.javaToJimple.*; 27 28 30 public class JavaClassSource extends ClassSource 31 { 32 public JavaClassSource( String className, File fullPath ) { 33 super( className ); 34 this.fullPath = fullPath; 35 } 36 public JavaClassSource( String className ) { 37 super( className ); 38 } 39 40 public List resolve( SootClass sc ) { 41 if (Options.v().verbose()) 42 G.v().out.println("resolving [from .java]: " + className); 43 44 45 if (fullPath != null){ 46 InitialResolver.v().formAst(fullPath.getPath(), SourceLocator.v().sourcePath()); 47 } 48 List references = InitialResolver.v().resolveFromJavaFile(sc); 50 51 57 if(Options.v().ast_metrics()){ 58 ComputeASTMetrics metrics = new ComputeASTMetrics(InitialResolver.v().getAst()); 60 metrics.apply(); 61 } 62 63 return references; 64 } 65 66 private File fullPath; 67 } 68 69
| Popular Tags
|