1 /******************************************************************************* 2 * Copyright (c) 2015 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.jdt.core.search; 15 16 import org.eclipse.core.runtime.IProgressMonitor; 17 18 /** 19 * A <code>MethodNameMatchRequestor</code> collects matches from a <code>searchAllMethodNames</code> 20 * query to a <code>SearchEngine</code>. Clients must subclass this abstract class and pass an instance to the 21 * {@link SearchEngine#searchAllMethodNames( 22 * char[] packageName, 23 * int pkgMatchRule, 24 * char[] declaringQualification, 25 * int declQualificationMatchRule, 26 * char[] delcaringSimpleName, 27 * int declSimpleNameMatchRule, 28 * char[] methodName, 29 * int methodMatchRule, 30 * IJavaSearchScope scope, 31 * MethodNameMatchRequestor methodRequestor, 32 * int waitingPolicy, 33 * IProgressMonitor progressMonitor)} method. 34 * <p> 35 * While {@link MethodNameRequestor} only reports method names information (e.g. package, enclosing types, method name, modifiers, etc.), 36 * this class reports {@link MethodNameMatch} objects instead, which store this information and can return 37 * an {@link org.eclipse.jdt.core.IMethod} handle. 38 * </p> 39 * <p> 40 * This class may be subclassed by clients. 41 * </p> 42 * @see MethodNameMatch 43 * @see MethodNameRequestor 44 * 45 * @since 3.12 46 */ 47 public abstract class MethodNameMatchRequestor { 48 49 /** 50 * Accepts a method name match ({@link MethodNameMatch}) which contains a method 51 * information as package name, enclosing types names, method name, modifiers, etc. 52 * 53 * @param match the match which contains all method information 54 */ acceptMethodNameMatch(MethodNameMatch match)55 public abstract void acceptMethodNameMatch(MethodNameMatch match); 56 57 } 58