|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.asm.ClassAdapter
de.uka.ipd.sdq.ByCounter.instrumentation.MethodCountClassAdapter
public final class MethodCountClassAdapter
This is the visitor for the class declaration. It watches each method declaration and selects the methods which have to be instrumented as specified in the instrumentation parameters. For those methods, the MethodCountMethodAdapter is activated.
MethodCountMethodAdapter
Field Summary | |
---|---|
static java.lang.String |
DIRECT_LOG_WRITE_SIGNATURE
|
static java.lang.String |
METHOD_RENAMING_POSTFIX
This is the postfix to the name of instrumented methods for the versions, |
Constructor Summary | |
---|---|
MethodCountClassAdapter(org.objectweb.asm.ClassVisitor visitor,
InstrumentationParameters parameters,
InstrumentationState state)
Create a new MethodCountAdapter. |
Method Summary | |
---|---|
static java.lang.String |
constructResultLogFileName(java.lang.String resultLogFileNameTemplate,
java.lang.String qualifyingMethodName,
long timestamp)
Constructs the filename for the result log by replacing the template strings. |
void |
registerCharacterisationHook(ICharacterisationHook hook)
Register a ICharacterisationHook . |
void |
visit(int version,
int access,
java.lang.String name,
java.lang.String signature,
java.lang.String supername,
java.lang.String[] interfaces)
Visits the header of the class and grabs the classname. |
void |
visitEnd()
Overridden to insert a result log writing method. |
org.objectweb.asm.MethodVisitor |
visitMethod(int access,
java.lang.String name,
java.lang.String desc,
java.lang.String signature,
java.lang.String[] exceptions)
This is called when a method declaration happens in the class. |
Methods inherited from class org.objectweb.asm.ClassAdapter |
---|
visitAnnotation, visitAttribute, visitField, visitInnerClass, visitOuterClass, visitSource |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String METHOD_RENAMING_POSTFIX
public static final java.lang.String DIRECT_LOG_WRITE_SIGNATURE
Constructor Detail |
---|
public MethodCountClassAdapter(org.objectweb.asm.ClassVisitor visitor, InstrumentationParameters parameters, InstrumentationState state)
visitor
- The preceding visitor in the chain.parameters
- InstrumentationParameters
state
- InstrumentationState
Method Detail |
---|
public static java.lang.String constructResultLogFileName(java.lang.String resultLogFileNameTemplate, java.lang.String qualifyingMethodName, long timestamp)
resultLogFileNameTemplate
- A prefix.qualifyingMethodName
- The qualifying name of the calling method.timestamp
- A timestamp of the execution time.
InstrumentationParameters.enableResultLogWriter(String)
public void registerCharacterisationHook(ICharacterisationHook hook)
ICharacterisationHook
.
hook
- ICharacterisationHook
public void visit(int version, int access, java.lang.String name, java.lang.String signature, java.lang.String supername, java.lang.String[] interfaces)
visit
in interface org.objectweb.asm.ClassVisitor
visit
in class org.objectweb.asm.ClassAdapter
Instrumenter
public void visitEnd()
visitEnd
in interface org.objectweb.asm.ClassVisitor
visitEnd
in class org.objectweb.asm.ClassAdapter
ClassAdapter.visitEnd()
public org.objectweb.asm.MethodVisitor visitMethod(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.String[] exceptions)
visitMethod
in interface org.objectweb.asm.ClassVisitor
visitMethod
in class org.objectweb.asm.ClassAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |