docs: @Override
      protected byte[] transform(InputStream classfileStream) throws IOException {
  
          // Read in the class bytes and chain to the serialization version adpater.
          // If we fail to calculate the serialVersionUID before mucking around with
          // the class we'll very likely introduce issues with serializable classes
          // that have not coded the default serialVersionUID.
          //
          // ClassReader --> SerialVersionUIDAder --> CheckInstrumentableClassAdapter --> ClassNode
          ClassReader reader = new ClassReader(classfileStream);
          ClassNode directory = new ClassNode();
          CheckInstrumentableClassAdapter checkInstrumentableAdapter = new CheckInstrumentableClassAdapter(directory);
          SerialVersionUIDAdder uidAdder = new SerialVersionUIDAdder(checkInstrumentableAdapter);
  
          // Read the class information into the ClassNode tree
          reader.accept(uidAdder, 0);
  
          // Create a transient object to hold the parsed information
          ClassTraceInfo info = new ClassTraceInfo();
          info.classNode = directory;
          info.packageInfo = getPackageInfo(directory.name.replaceAll("/[^/]+$", ""));
  
          // #1: Check for a trivial annotation on the class.
          if (isClassTrivial(info) || !checkInstrumentableAdapter.isInstrumentableClass()) {
              return null;
          }
  
          // #2: Check for a trace options annotation
          processClassTraceOptionsAnnotation(info);
  
          // #3: Look for declared TraceComponents
          processLibertyTraceComponentDiscovery(info);
          processWebsphereTraceComponentDiscovery(info);
  
          // #4: Look for declared Logger fields
          processJavaLoggerDiscovery(info);
  
          // #5: See if TraceComponent and a Logger were defined
          int declaredTraceStateFieldCount = 0;
          if (info.libertyTraceComponentFieldNode != null) {
              declaredTraceStateFieldCount++;
          }
          if (info.websphereTraceComponentFieldNode != null) {
              declaredTraceStateFieldCount++;
          }
          if (info.loggerFieldNode != null) {
              declaredTraceStateFieldCount++;
          }
          if (declaredTraceStateFieldCount > 1) {
              StringBuilder sb = new StringBuilder();
              sb.append("WARNING: More than one type of tracing has been detected on class ");
              sb.append(info.classNode.name.replaceAll("/", "\\."));
              info.warnings.add(sb.toString());
          }
  
          // #6: Determine if Logger/TraceComponent is initialized
          processExistingStaticInitializer(info);
  
          // #6: Define the TraceComponent if needed
          setupTraceStateObjectField(info);
  
          // #7: Look at the toString method for calls to locally declared methods
          processToString(info);
  
          // #8: Look for methods that have hard-coded entry/exit trace points
          processManuallyTracedMethods(info);
  
          // #9: Dump the list of warnings
          for (String warning : info.warnings) {
              System.out.println(warning);
          }
  
          if (info.failInstrumentation) {
              System.out.println("ERROR: Instrumentation failed for " + info.classNode.name + ".  Please see previous messages");
              return null;
          }
  
          // Create the ClassWriter
          ClassWriter classWriter = new ClassWriter(reader, ClassWriter.COMPUTE_MAXS);
          ClassVisitor cv = classWriter;
  
          // Trace the class as it's visited if debug is enabled
          if (isDebug()) {
              cv = new CheckClassAdapter(cv);
              cv = new TraceClassVisitor(cv, new PrintWriter(System.out));
          }
  
          // If requested, inject tracing at invocation by chaining.
          // Static injection for JSR47 or WebSphere is always done our of
          // the pre-process class adpater.
          if (injectStatic && LIBERTY_TRACE_COMPONENT_TYPE.getDescriptor().equals(info.traceStateField.desc)) {
              cv = new LibertyTracingClassAdapter(cv, true);
          }
  
          // Pre-process the class and inject FFDC if requested
          if (info.traceStateField != null) {
              cv = new LibertyTracePreprocessClassAdapter(cv, !info.traceStateFieldAlreadyInitialized);
          } else if (defaultTraceType == TraceType.TR) {
              cv = new WebSphereTrTracingClassAdapter(cv, null);
          } else if (defaultTraceType == TraceType.JAVA_LOGGING) {
              cv = new JSR47TracingClassAdapter(cv, null);
          }
          if (addFfdc) {
              cv = new FFDCClassAdapter(cv, null);
          }
          directory.accept(cv);
  
          return classWriter.toByteArray();
      }