Groovy Documentation

org.codenarc.rule.concurrency
Class SynchronizedMethodRule

java.lang.Object
  org.codenarc.rule.AbstractRule
      org.codenarc.rule.AbstractAstVisitorRule
          org.codenarc.rule.concurrency.SynchronizedMethodRule

class SynchronizedMethodRule
extends AbstractAstVisitorRule

Synchronized Method Rule - This rule reports uses of the synchronized keyword on methods. Synchronized methods are the same as synchronizing on 'this', which effectively make your synchronization policy public and modifiable by other objects. To avoid possibilities of deadlock, it is better to synchronize on internal objects.

author:
Hamlet D'Arcy
version:
$Revision: 329 $ - $Date: 2010-04-28 22:20:25 -0400 (Wed, 28 Apr 2010) $


Property Summary
Class astVisitorClass

String name

int priority

 
Constructor Summary
SynchronizedMethodRule()

 
Method Summary
 
Methods inherited from class AbstractAstVisitorRule
shouldApplyThisRuleTo
 
Methods inherited from class AbstractRule
applyTo, createViolation, createViolation, createViolationForImport, createViolationForImport, getImportsSortedByLineNumber, getName, getPriority, packageNameForImport, setName, setPriority, sourceLineAndNumberForImport, sourceLineAndNumberForImport
 

Property Detail

astVisitorClass

Class astVisitorClass


name

String name


priority

int priority


 
Constructor Detail

SynchronizedMethodRule

SynchronizedMethodRule()


 

Groovy Documentation