# Class MethodNameMatch

java.lang.Object
org.eclipse.jdt.core.search.MethodNameMatch

public abstract class MethodNameMatch extends Object
A match collected while `searching` for all type names methods using a `requestor`.

The method of this match is available from `getMethod()`.

Since:
  3.12
See Also:
  - `MethodNameMatchRequestor`
  - `SearchEngine.searchAllMethodNames(char[], int, char[], int, char[], int, char[], int, IJavaSearchScope, MethodNameMatchRequestor, int, org.eclipse.core.runtime.IProgressMonitor)`
Restriction:
  This class is not intended to be subclassed by clients.

## Constructor Summary

Constructors
Constructor
Description
`MethodNameMatch()`

## Method Summary

Modifier and Type
Method
Description
`abstract int`
`getAccessibility()`
Returns the accessibility of the declaring type of the method name match
`abstract IMethod`
`getMethod()`
Returns a java model method handle.
`abstract int`
`getModifiers()`
Returns the modifiers of the matched method.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MethodNameMatch

public MethodNameMatch()

## Method Details

### getAccessibility

public abstract int getAccessibility()
Returns the accessibility of the declaring type of the method name match

Returns:
  the accessibility of the declaring type of the method name which may be `IAccessRule.K_ACCESSIBLE`, `IAccessRule.K_DISCOURAGED` or `IAccessRule.K_NON_ACCESSIBLE`. The default returned value is `IAccessRule.K_ACCESSIBLE`.
See Also:
  - `IAccessRule`

### getModifiers

public abstract int getModifiers()
Returns the modifiers of the matched method.

This is a handle-only method as neither Java Model nor classpath initialization is done while calling this method.

Returns:
  the type modifiers

### getMethod

public abstract IMethod getMethod()
Returns a java model method handle. This handle may exist or not, but is not supposed to be `null`.

This is a handle-only method as neither Java Model nor classpath initializations are done while calling this method.

Returns:
  the non-null handle on matched java model method.
See Also:
  - `IMethod`