1 /*
   2  * Copyright (c) 2007, 2017 Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package org.jemmy.dock;
  25 
  26 import java.lang.annotation.Documented;
  27 import java.lang.annotation.ElementType;
  28 import java.lang.annotation.Target;
  29 import org.jemmy.control.Wrap;
  30 
  31 /**
  32  * This should be used on classes - inheritors of <code>Wrap</code> class to give
  33  * annotation processor some information.
  34  * @see Wrap
  35  * @author shura
  36  */
  37 @Target(ElementType.TYPE)
  38 @Documented
  39 public @interface DockInfo {
  40     /**
  41      * Desired name of the dock class, should one be generated.
  42      * Usually empty ("", as nulls are not allowed) in which case the calculated value
  43      * is taken whatever logic annotation processor decides to use.
  44      */
  45     String name() default "";
  46     
  47     /**
  48      * Should there be extra constructors which take another lookup criteria - a class
  49      * of a desired control? That class must be a subtype of the one wrapped by the wrap
  50      * class annotated with this annotation.
  51      */
  52     boolean generateSubtypeLookups() default false;
  53     
  54     /**
  55      * Should generated <code>wrap()</code> method return this class or 
  56      * <code>Wrap<? extends ...></code> and also should there be a constructor with
  57      * one parameter - the wrap.
  58      */
  59     boolean anonymous() default false;
  60     
  61     /**
  62      * Should the lookup constructors have <code>LookupCriteria&lt;Type&gt;...</code>
  63      * parameter or the <code>LookupCriteria&lt;Type&gt;</code> parameter.
  64      */
  65     boolean multipleCriteria() default true;
  66 }