001package react4j.annotations; 002 003import java.lang.annotation.ElementType; 004import java.lang.annotation.Retention; 005import java.lang.annotation.RetentionPolicy; 006import java.lang.annotation.Target; 007 008/** 009 * Indicate that the named React4j compiler warnings should be suppressed in the 010 * annotated element (and in all program elements contained in the annotated 011 * element). Note that the set of warnings suppressed in a given element is 012 * a superset of the warnings suppressed in all containing elements. For 013 * example, if you annotate a class to suppress one warning and annotate a 014 * method to suppress another, both warnings will be suppressed in the method. 015 * 016 * <p>As a matter of style, programmers should always use this annotation 017 * on the most deeply nested element where it is effective. If you want to 018 * suppress a warning in a particular method, you should annotate that 019 * method rather than its class.</p> 020 * 021 * <p>This class may be used instead of {@link SuppressWarnings} when the compiler 022 * is passed compiled classes. The {@link SuppressWarnings} has a source retention 023 * policy and is thus not available when the files are already compiled and is thus 024 * not useful when attempting to suppress warnings in already compiled code.</p> 025 */ 026@Target( { ElementType.TYPE, 027 ElementType.FIELD, 028 ElementType.METHOD, 029 ElementType.PARAMETER, 030 ElementType.CONSTRUCTOR, 031 ElementType.LOCAL_VARIABLE } ) 032@Retention( RetentionPolicy.CLASS ) 033public @interface SuppressReact4jWarnings 034{ 035 /** 036 * The set of warnings that are to be suppressed by the compiler in the 037 * annotated element. Duplicate names are permitted. The second and 038 * successive occurrences of a name are ignored. 039 * 040 * @return the set of warnings to be suppressed 041 */ 042 String[] value(); 043}