Search in sources :

Example 1 with I18nFormat

use of org.checkerframework.checker.i18nformatter.qual.I18nFormat in project checker-framework by typetools.

the class I18nFormatterTreeUtil method categoriesToFormatAnnotation.

/**
 * Takes a list of ConversionCategory elements, and returns a syntax tree element that
 * represents a {@link I18nFormat} annotation with the list as value.
 */
public AnnotationMirror categoriesToFormatAnnotation(I18nConversionCategory[] args) {
    AnnotationBuilder builder = new AnnotationBuilder(processingEnv, I18nFormat.class.getCanonicalName());
    builder.setValue("value", args);
    return builder.build();
}
Also used : AnnotationBuilder(org.checkerframework.javacutil.AnnotationBuilder) I18nFormat(org.checkerframework.checker.i18nformatter.qual.I18nFormat)

Aggregations

I18nFormat (org.checkerframework.checker.i18nformatter.qual.I18nFormat)1 AnnotationBuilder (org.checkerframework.javacutil.AnnotationBuilder)1