001package arez.persist; 002 003import java.lang.annotation.Documented; 004import java.lang.annotation.ElementType; 005import java.lang.annotation.Target; 006 007/** 008 * Annotation applied to method that returns the a value to identify the instance of the type. 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 have any parameters</li> 013 * <li>Must not throw any exceptions</li> 014 * <li>Must not be parameterized</li> 015 * <li>Must not be private</li> 016 * <li>Must not be protected</li> 017 * <li>Must not be static</li> 018 * <li>If package access, the method must be in the same package as any subclass annotated with the {@link PersistType} annotation.</li> 019 * </ul> 020 */ 021@Documented 022@Target( ElementType.METHOD ) 023public @interface PersistId 024{ 025}