Annotation Examples
Annotations
Annotations add metadata to source code that is (most of the time) used by compiled classes at runtime. The below is a list of popular ones in kuali, it is not meant to be a complete list.
- Java Annotations
- @Deprecated -Â Java APIÂ
"A program element annotated @Deprecated is one that programmers are discouraged from using, [...]" - @Override -Â Java APIÂ
"Indicates that a method declaration is intended to override a method declaration in a superclass or implement a method in an interface." - @SuppressWarnings -Â Java APIÂ
"Indicates that the named compiler warnings should be suppressed in the annotated element [...]"
Please don't suppress warnings just because you can.  Make an educated decision. - There is more to annotations then predefined ones. Consult Java documentation for more complete reading (such as their tutorial).
- @Deprecated -Â Java APIÂ
- Spring Framework annotations
- @Transactional -Â Spring APIÂ
"[...] whether a given exception should cause transaction rollback [...]"
- @Transactional -Â Spring APIÂ
- Kuali annotations. Documentation is partial snippet from kuali source code.
- @AnnotationTestSuite
"[...] marks test classes or methods as members of the listed test suites." - @ConfigureContext
"[...] configure the appropriate context for the methods in a test that extends KualiTestBase."
session = KHUNTLEY, initializeBatchSchedule=true, shouldCommitTransactions=true - @RawSQL
"Used to reference classes/methods/constants which contain SQL statements rather than OJB calls." - @RelatesTo
"[...] marks test classes or methods which have failed for reasons relating to certain JIRA issues."
- @AnnotationTestSuite