Groovy Documentation

Package org.codenarc.rule.design

 

Class Summary
AbstractClassWithoutAbstractMethodAstVisitor
AbstractClassWithoutAbstractMethodRule The abstract class does not contain any abstract methods.
CloseWithoutCloseableAstVisitor
CloseWithoutCloseableRule If a class defines a "void close()" then that class should implement java.io.Closeable.
ConstantsOnlyInterfaceAstVisitor
ConstantsOnlyInterfaceRule An interface should be used only to model a behaviour of a class: using an interface as a container of constants is a poor usage pattern.
EmptyMethodInAbstractClassAstVisitor
EmptyMethodInAbstractClassRule An empty method in an abstract class should be abstract instead, as developer may rely on this empty implementation rather than code the appropriate one.
FinalClassWithProtectedMemberAstVisitor
FinalClassWithProtectedMemberRule This rule finds classes marked final that contain protected methods and fields.
ImplementationAsTypeAstVisitor
ImplementationAsTypeRule Checks for use of the following concrete classes when specifying the type of a method parameter, closure parameter, constructor parameter, method return type or field type (the associated interfaces should be used to specify the type instead):
  • java.util.ArrayList
  • java.util.GregorianCalendar
  • java.util.HashMap
  • java.util.HashSet
  • java.util.Hashtable
  • java.util.LinkedHashMap
  • java.util.LinkedHashSet
  • java.util.LinkedList
  • java.util.TreeMap
  • java.util.TreeSet
  • java.util.Vector
  • java.util.concurrent.ArrayBlockingQueue
  • java.util.concurrent.ConcurrentHashMap
  • java.util.concurrent.ConcurrentLinkedQueue
  • java.util.concurrent.CopyOnWriteArrayList
  • java.util.concurrent.CopyOnWriteArraySet
  • java.util.concurrent.DelayQueue
  • java.util.concurrent.LinkedBlockingQueue
  • java.util.concurrent.PriorityBlockingQueue
  • java.util.concurrent.PriorityQueue
  • java.util.concurrent.SynchronousQueue
 


Groovy Documentation