Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
- Introduce a @NamingConvention annotation, that supplies patterns for class/method/field/... names allowed/used in the project to the Groovy compiler
- Example:
@NamingConvention( classes=/[A-Z][A-Za-z0-9]{3,}/, methods=/[a-z][A-Za-z0-9]+/, fields=/[a-z][A-Za-z0-9_]*/ variables=/[a-z0-9_]+/, parameters=/[a-z]+/, ) class Foo { // Classes used inside of class start with an uppercase // letter followed by 3 letter/digit combinations, etc }
- This would supply a speedup for e.g. class lookups, since any name that does not match the given class pattern can be dismissed immediately
Attachments
Issue Links
- relates to
-
GROOVY-8490 Extend @Newify to support a class name pattern parameter
- Closed