Enum ClassReloadingStrategy.Dispatcher.ForLegacyVm

    • Constructor Detail

      • ForLegacyVm

        private ForLegacyVm()
    • Method Detail

      • values

        public static ClassReloadingStrategy.Dispatcher.ForLegacyVm[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ClassReloadingStrategy.Dispatcher.ForLegacyVm c : ClassReloadingStrategy.Dispatcher.ForLegacyVm.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ClassReloadingStrategy.Dispatcher.ForLegacyVm valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isModifiableClass

        public boolean isModifiableClass​(java.lang.instrument.Instrumentation instrumentation,
                                         java.lang.Class<?> type)
        Invokes the Instrumentation#isModifiableClass method.
        Specified by:
        isModifiableClass in interface ClassReloadingStrategy.Dispatcher
        Parameters:
        instrumentation - The instrumentation instance to invoke the method on.
        type - The type to consider for modifiability.
        Returns:
        true if the supplied type can be modified.
      • isRetransformClassesSupported

        public boolean isRetransformClassesSupported​(java.lang.instrument.Instrumentation instrumentation)
        Invokes the Instrumentation#isRetransformClassesSupported method.
        Specified by:
        isRetransformClassesSupported in interface ClassReloadingStrategy.Dispatcher
        Parameters:
        instrumentation - The instrumentation instance to invoke the method on.
        Returns:
        true if the supplied instrumentation instance supports retransformation.
      • addTransformer

        public void addTransformer​(java.lang.instrument.Instrumentation instrumentation,
                                   java.lang.instrument.ClassFileTransformer classFileTransformer,
                                   boolean canRetransform)
        Registers a transformer.
        Specified by:
        addTransformer in interface ClassReloadingStrategy.Dispatcher
        Parameters:
        instrumentation - The instrumentation instance to invoke the method on.
        classFileTransformer - The class file transformer to register.
        canRetransform - true if the class file transformer should be invoked upon a retransformation.
      • retransformClasses

        public void retransformClasses​(java.lang.instrument.Instrumentation instrumentation,
                                       java.lang.Class<?>[] type)
        Retransforms the supplied classes.
        Specified by:
        retransformClasses in interface ClassReloadingStrategy.Dispatcher
        Parameters:
        instrumentation - The instrumentation instance to invoke the method on.
        type - The types to retransform.