Package kilim.analysis
Class ClassFlow
- java.lang.Object
-
- org.objectweb.asm.ClassVisitor
-
- org.objectweb.asm.tree.ClassNode
-
- kilim.analysis.ClassFlow
-
public class ClassFlow extends org.objectweb.asm.tree.ClassNodeThis class reads a .class file (or stream), wraps each method with a MethodFlow object and optionally analyzes it.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.StringclassDescbyte[]codethe original bytecode associated with the classKilimContextcontextorg.objectweb.asm.ClassReadercrprivate booleanisPausabletrue if any of the methods contained in the class file is pausable.booleanisWoventrue if the .class being read is already woven.(package private) java.util.ArrayList<MethodFlow>methodFlows-
Fields inherited from class org.objectweb.asm.tree.ClassNode
access, attrs, fields, innerClasses, interfaces, invisibleAnnotations, invisibleTypeAnnotations, methods, module, name, nestHostClass, nestMembers, outerClass, outerMethod, outerMethodDesc, permittedSubclasses, recordComponents, signature, sourceDebug, sourceFile, superName, version, visibleAnnotations, visibleTypeAnnotations
-
-
Constructor Summary
Constructors Constructor Description ClassFlow(KilimContext context, java.io.InputStream is)ClassFlow(KilimContext context, java.lang.String aClassName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.ArrayList<MethodFlow>analyze(boolean forceAnalysis)java.lang.StringgetClassDescriptor()java.lang.StringgetClassName()java.util.ArrayList<MethodFlow>getMethodFlows()private MethodFlowgetOrigWithSameSig(MethodFlow bridgeMethod)MethodFlowgetSAM()(package private) booleanisInterface()(package private) booleanisJava7()booleanisPausable()org.objectweb.asm.MethodVisitorvisitMethod(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.String[] exceptions)
-
-
-
Field Detail
-
methodFlows
java.util.ArrayList<MethodFlow> methodFlows
-
cr
public org.objectweb.asm.ClassReader cr
-
classDesc
java.lang.String classDesc
-
isPausable
private boolean isPausable
true if any of the methods contained in the class file is pausable. ClassWeaver uses it later to avoid weaving if isPausable isn't true.
-
isWoven
public boolean isWoven
true if the .class being read is already woven.
-
context
public KilimContext context
-
code
public byte[] code
the original bytecode associated with the class
-
-
Constructor Detail
-
ClassFlow
public ClassFlow(KilimContext context, java.io.InputStream is) throws java.io.IOException
- Throws:
java.io.IOException
-
ClassFlow
public ClassFlow(KilimContext context, java.lang.String aClassName) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
visitMethod
public org.objectweb.asm.MethodVisitor visitMethod(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.String[] exceptions)- Overrides:
visitMethodin classorg.objectweb.asm.tree.ClassNode
-
getMethodFlows
public java.util.ArrayList<MethodFlow> getMethodFlows()
-
analyze
public java.util.ArrayList<MethodFlow> analyze(boolean forceAnalysis) throws KilimException
- Throws:
KilimException
-
getOrigWithSameSig
private MethodFlow getOrigWithSameSig(MethodFlow bridgeMethod)
-
getClassDescriptor
public java.lang.String getClassDescriptor()
-
getClassName
public java.lang.String getClassName()
-
isPausable
public boolean isPausable()
-
isInterface
boolean isInterface()
-
isJava7
boolean isJava7()
-
getSAM
public MethodFlow getSAM()
-
-