Package sootup.java.frontend.conversion
Class WalaIRToJimpleConverter
java.lang.Object
sootup.java.frontend.conversion.WalaIRToJimpleConverter
Converter which converts WALA IR to jimple.
- Author:
- Linghui Luo
-
Constructor Summary
ConstructorDescriptionWalaIRToJimpleConverter
(Set<String> sourceDirPath) WalaIRToJimpleConverter
(Set<String> sourceDirPath, SourceType srcType) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addSootField
(JavaSootField field) convertClass
(com.ibm.wala.cast.loader.AstClass walaClass) Deprecated.convertClassNameFromSoot
(String signature) Convert className in soot-format to wala-format, e.g.,soot-format: java.lang.String.-> wala-format: Ljava/lang/StringconvertClassNameFromWala
(String className) Convert className in wala-format to soot-format, e.g., wala-format: Ljava/lang/String -> soot-format: java.lang.String.convertField
(JavaClassType classSig, com.ibm.wala.cast.loader.AstField walaField) Convert a walaAstField
toSootField
.convertMethod
(JavaClassType classSig, com.ibm.wala.cast.loader.AstMethod walaMethod) Convert a walaAstMethod
toSootMethod
and add it into the given sootClass.convertModifiers
(com.ibm.wala.cast.loader.AstClass klass) convertModifiers
(com.ibm.wala.cast.loader.AstField field) Return all modifiers for the given field.convertModifiers
(com.ibm.wala.cast.loader.AstMethod method) Return all modifiers for the given method.static Position
convertPosition
(com.ibm.wala.cast.tree.CAstSourcePositionMap.Position instructionPosition) static StmtPositionInfo
convertPositionInfo
(com.ibm.wala.cast.tree.CAstSourcePositionMap.Position instructionPosition, com.ibm.wala.cast.tree.CAstSourcePositionMap.Position[] operandPosition) convertType
(com.ibm.wala.types.TypeReference type) createClassSource
(com.ibm.wala.cast.loader.AstClass walaClass, JavaClassType superClass, Set<JavaClassType> interfaces, JavaClassType outerClass, Set<JavaSootField> sootFields, Set<JavaSootMethod> sootMethods, com.ibm.wala.cast.tree.CAstSourcePositionMap.Position position, EnumSet<ClassModifier> modifiers, Iterable<ClassType> annotations) Create aOverridingClassSource
object for the given walaClass.
-
Constructor Details
-
WalaIRToJimpleConverter
-
WalaIRToJimpleConverter
-
-
Method Details
-
convertClass
Deprecated.Convert a walaAstClass
toSootClass
.- Returns:
- A SootClass converted from walaClass
-
createClassSource
public OverridingJavaClassSource createClassSource(com.ibm.wala.cast.loader.AstClass walaClass, JavaClassType superClass, Set<JavaClassType> interfaces, JavaClassType outerClass, Set<JavaSootField> sootFields, Set<JavaSootMethod> sootMethods, com.ibm.wala.cast.tree.CAstSourcePositionMap.Position position, EnumSet<ClassModifier> modifiers, Iterable<ClassType> annotations) Create aOverridingClassSource
object for the given walaClass. -
convertField
public JavaSootField convertField(JavaClassType classSig, com.ibm.wala.cast.loader.AstField walaField) Convert a walaAstField
toSootField
.- Parameters:
classSig
- the class owns the fieldwalaField
- the wala field- Returns:
- A SootField object converted from walaField.
-
convertMethod
public JavaSootMethod convertMethod(JavaClassType classSig, com.ibm.wala.cast.loader.AstMethod walaMethod) Convert a walaAstMethod
toSootMethod
and add it into the given sootClass.- Parameters:
classSig
- the SootClass which should contain the converted SootMethodwalaMethod
- the walMethod to be converted
-
convertType
-
convertModifiers
Return all modifiers for the given field. -
convertModifiers
Return all modifiers for the given method. -
convertModifiers
-
convertClassNameFromWala
Convert className in wala-format to soot-format, e.g., wala-format: Ljava/lang/String -> soot-format: java.lang.String.- Parameters:
className
- in wala-format- Returns:
- className in sootup.format
-
convertClassNameFromSoot
Convert className in soot-format to wala-format, e.g.,soot-format: java.lang.String.-> wala-format: Ljava/lang/String -
addSootField
-
convertPosition
public static Position convertPosition(com.ibm.wala.cast.tree.CAstSourcePositionMap.Position instructionPosition) -
convertPositionInfo
public static StmtPositionInfo convertPositionInfo(com.ibm.wala.cast.tree.CAstSourcePositionMap.Position instructionPosition, com.ibm.wala.cast.tree.CAstSourcePositionMap.Position[] operandPosition)
-