类 InitializedClassUtil
java.lang.Object
proguard.classfile.util.InitializedClassUtil
Utility methods for operation on
Clazz that require initialization of the ClassPools to work (i.e., ClassReferenceInitializer, ClassSubHierarchyInitializer, and ClassSuperHierarchyInitializer should have run on the
class pools).
The methods provide no guarantee that the initialization has been performed, the callers should make sure of it to avoid unexpected behavior or crashes.
-
方法概要
修饰符和类型方法说明static booleanisInstanceOf(String type, @NotNull Clazz clazz) Returns true if the given type is instance of the given clazz (i.e. whether the class is the same type or an extension of the given type).
-
方法详细资料
-
isInstanceOf
Returns true if the given type is instance of the given clazz (i.e. whether the class is the same type or an extension of the given type).If the type is a reference array checks the inheritance of the referenced type (e.g. true for "[Ljava/lang/String;" and Clazz{java/lang/Object}, false for "[Ljava/lang/String;" and Clazz{java/lan/Boolean}).
Requires that at least
ClassReferenceInitializerandClassSubHierarchyInitializerhave been run on theClassPools.
-