Details
-
Type:
Wish
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.1-rc-3
-
Component/s: None
-
Labels:None
Description
We need a way to parse metadata at the class, field, property, method level. We should go for .NET / JDK 1.5 format. I'm no expert on this - I think Jon Tirsen seems to know about it. Examples include
[indentity foo, bar]
[pre results.each { i | assert i > 100 }]
So I'm assuming that the syntax is something like [nameOfAttribute ...] where ... can be any groovy expression/statement
Issue Links
- duplicates
-
GROOVY-1715
Annotation support
-
- is depended upon by
-
GROOVY-753
complete parser
-
Attributes are actually just classes with properties. Basically you should allow any class to be used as an attribute and then assign property like this:
[MyAttributeClass(property1=..., property2=...)]
and then be able to process those attributes at runtime. Possibly put in hooks for validation at compile time as well.