diff options
Diffstat (limited to 'bundle-plugin/src/main/scala/com/yahoo/container/plugin/classanalysis/Analyze.scala')
-rw-r--r-- | bundle-plugin/src/main/scala/com/yahoo/container/plugin/classanalysis/Analyze.scala | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/bundle-plugin/src/main/scala/com/yahoo/container/plugin/classanalysis/Analyze.scala b/bundle-plugin/src/main/scala/com/yahoo/container/plugin/classanalysis/Analyze.scala deleted file mode 100644 index 2f2d034679d..00000000000 --- a/bundle-plugin/src/main/scala/com/yahoo/container/plugin/classanalysis/Analyze.scala +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.container.plugin.classanalysis - -import org.objectweb.asm._ -import java.io.{InputStream, File} -import com.yahoo.container.plugin.util.IO.withFileInputStream - -/** - * Main entry point for class analysis - * @author tonytv - */ -object Analyze { - def analyzeClass(classFile : File) : ClassFileMetaData = { - try { - withFileInputStream(classFile) { fileInputStream => - analyzeClass(fileInputStream) - } - } catch { - case e : RuntimeException => throw new RuntimeException("An error occurred when analyzing " + classFile.getPath, e) - } - } - - def analyzeClass(inputStream : InputStream) : ClassFileMetaData = { - val visitor = new AnalyzeClassVisitor() - new ClassReader(inputStream).accept(visitor, ClassReader.SKIP_DEBUG) - visitor.result - } -} |