|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkorat.instrumentation.AbstractInstrumenter
korat.instrumentation.TouchInstrumenter
@Deprecated class TouchInstrumenter
Obsolete.
Field Summary |
---|
Fields inherited from class korat.instrumentation.AbstractInstrumenter |
---|
cp |
Constructor Summary | |
---|---|
TouchInstrumenter()
Deprecated. |
Method Summary | |
---|---|
protected void |
addTouchableImplementation(CtClass clz)
Deprecated. Implements KoratTouchable interface |
protected void |
addTouchableInterface(CtClass clz)
Deprecated. |
protected void |
addTouchingInitializationMethod(CtClass clz)
Deprecated. Initializes process of touching by resetting __korat__touched flag. |
protected void |
addTouchMethod(CtClass clz)
Deprecated. Adds touch method to the class that accesses all fields of given object and invokes touch method on all objects associated with accessed fields. |
protected void |
addVisitedInTraversalField(CtClass clz)
Deprecated. Adds __korat__touched boolean flag, which signals whether
this object has already been touched. |
protected void |
instrument(CtClass clz)
Deprecated. |
Methods inherited from class korat.instrumentation.AbstractInstrumenter |
---|
getBytecode, shouldProcessField, shouldProcessMethod |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
TouchInstrumenter()
Method Detail |
---|
protected void instrument(CtClass clz) throws CannotCompileException, NotFoundException, IOException
instrument
in class AbstractInstrumenter
CannotCompileException
NotFoundException
IOException
protected void addTouchableInterface(CtClass clz)
protected void addTouchableImplementation(CtClass clz)
IKoratTouchable
protected void addVisitedInTraversalField(CtClass clz)
Adds __korat__touched
boolean flag, which signals whether
this object has already been touched.
Part of IKoratTouchable implementation
IKoratTouchable
protected void addTouchingInitializationMethod(CtClass clz)
__korat__touch__initialize()
operation from the
IKoratTouchable
interface
public void __korat__touch__initialize() { if (!__korat__touched) return; __korat__touched = false; // For each field (denoted by its name {FieldName}) in this object: if ( {FieldName} != null && {FieldName} instanceof korat.instrumentation.IKoratTouchable) ((korat.instrumentation.IKoratTouchable) {{FieldName}}).__korat__touch__initialize(); //... }
IKoratTouchable
protected void addTouchMethod(CtClass clz)
Adds touch method to the class that accesses all fields of given object and invokes touch method on all objects associated with accessed fields.
This method is implemented as follows:
public void __korat__touch() { if (__korat__touched) return; koratTouched = true; // if superclass is koratTouchable super.__korat__touch(); // - For Each Primitive Field- __get__fieldnameA__(); // - or - // - For Each Non-Primitive Field __get__fieldnameB__(); if (fieldnameB != null && fieldnameB instanceOf KoratTouchable) ((KoratTouchable) fieldnameB).__korat__touch(); }
IKoratTouchable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |