Groovy Documentation

groovy.org.codenarc.rule.unnecessary
[Groovy] Class UnnecessaryIntegerInstantiationRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.unnecessary.UnnecessaryIntegerInstantiationRule

class UnnecessaryIntegerInstantiationRule
extends AbstractAstVisitorRule

It is unnecessary to instantiate Integer objects. Instead just use the literal with the 'I' identifier to force the type, such as 8I or 42i.

Authors:
Hamlet D'Arcy


Property Summary
Class astVisitorClass

String name

int priority

 

Property Detail

astVisitorClass

Class astVisitorClass


name

String name


priority

int priority


 

Groovy Documentation