本文整理匯總了Java中org.eclipse.jdt.core.IMethod.isBinary方法的典型用法代碼示例。如果您正苦於以下問題:Java IMethod.isBinary方法的具體用法?Java IMethod.isBinary怎麽用?Java IMethod.isBinary使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jdt.core.IMethod
的用法示例。
在下文中一共展示了IMethod.isBinary方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: findAllDeclarations
import org.eclipse.jdt.core.IMethod; //導入方法依賴的package包/類
private void findAllDeclarations(IProgressMonitor monitor, WorkingCopyOwner owner) throws CoreException {
fDeclarations = new ArrayList<>();
class MethodRequestor extends SearchRequestor {
@Override
public void acceptSearchMatch(SearchMatch match) throws CoreException {
IMethod method = (IMethod) match.getElement();
boolean isBinary = method.isBinary();
if (!isBinary) {
fDeclarations.add(method);
}
}
}
int limitTo = IJavaSearchConstants.DECLARATIONS | IJavaSearchConstants.IGNORE_DECLARING_TYPE | IJavaSearchConstants.IGNORE_RETURN_TYPE;
int matchRule = SearchPattern.R_ERASURE_MATCH | SearchPattern.R_CASE_SENSITIVE;
SearchPattern pattern = SearchPattern.createPattern(fMethod, limitTo, matchRule);
MethodRequestor requestor = new MethodRequestor();
SearchEngine searchEngine = owner != null ? new SearchEngine(owner) : new SearchEngine();
searchEngine.search(pattern, new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() }, createSearchScope(), requestor, monitor);
}
示例2: getParameters
import org.eclipse.jdt.core.IMethod; //導入方法依賴的package包/類
/**
* Extracts the resolved binary parameters from the given method
*
* @param method
* method to resolve
* @return binary parameter specification
*/
public static String getParameters(final IMethod method)
throws JavaModelException {
if (method.isBinary()) {
return getParameters(method.getSignature());
}
final StringBuilder buffer = new StringBuilder();
final String[] parameterTypes = method.getParameterTypes();
for (final String t : parameterTypes) {
resolveArrayParameterType(method, t, buffer);
}
return buffer.toString();
}