-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AnalysisScope example #11
base: master
Are you sure you want to change the base?
Changes from 5 commits
eecf360
269c7f3
e49b1da
9626f97
4c2c8b4
62d2d6d
f8dbf0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,36 @@ | ||||||
package com.ibm.wala.examples.analysisscope; | ||||||
|
||||||
import com.ibm.wala.ipa.callgraph.AnalysisScope; | ||||||
import com.ibm.wala.ipa.callgraph.AnalysisScope; | ||||||
import com.ibm.wala.util.config.FileOfClasses; | ||||||
import com.ibm.wala.util.config.AnalysisScopeReader; | ||||||
|
||||||
import java.io.File; | ||||||
import java.io.IOException; | ||||||
import com.ibm.wala.util.config.AnalysisScopeReader; | ||||||
|
||||||
//for more information, please check out https://github.com/wala/WALA/wiki/Analysis-Scope | ||||||
|
||||||
|
||||||
public class analysisscope { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Class names start with a capital and use camel case. See https://google.github.io/styleguide/javaguide.html#s5.2.2-class-names |
||||||
/** | ||||||
* @param classPath paths of jars to include in analysis scope, formatted as a Java classpath | ||||||
* @return AnaylsisScope object created by makeJavaBinaryAnalysisScope | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
* @throws IOException | ||||||
*/ | ||||||
AnalysisScope makeAnalysisScope(String classPath) throws IOException { | ||||||
return AnalysisScopeReader.makeJavaBinaryAnalysisScope(classPath, null); | ||||||
} | ||||||
|
||||||
/** | ||||||
* | ||||||
* @param classPath Location of a scope file in string form | ||||||
* @param exceptionFile location of an exception file | ||||||
* @return return an analysis scope object | ||||||
* @throws IOException | ||||||
*/ | ||||||
AnalysisScope makeAnalysisScope(String classPath, String exceptionFile) throws IOException{ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The first parameter should be named something like |
||||||
File exception = new File(exceptionFile); | ||||||
return AnalysisScopeReader.readJavaScope(classPath, exception, null); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Should pass a real classloader as the final parameter. |
||||||
} | ||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write this as proper Javadoc on the class rather than just a single line comment