How to add a new Annotation?


#1

What should I do to add a new annotation ?


#2

Create a new type and annotate it with @annotation()

for example

@annotation(appliesTo=['viewField'])
type Ann.Example {
 
}

applies to can be annotation apply to type or field ['type', 'field'])


#3

See c3ShowType(C3.annotation.Annotation) for more information on how to write your own annotation type.

Related post: Documentation on annotations