PowerDesigner provides full support for Java 5.0 annotations, which allow you to add metadata to your code. This metadata can be accessed by post-processing tools or at run-time to vary the behavior of the system.
You can use built-in annotations, such as those listed below, and also create your own annotations, to apply to your types.
There are three types of annotations available:
PowerDesigner supports the seven built-in Java 5.0 annotations:
java.lang.Override - specifies that a method declaration will override a method declaration in a superclass, and will generate a compile-time error if this is not the case.
java.lang.Deprecated – specifies that an element is deprecated, and generates a compile-time warning if it is used in non-deprecated code.
java.lang.SuppressWarning – specifies compile-time warnings that should be suppressed for the element.
java.lang.annotation.Documented – specifies that annotations with a type declaration are to be documented by javadoc and similar tools by default to become part of the public API of the annotated elements.
java.lang.annotation.Inherited – specifies that an annotation type is automatically inherited for a superclass
java.lang.annotation.Retention – specifies how far annotations will be retained during processing. Takes one of the following values:
java.lang.annotation.Target – restricts the kind of program element to which an annotation may be applied and generates compile-time errors. Takes one of the following values:
For general information about modeling this form of metadata in PowerDesigner, see Attributes (OOM).