當前位置: 首頁>>代碼示例>>Java>>正文


Java IMethod.isBinary方法代碼示例

本文整理匯總了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);
}
 
開發者ID:eclipse,項目名稱:eclipse.jdt.ls,代碼行數:23,代碼來源:RippleMethodFinder.java

示例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();
}
 
開發者ID:eclipse,項目名稱:eclemma,代碼行數:20,代碼來源:SignatureResolver.java


注:本文中的org.eclipse.jdt.core.IMethod.isBinary方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。