Class PrimitiveHierarchy
java.lang.Object
sootup.interceptors.typeresolving.PrimitiveHierarchy
- Author:
- Zun Wang
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
arePrimitives
(Type a, Type b) Check whether the two given types are primitives or BottomTypestatic Collection<Type>
getLeastCommonAncestor
(Type a, Type b) Calculate the least common ancestor of two types(primitive or BottomType).static boolean
isAncestor
(Type ancestor, Type child) Check the ancestor-relationship between two primitive typesancestor
andchild
, namely, whether child can be assigned to ancestor directly to obtain: ancestor = child.
-
Constructor Details
-
PrimitiveHierarchy
public PrimitiveHierarchy()
-
-
Method Details
-
getLeastCommonAncestor
Calculate the least common ancestor of two types(primitive or BottomType). If there's a = b then a is the least common ancestor of a and b; If there's b = a then b is the least common ancestor of a and b; If there are c = a and c = b, but there's no b = a or a = b then c is the least common ancestor of a and b; -
isAncestor
Check the ancestor-relationship between two primitive typesancestor
andchild
, namely, whether child can be assigned to ancestor directly to obtain: ancestor = child. -
arePrimitives
Check whether the two given types are primitives or BottomType
-