Groovy Documentation

groovy.org.codenarc.rule.generic
[Groovy] Class IllegalPackageReferenceRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.generic.IllegalPackageReferenceRule

class IllegalPackageReferenceRule
extends AbstractAstVisitorRule

Checks for reference to any of the named packages.

The packageNames property specifies the comma-separated list of package names to check for. The package name(s) may optionally include wildcard characters ('*' or '?'). Note that the '*' wildcard matches any sequence of zero or more characters in the package name, e.g. 'a.*' matches 'a.b' as well as 'a.b.c.d'. If packageNames is null or empty, do nothing. Known limitation: Does not catch references as Anonymous Inner class: def x = new org.bad.Handler() { .. }

Authors:
Chris Mair


Property Summary
Class astVisitorClass

String name

String packageNames

int priority

 
Method Summary
boolean isReady()

 

Property Detail

astVisitorClass

Class astVisitorClass


name

String name


packageNames

String packageNames


priority

int priority


 
Method Detail

isReady

boolean isReady()


 

Groovy Documentation