Class PatchByteCodeVersionTransformer

java.lang.Object
io.opentelemetry.javaagent.tooling.instrumentation.indy.PatchByteCodeVersionTransformer
All Implemented Interfaces:
net.bytebuddy.agent.builder.AgentBuilder.Transformer

public class PatchByteCodeVersionTransformer extends Object implements net.bytebuddy.agent.builder.AgentBuilder.Transformer
Patches the class file version to 51 (Java 7) in order to support injecting INVOKEDYNAMIC instructions via Advice.WithCustomMapping.bootstrap(java.lang.reflect.Constructor<?>) which is important for indy plugins.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.Transformer

    net.bytebuddy.agent.builder.AgentBuilder.Transformer.ForAdvice, net.bytebuddy.agent.builder.AgentBuilder.Transformer.ForBuildPlugin
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.bytebuddy.dynamic.DynamicType.Builder<?>
    transform(net.bytebuddy.dynamic.DynamicType.Builder<?> builder, net.bytebuddy.description.type.TypeDescription typeDescription, ClassLoader classLoader, net.bytebuddy.utility.JavaModule javaModule, ProtectionDomain protectionDomain)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PatchByteCodeVersionTransformer

      public PatchByteCodeVersionTransformer()
  • Method Details

    • transform

      public net.bytebuddy.dynamic.DynamicType.Builder<?> transform(net.bytebuddy.dynamic.DynamicType.Builder<?> builder, net.bytebuddy.description.type.TypeDescription typeDescription, ClassLoader classLoader, net.bytebuddy.utility.JavaModule javaModule, ProtectionDomain protectionDomain)
      Specified by:
      transform in interface net.bytebuddy.agent.builder.AgentBuilder.Transformer