com.tc.object.bytecode.rwsync
Class NoLockMethodStrategy

java.lang.Object
  extended by com.tc.object.bytecode.rwsync.NoLockMethodStrategy
All Implemented Interfaces:
MethodStrategy

public class NoLockMethodStrategy
extends java.lang.Object
implements MethodStrategy

A null "locking strategy" that leaves the method unaltered.


Constructor Summary
NoLockMethodStrategy()
           
 
Method Summary
 MethodVisitor visitMethod(ClassVisitor cv, java.lang.String ownerType, java.lang.String outerType, java.lang.String outerDesc, int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.String[] exceptions)
          Instrument a method, possibly creating other methods in the process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoLockMethodStrategy

public NoLockMethodStrategy()
Method Detail

visitMethod

public MethodVisitor visitMethod(ClassVisitor cv,
                                 java.lang.String ownerType,
                                 java.lang.String outerType,
                                 java.lang.String outerDesc,
                                 int access,
                                 java.lang.String name,
                                 java.lang.String desc,
                                 java.lang.String signature,
                                 java.lang.String[] exceptions)
Description copied from interface: MethodStrategy
Instrument a method, possibly creating other methods in the process. A do-nothing implementation might look like:
   visitMethod(...) {
     return cv.visitMethod(access, name, desc, signature, exceptions);
   }
 
This would delegate the visitMethod() call to the next class adapter in the chain, returning a method visitor which could then be visited with the method's contents.

Specified by:
visitMethod in interface MethodStrategy
Parameters:
cv - a way of calling the next class adapter in the chain. Do not pass in the samed ClassVisitor that is invoking the method strategy, or you'll recurse endlessly! Note that cv.visitMethod may be called more than once during a single call to this method, and must return a distinct MethodVisitor instance for each call.
ownerType - the internal type name of the class that contains the method, e.g., "org/xyz/Foo$Bar"
outerType - null if ownerType is a top-level type, or else the internal type name of its outer class e.g. "org/xyz/Foo"
outerDesc - null if ownerType is a top-level type, or else the type descriptor of its outer class, e.g. "Lorg/xyz/Foo;"
Returns:
a method visitor which can be called with the contents of the original method. Implementations must not return null, but may return a visitor that ignores all calls.


Copyright © 2010 Terracotta, Inc.. All Rights Reserved.