1 package jdk.incubator.code.internal; 2 3 import jdk.incubator.code.Op; 4 5 import java.lang.annotation.ElementType; 6 import java.lang.annotation.Retention; 7 import java.lang.annotation.RetentionPolicy; 8 import java.lang.annotation.Target; 9 10 /** 11 * An operation declaration annotation. 12 * <p> 13 * This annotation may be declared on a concrete class implementing an {@link Op operation} whose name is a constant 14 * that can be declared as this attribute's value. 15 * <p> 16 * Tooling can process declarations of this annotation to build a factory for constructing operations from their name. 17 */ 18 @Retention(RetentionPolicy.RUNTIME) 19 @Target(ElementType.TYPE) 20 public @interface OpDeclaration { 21 /** 22 * {@return the operation name} 23 */ 24 String value(); 25 }