Class AccessAgent

  • All Implemented Interfaces:
    java.lang.instrument.ClassFileTransformer

    public class AccessAgent
    extends java.lang.Object
    implements java.lang.instrument.ClassFileTransformer
    • Constructor Summary

      Constructors 
      Constructor Description
      AccessAgent()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void agentmain​(java.lang.String agentargs, java.lang.instrument.Instrumentation inst)  
      static void main​(java.lang.String[] args)
      Main for testing.
      static void premain​(java.lang.String agentargs, java.lang.instrument.Instrumentation inst)
      Agent in premain mode (unimplemented).
      byte[] transform​(java.lang.ClassLoader loader, java.lang.String className, java.lang.Class<?> classBeingRedefined, java.security.ProtectionDomain protectionDomain, byte[] classfileBuffer)
      Transforms a class using instrumentation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.instrument.ClassFileTransformer

        transform
    • Constructor Detail

      • AccessAgent

        public AccessAgent()
    • Method Detail

      • transform

        public byte[] transform​(java.lang.ClassLoader loader,
                                java.lang.String className,
                                java.lang.Class<?> classBeingRedefined,
                                java.security.ProtectionDomain protectionDomain,
                                byte[] classfileBuffer)
                         throws java.lang.instrument.IllegalClassFormatException
        Transforms a class using instrumentation.
        Specified by:
        transform in interface java.lang.instrument.ClassFileTransformer
        Parameters:
        loader - The class loader.
        className - The class name
        classBeingRedefined - The class being redefined.
        protectionDomain - Protection domain.
        classfileBuffer - Original classfile.
        Returns:
        Transformed class.
        Throws:
        java.lang.instrument.IllegalClassFormatException
      • premain

        public static void premain​(java.lang.String agentargs,
                                   java.lang.instrument.Instrumentation inst)
        Agent in premain mode (unimplemented).
        Parameters:
        agentargs - Agent arguments.
        inst - Instrumentation.
      • agentmain

        public static void agentmain​(java.lang.String agentargs,
                                     java.lang.instrument.Instrumentation inst)
      • main

        public static void main​(java.lang.String[] args)
        Main for testing.
        Parameters:
        args - Arguments.