类 ClassOptimizationInfo

  • 直接已知子类:
    ProgramClassOptimizationInfo

    public class ClassOptimizationInfo
    extends java.lang.Object
    This class stores some optimization information that can be attached to a class.
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      protected boolean hasNoSideEffects  
    • 方法概要

      所有方法 静态方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      boolean containsConstructors()  
      boolean containsPackageVisibleMembers()
      Returns whether the class contains any package visible class members.
      static ClassOptimizationInfo getClassOptimizationInfo​(proguard.classfile.Clazz clazz)
      Returns the ClassOptimizationInfo instance from the given class.
      proguard.classfile.Clazz getTargetClass()
      Returns the class into which this class can be merged.
      proguard.classfile.Clazz getWrappedClass()
      Returns the class for which this class is a simple wrapper without any additional functionality, or null otherwise.
      boolean hasNoSideEffects()
      Returns whether loading the class has side effects.
      boolean hasSideEffects()
      Returns whether loading the class has any side effects.
      boolean invokesPackageVisibleMembers()
      Returns whether any code in the class accesses any package visible class members.
      boolean isCaught()
      Returns whether the class is a Throwable that is caught in an exception handler in the known code.
      boolean isDotClassed()
      Returns whether the class is loaded with an 'ldc' instruction (a .class construct in Java) in the known code.
      boolean isEscaping()
      Returns whether instances of the class are ever escaping to the heap.
      boolean isInstanceofed()
      Returns whether the class is part of an 'instanceof' instruction in the known code.
      boolean isInstantiated()
      Returns whether the class is instantiated in the known code.
      boolean isKept()
      Returns whether the class is kept.
      boolean isSimpleEnum()
      Returns whether the class is an enum type that can be simplified to a primitive integer.
      boolean mayBeMerged()
      Returns whether the class may be merged with other classes.
      static void setClassOptimizationInfo​(proguard.classfile.Clazz clazz)
      Creates and sets a ClassOptimizationInfo instance on the given class.
      void setNoSideEffects()
      Specifies that loading the class has no side effects.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • hasNoSideEffects

        protected boolean hasNoSideEffects
    • 构造器详细资料

      • ClassOptimizationInfo

        public ClassOptimizationInfo()
    • 方法详细资料

      • setNoSideEffects

        public void setNoSideEffects()
        Specifies that loading the class has no side effects.
      • hasNoSideEffects

        public boolean hasNoSideEffects()
        Returns whether loading the class has side effects.
      • isKept

        public boolean isKept()
        Returns whether the class is kept.
      • containsConstructors

        public boolean containsConstructors()
      • isInstantiated

        public boolean isInstantiated()
        Returns whether the class is instantiated in the known code.
      • isInstanceofed

        public boolean isInstanceofed()
        Returns whether the class is part of an 'instanceof' instruction in the known code.
      • isDotClassed

        public boolean isDotClassed()
        Returns whether the class is loaded with an 'ldc' instruction (a .class construct in Java) in the known code.
      • isCaught

        public boolean isCaught()
        Returns whether the class is a Throwable that is caught in an exception handler in the known code.
      • isSimpleEnum

        public boolean isSimpleEnum()
        Returns whether the class is an enum type that can be simplified to a primitive integer.
      • isEscaping

        public boolean isEscaping()
        Returns whether instances of the class are ever escaping to the heap. Otherwise, any instances are just created locally and passed as parameters.
      • hasSideEffects

        public boolean hasSideEffects()
        Returns whether loading the class has any side effects.
      • containsPackageVisibleMembers

        public boolean containsPackageVisibleMembers()
        Returns whether the class contains any package visible class members.
      • invokesPackageVisibleMembers

        public boolean invokesPackageVisibleMembers()
        Returns whether any code in the class accesses any package visible class members.
      • mayBeMerged

        public boolean mayBeMerged()
        Returns whether the class may be merged with other classes.
      • getWrappedClass

        public proguard.classfile.Clazz getWrappedClass()
        Returns the class for which this class is a simple wrapper without any additional functionality, or null otherwise.
      • getTargetClass

        public proguard.classfile.Clazz getTargetClass()
        Returns the class into which this class can be merged.
      • setClassOptimizationInfo

        public static void setClassOptimizationInfo​(proguard.classfile.Clazz clazz)
        Creates and sets a ClassOptimizationInfo instance on the given class.
      • getClassOptimizationInfo

        public static ClassOptimizationInfo getClassOptimizationInfo​(proguard.classfile.Clazz clazz)
        Returns the ClassOptimizationInfo instance from the given class.