/
Annotation Examples
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
Related content
Validation and Error Handling
Validation and Error Handling
More like this
Data Dictionary
Data Dictionary
More like this
Financials Coding Standards
Financials Coding Standards
More like this
Tips and FAQs
Tips and FAQs
More like this
Java Coding Standards
Java Coding Standards
More like this
Parameters
Parameters
More like this