Top Description Methods
org.intellij.lang.annotations

public @Interface PrintFormat

Additional top-level class in compilation unit: PrintFormatPattern.

extends Annotation
Annotations
@Documented
@Pattern:(?:[^%]|%%|(?:%(?:\\d+\\$)?(?:[-#+ 0,(<]*)?(?:\\d+)?(?:\\.\\d+)?(?:[tT])?(?:[a-zA-Z%])))*
Imports
java.lang.annotation.Documented

Specifies that the method parameter is a printf-style print format pattern, as described in java.util.Formatter.

Code editors that support Pattern annotation will check the syntax of this value automatically. It could also be especially recognized to check whether the subsequent var-arg arguments match the expected arguments mentioned in the pattern. E. g., consider that the following method is annotated:


void myprintf(@PrintFormat String format, Object... args) {...}

In this case, code editors might recognize that the following call is erroneous, and issue a warning:


myprintf("%d\n", "hello"); // warning: a number expected instead of "hello"
See Also
Pattern

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString