korat.instrumentation
Class TouchInstrumenter

java.lang.Object
  extended by korat.instrumentation.AbstractInstrumenter
      extended by korat.instrumentation.TouchInstrumenter
All Implemented Interfaces:
IInstrumenter

Deprecated.

@Deprecated
 class TouchInstrumenter
extends AbstractInstrumenter

Obsolete.

Author:
Sasa Misailovic

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

TouchInstrumenter()
Deprecated. 
Method Detail

instrument

protected void instrument(CtClass clz)
                   throws CannotCompileException,
                          NotFoundException,
                          IOException
Deprecated. 
Specified by:
instrument in class AbstractInstrumenter
Throws:
CannotCompileException
NotFoundException
IOException

addTouchableInterface

protected void addTouchableInterface(CtClass clz)
Deprecated. 

addTouchableImplementation

protected void addTouchableImplementation(CtClass clz)
Deprecated. 
Implements KoratTouchable interface

See Also:
IKoratTouchable

addVisitedInTraversalField

protected void addVisitedInTraversalField(CtClass clz)
Deprecated. 

Adds __korat__touched boolean flag, which signals whether this object has already been touched.

Part of IKoratTouchable implementation

See Also:
IKoratTouchable

addTouchingInitializationMethod

protected void addTouchingInitializationMethod(CtClass clz)
Deprecated. 
Initializes process of touching by resetting __korat__touched flag. Implements __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();
        //...
        
    }
 

See Also:
IKoratTouchable

addTouchMethod

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.

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();
        
        }
        
       
 

See Also:
IKoratTouchable