001package arez.annotations; 002 003import java.lang.annotation.Documented; 004import java.lang.annotation.ElementType; 005import java.lang.annotation.Target; 006 007/** 008 * Marks a template method that returns the Id of the component. 009 * 010 * <p>The method that is annotated with this annotation must also comply with the following constraints:</p> 011 * <ul> 012 * <li>Must not be annotated with any other arez annotation</li> 013 * <li>Must be abstract</li> 014 * <li>Must not throw any exceptions</li> 015 * <li>Must return a value that has the same type as returned by the method annotated by {@link ComponentId} or an <code>int</code>.</li> 016 * <li>Must be accessible to the class annotated by the {@link ArezComponent} annotation.</li> 017 * </ul> 018 */ 019@Documented 020@Target( ElementType.METHOD ) 021public @interface ComponentIdRef 022{ 023}