12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package org.jemmy.lookup; 27 28 import org.jemmy.interfaces.Parent; 29 30 /** 31 * Implements two shortcut methods. 32 * @param <CONTROL> 33 * @author shura 34 */ 35 public abstract class AbstractParent<CONTROL> implements Parent<CONTROL> { 36 37 /** 38 * Calls <code>lookup(controlClass, new Any<ST>())</code> 39 * @see Any 40 * @param <ST> 41 * @param controlClass 42 * @return 43 */ 44 public <ST extends CONTROL> Lookup<ST> lookup(Class<ST> controlClass) { 45 return lookup(controlClass, new Any<ST>()); 46 } 47 48 /** 49 * Calls <code>lookup(new Any<T>())</code> 50 * @see Any 51 * @return 52 */ 53 public Lookup<CONTROL> lookup() { 54 return lookup(new Any<CONTROL>()); 55 } 56 57 } | 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package org.jemmy.lookup; 27 28 import org.jemmy.interfaces.Parent; 29 30 /** 31 * Implements two shortcut methods. 32 * @param <CONTROL> todo document 33 * @author shura 34 */ 35 public abstract class AbstractParent<CONTROL> implements Parent<CONTROL> { 36 37 /** 38 * Calls <code>lookup(controlClass, new Any())</code> 39 * @see Any 40 * @param <ST> todo document 41 * @param controlClass todo document 42 * @return todo document 43 */ 44 public <ST extends CONTROL> Lookup<ST> lookup(Class<ST> controlClass) { 45 return lookup(controlClass, new Any<ST>()); 46 } 47 48 /** 49 * Calls <code>lookup(new Any())</code> 50 * @see Any 51 * @return todo document 52 */ 53 public Lookup<CONTROL> lookup() { 54 return lookup(new Any<CONTROL>()); 55 } 56 57 } |