Groovy Documentation

groovy.org.codenarc.rule.naming
[Groovy] Class FactoryMethodNameRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.naming.FactoryMethodNameRule

class FactoryMethodNameRule
extends AbstractAstVisitorRule

A factory method is a method that creates objects, and they are typically named either buildFoo(), makeFoo(), or createFoo(). This rule enforces that only one naming convention is used. It defaults to makeFoo(), but that can be changed using the property 'regex'.

Authors:
Hamlet D'Arcy


Property Summary
Class astVisitorClass

String name

int priority

String regex

 

Property Detail

astVisitorClass

Class astVisitorClass


name

String name


priority

int priority


regex

String regex


 

Groovy Documentation