001 package org.nakedobjects.applib.annotation;
002
003 import java.lang.annotation.ElementType;
004 import java.lang.annotation.Inherited;
005 import java.lang.annotation.Retention;
006 import java.lang.annotation.RetentionPolicy;
007 import java.lang.annotation.Target;
008
009
010 /**
011 * Indicates that the class has additional facets, and specifies the how to obtain the <tt>FacetFactory</tt>
012 * to manufacture them.
013 *
014 * <p>
015 * At least one named factory (as per {@link #facetFactoryNames()}) or one class factory (as per
016 * {@link #facetFactoryClasses()}) should be specified.
017 */
018 @Inherited
019 @Target( { ElementType.TYPE })
020 @Retention(RetentionPolicy.RUNTIME)
021 public @interface Facets {
022 /**
023 * Array of fully qualified names of classes each implementing
024 * <tt>org.nakedobjects.metamodel.facets.FacetFactory</tt>.
025 *
026 * <p>
027 * Either the array provided by this method or by {@link #facetFactoryClasses()} should be non-empty.
028 */
029 String[] facetFactoryNames() default {};
030
031 /**
032 * Array of {@link Class}s, each indicating a class implementing
033 * <tt>org.nakedobjects.metamodel.facets.FacetFactory</tt>.
034 *
035 * <p>
036 * Either the array provided by this method or by {@link #facetFactoryNames()} should be non-empty.
037 */
038 Class<?>[] facetFactoryClasses() default {};
039
040 }