private void transform()

in TransformCore/src/main/java/com/facebook/ads/injkit/SingleFileHandler.java [104:119]


  private void transform(String name, InputStream input, OutputStream output)
      throws IOException, AnnotationProcessingException {
    ClassFileDetectorStream inputStreamWithClassDetector = new ClassFileDetectorStream(name, input);
    try {
      if (inputStreamWithClassDetector.isClass()) {
        transformClass(inputStreamWithClassDetector, output);
      } else {
        copyData(inputStreamWithClassDetector, output);
      }
    } catch (AnnotationProcessingException e) {
      throw new AnnotationProcessingException(
          String.format(Locale.US, "Failed to transform file '%s'", name), e);
    } catch (Exception e) {
      throw new IOException(String.format(Locale.US, "Failed to transform file '%s'", name), e);
    }
  }