public class TypeUtils extends Object
| 构造器和说明 |
|---|
TypeUtils(InfoflowManager manager) |
| 限定符和类型 | 方法和说明 |
|---|---|
static soot.Type |
buildArrayOrAddDimension(soot.Type type,
soot.Type arrayType)
Builds a new array of the given type if it is a base type or increments the
dimensions of the given array by 1 otherwise.
|
boolean |
checkCast(AccessPath accessPath,
soot.Type type)
Checks whether the type of the given taint can be cast to the given target
type
|
boolean |
checkCast(soot.Type destType,
soot.Type sourceType)
Checks whether the given source type can be cast to the given destination
type
|
static String |
getMorePreciseType(String tp1,
String tp2)
Gets the more precise one of the two given types
|
static soot.Type |
getMorePreciseType(soot.Type tp1,
soot.Type tp2)
Gets the more precise one of the two given types.
|
static soot.Type |
getTypeFromString(String type)
Creates a Soot Type from the given string
|
boolean |
hasCompatibleTypesForCall(AccessPath apBase,
soot.SootClass dest) |
static boolean |
isObjectLikeType(soot.Type tp)
Checks whether the given type is java.lang.Object, java.io.Serializable, or
java.lang.Cloneable.
|
static boolean |
isPrimitiveArray(soot.Type type) |
static boolean |
isStringType(soot.Type tp)
Checks whether the given type is a string
|
public TypeUtils(InfoflowManager manager)
public static boolean isStringType(soot.Type tp)
tp - The type of checkpublic static boolean isObjectLikeType(soot.Type tp)
tp - The type to checkpublic boolean checkCast(soot.Type destType,
soot.Type sourceType)
destType - The destination type to which to castsourceType - The source type from which to castpublic boolean checkCast(AccessPath accessPath, soot.Type type)
accessPath - The access path of the taint to be casttype - The target type to which to cast the taintpublic static boolean isPrimitiveArray(soot.Type type)
public boolean hasCompatibleTypesForCall(AccessPath apBase, soot.SootClass dest)
public static soot.Type getMorePreciseType(soot.Type tp1,
soot.Type tp2)
tp1 - The first typetp2 - The second typepublic static String getMorePreciseType(String tp1, String tp2)
tp1 - The first typetp2 - The second typepublic static soot.Type getTypeFromString(String type)
type - A string representing a Soot typepublic static soot.Type buildArrayOrAddDimension(soot.Type type,
soot.Type arrayType)
type - The base type or incoming arrayarrayType - The declared type of the arrayCopyright © 2022 Fraunhofer SIT. All rights reserved.