001package arez.annotations; 002 003import java.lang.annotation.Documented; 004import java.lang.annotation.ElementType; 005import java.lang.annotation.Retention; 006import java.lang.annotation.RetentionPolicy; 007import java.lang.annotation.Target; 008 009/** 010 * Annotation applied to a framework-defined type annotation to indicate that the annotated type should be treated 011 * as an Arez-compatible container. 012 * 013 * <p>Normally a type that contains {@link Action @Action} or most other Arez processor annotations must be 014 * annotated with either {@link ArezComponent @ArezComponent} or {@link ArezComponentLike @ArezComponentLike}. 015 * If neither annotation is present then the Arez processor reports the Arez annotation usage as invalid.</p> 016 * 017 * <p>Applying {@code @ActAsArezComponent} to another annotation, such as a framework-specific {@code @View} 018 * annotation, tells the Arez processor that types annotated with that framework annotation are valid locations 019 * for Arez annotations. This allows another framework to define its own component model and process those Arez 020 * annotations itself or generate an Arez-compatible subtype.</p> 021 * 022 * <p>The preferred integration pattern is for the framework annotation to depend directly on this annotation, but 023 * the Arez processor also recognizes any meta-annotation named {@code ActAsArezComponent}. This fallback exists so 024 * downstream frameworks can declare a package-access compatibility annotation without taking a direct code 025 * dependency on Arez.</p> 026 */ 027@Documented 028@Retention( RetentionPolicy.RUNTIME ) 029@Target( ElementType.ANNOTATION_TYPE ) 030public @interface ActAsArezComponent 031{ 032}