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 package org.jemmy.swt.lookup; 26 27 import java.lang.reflect.InvocationTargetException; 28 import java.lang.reflect.Method; 29 import java.util.ArrayList; 30 import java.util.List; 31 import org.eclipse.swt.widgets.Item; 32 import org.jemmy.resources.StringComparePolicy; 33 34 /** 35 * 36 * @author erikgreijus 37 * @param <T> 38 */ 39 public class ByItemStringsLookup<T extends Item> extends QueueLookup<T> { 40 41 private final StringComparePolicy policy; 42 private final String text; 43 44 /** 45 * 46 * @param text The text to use for matching 47 */ 48 public ByItemStringsLookup(String text) { 49 this(text, StringComparePolicy.SUBSTRING); 50 } 51 52 /** 53 * 54 * @param text The text to use for matching 55 * @param policy The policy to use when matching the text 56 */ 57 public ByItemStringsLookup(String text, StringComparePolicy policy) { | 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 package org.jemmy.swt.lookup; 26 27 import java.lang.reflect.InvocationTargetException; 28 import java.lang.reflect.Method; 29 import java.util.ArrayList; 30 import java.util.List; 31 import org.eclipse.swt.widgets.Item; 32 import org.jemmy.resources.StringComparePolicy; 33 34 /** 35 * @author erikgreijus 36 */ 37 public class ByItemStringsLookup<T extends Item> extends QueueLookup<T> { 38 39 private final StringComparePolicy policy; 40 private final String text; 41 42 /** 43 * 44 * @param text The text to use for matching 45 */ 46 public ByItemStringsLookup(String text) { 47 this(text, StringComparePolicy.SUBSTRING); 48 } 49 50 /** 51 * 52 * @param text The text to use for matching 53 * @param policy The policy to use when matching the text 54 */ 55 public ByItemStringsLookup(String text, StringComparePolicy policy) { |