Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-changing Method case class to deal with MethodReference; doesn't kee…
…p track of static/non-static any more -dealing with TypeReference instead of TypeAbstraction (might introduce errors) -moving secret method handling to call-return edge (instead of call-start)
- Loading branch information
Showing
6 changed files
with
57 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
package ca.uwaterloo.dataflow.common | ||
|
||
import com.ibm.wala.classLoader.IMethod | ||
import com.ibm.wala.types.MethodReference | ||
|
||
case class Method( | ||
name: String, | ||
parameterNum: Int, | ||
isStatic: Boolean, | ||
retType: String | ||
) { | ||
|
||
def equalsUpToParamNum(any: Any): Boolean = | ||
any match { | ||
case Method(n, _, s, r) => | ||
n == name && s == isStatic && r == retType | ||
case Method(n, _, r) => | ||
n == name && r == retType | ||
case _ => | ||
false | ||
} | ||
} | ||
|
||
object Method { | ||
|
||
def apply(method: IMethod): Method = | ||
def apply(method: MethodReference): Method = | ||
Method( | ||
method.getName.toString, | ||
if (method.isStatic) method.getNumberOfParameters else method.getNumberOfParameters - 1, | ||
method.isStatic, | ||
method.getNumberOfParameters, | ||
method.getReturnType.getName.toString | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters