|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uka.ipd.sdq.ByCounter.instrumentation.Instrumenter
public final class Instrumenter
The instrumentor class is the central class to apply an instrumentation to a targeted class and receive the results.
Constructor Summary | |
---|---|
Instrumenter(byte[] classAsBytes,
InstrumentationParameters parameters,
InstrumentationState state)
Creates an Instrumenter for the specified class. |
|
Instrumenter(java.lang.String className,
InstrumentationParameters params,
InstrumentationState state)
Creates an Instrumenter for the specified class. |
Method Summary | |
---|---|
org.objectweb.asm.ClassAdapter |
getClassAdapter()
Simple getter |
java.lang.String |
getClassCanonicalName()
Simple getter |
java.lang.String |
getClassName()
Gets the name of the instrumented class. |
org.objectweb.asm.ClassReader |
getClassReader()
Simple getter |
org.objectweb.asm.ClassWriter |
getClassWriter()
Simple getter |
InstrumentationParameters |
getInstrumentationParameters()
Simple getter |
InstrumentationState |
getInstrumentationState()
|
byte[] |
getInstrumentedBytes()
Get the instrumented bytecode (before that, instrument if needed) |
long |
getInstrumentedBytesize()
|
long[] |
getMeasurements()
Return the time measurements and bytesizes obtained during characterisation. |
long |
getTimestampAfterReaderAccept_3()
|
long |
getTimestampBeforeASMSetup_1()
|
long |
getTimestampBeforeReaderAccept_2()
|
long |
getTimestampBeforeReaderInitialisation_0()
|
long |
getTimestampInstrumenterInitialisation()
|
byte[] |
getUninstrumentedBytes()
|
long |
getUninstrumentedBytesize()
if uninstrumentedBytes field is not null, return it size. |
boolean |
instrument()
Instrument bytecode using ASM. |
boolean |
isInstrumentationFinished()
|
void |
registerCharacterisationHook(ICharacterisationHook hook)
Registers a ICharacterisationHook . |
void |
setInstrumentationParameters(InstrumentationParameters instrumentationParameters)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Instrumenter(byte[] classAsBytes, InstrumentationParameters parameters, InstrumentationState state)
Instrumenter
for the specified class.
classAsBytes
- The class that holds the methods that are
to be instrumented as byte array.parameters
- InstrumentationParameters
instance that specifies how and what to instrument.public Instrumenter(java.lang.String className, InstrumentationParameters params, InstrumentationState state) throws java.lang.ClassNotFoundException
Instrumenter
for the specified class.
className
- The name of the class holding the methods that shall be instrumented.
Needs to be fully qualified as this is used to find the correct class.params
- InstrumentationParameters
instance that specifies how and what to instrument.state
- InstrumentationState
for this Instrumenter.
java.lang.ClassNotFoundException
- If the specified name cannot be resolved, this exception is thrown.
Check your className if you get this exception.Method Detail |
---|
public org.objectweb.asm.ClassAdapter getClassAdapter()
public java.lang.String getClassCanonicalName()
public java.lang.String getClassName()
public org.objectweb.asm.ClassReader getClassReader()
public org.objectweb.asm.ClassWriter getClassWriter()
public InstrumentationParameters getInstrumentationParameters()
public InstrumentationState getInstrumentationState()
InstrumentationState
.public byte[] getInstrumentedBytes()
public long getInstrumentedBytesize()
public long[] getMeasurements()
public long getTimestampAfterReaderAccept_3()
public long getTimestampBeforeASMSetup_1()
public long getTimestampBeforeReaderAccept_2()
public long getTimestampBeforeReaderInitialisation_0()
public long getTimestampInstrumenterInitialisation()
public byte[] getUninstrumentedBytes()
public long getUninstrumentedBytesize()
public boolean instrument()
public boolean isInstrumentationFinished()
public void registerCharacterisationHook(ICharacterisationHook hook)
ICharacterisationHook
.
hook
- ICharacterisationHook
public void setInstrumentationParameters(InstrumentationParameters instrumentationParameters)
instrumentationParameters
- the instrumentationParameters to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |