Available Compiler Annotations

/*@ExtJsClass*/

Can be applied on classes

Classes decorated with this attribute will be emitted as extjs classes. And all calls to new will be emitted as Ext.create(“<typeName”>, params);

 /*@ConfigInterface*/

Can be applied on classes

Classes decorated with this attribute will have an extra interface generated, prefixed with “I”, that will contain all member variables that have been decorated with /*@Config*/. The members will be declared as optional on the interface.

 /*@config*/

Can be applied on member variables of classes. Cannot be applied on member variables of interfaces.

Used together with /*@ConfigInterface*/, defines which members will be part of the configuration interface.

For ExtJs classes (decorated with /*@ExtJsClass*/), the members decorated with this attribute will be placed in the config section of the definition when emitted.

 /*@prop*/

Can be applied on member variables of classes. Cannot be applied on member variables of interfaces.

Members decorated with this will have extra getter and setter methods inferred. For regular classes these methods will have simple javascript emitted that will get and set the field.

For ExtJS classes, no code for the getter and setter will be emitted as these members will be automatically generated by the extJS framework.

/*@vm-field*/ /*@model-field*/

Can be applied on member variables of classes. Cannot be applied on member variables of interfaces.

Members decorated with this will have extra getter and setter methods inferred. The difference to the prop attribute is that the generated getter and setter will not use the backing field, but will instead call a set/get method that has first parameter of type string that is the name of the property. The get function should return the value and the set function should have a second parameter which is the vale to be set. The field on which this is applied should never be used as they will not actually be used as Ext view models and models it store the data in a different manner.

 

Last edited Jul 17, 2014 at 5:00 PM by dragomirtitian, version 2