Class PrimitiveHierarchy
java.lang.Object
sootup.interceptors.typeresolving.PrimitiveHierarchy
- Author:
- Zun Wang
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
arePrimitives
(@NonNull Type a, @NonNull Type b) Check whether the two given types are primitives or BottomTypestatic @NonNull Collection<Type>
getLeastCommonAncestor
(@NonNull Type a, @NonNull Type b) Calculate the least common ancestor of two types(primitive or BottomType).static boolean
isAncestor
(@NonNull Type ancestor, @NonNull 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
-