本文整理了Java中org.eclipse.jdt.core.Signature.getParameterCount()
方法的一些代码示例,展示了Signature.getParameterCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Signature.getParameterCount()
方法的具体详情如下:
包路径:org.eclipse.jdt.core.Signature
类名称:Signature
方法名:getParameterCount
[英]Returns the number of parameter types in the given method signature.
[中]返回给定方法签名中的参数类型数。
代码示例来源:origin: eclipse/eclemma
private String createParamCountKey(final String name,
final String fullSignature) {
return name + "@" + Signature.getParameterCount(fullSignature); //$NON-NLS-1$
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
/**
* Returns the number of parameter types in the given method signature.
*
* @param methodSignature the method signature
* @return the number of parameters
* @exception IllegalArgumentException if the signature is not syntactically
* correct
*/
public static int getParameterCount(String methodSignature) throws IllegalArgumentException {
return getParameterCount(methodSignature.toCharArray());
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
/**
* Returns the number of parameter types in the given method signature.
*
* @param methodSignature the method signature
* @return the number of parameters
* @exception IllegalArgumentException if the signature is not syntactically
* correct
*/
public static int getParameterCount(String methodSignature) throws IllegalArgumentException {
return getParameterCount(methodSignature.toCharArray());
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
/**
* Returns the number of parameter types in the given method signature.
*
* @param methodSignature the method signature
* @return the number of parameters
* @exception IllegalArgumentException if the signature is not syntactically
* correct
*/
public static int getParameterCount(String methodSignature) throws IllegalArgumentException {
return getParameterCount(methodSignature.toCharArray());
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
/**
* Returns the number of parameter types in the given method signature.
*
* @param methodSignature the method signature
* @return the number of parameters
* @exception IllegalArgumentException if the signature is not syntactically
* correct
*/
public static int getParameterCount(String methodSignature) throws IllegalArgumentException {
return getParameterCount(methodSignature.toCharArray());
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
/**
* Returns the number of parameter types in the given method signature.
*
* @param methodSignature the method signature
* @return the number of parameters
* @exception IllegalArgumentException if the signature is not syntactically
* correct
*/
public static int getParameterCount(String methodSignature) throws IllegalArgumentException {
return getParameterCount(methodSignature.toCharArray());
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
/**
* Returns the number of parameter types in the given method signature.
*
* @param methodSignature the method signature
* @return the number of parameters
* @exception IllegalArgumentException if the signature is not syntactically
* correct
*/
public static int getParameterCount(String methodSignature) throws IllegalArgumentException {
return getParameterCount(methodSignature.toCharArray());
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
private boolean computeHasParameters() throws IllegalArgumentException {
return Signature.getParameterCount(fProposal.getSignature()) > 0;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
/**
* Returns <code>true</code> if the method being inserted has at least one parameter. Note
* that this does not say anything about whether the argument list should be inserted.
*
* @return <code>true</code> if the method has any parameters, <code>false</code> if it has no parameters
* @since 3.4
*/
private boolean hasParameters() {
CompletionProposal proposal= ((MemberProposalInfo)getProposalInfo()).fProposal;
return Signature.getParameterCount(proposal.getSignature()) > 0;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
/**
* Returns <code>true</code> if the method being inserted has at least one parameter. Note
* that this does not say anything about whether the argument list should be inserted.
*
* @return <code>true</code> if the method has any parameters, <code>false</code> if it has no parameters
* @since 3.4
*/
private boolean hasParameters() {
CompletionProposal proposal= ((MemberProposalInfo)getProposalInfo()).fProposal;
return Signature.getParameterCount(proposal.getSignature()) > 0;
}
代码示例来源:origin: eclipse/eclipse.jdt.ls
private boolean hasParameters(CompletionProposal proposal) throws IllegalArgumentException {
return hasArgumentList(proposal) &&
Signature.getParameterCount(proposal.getSignature()) > 0;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public String[] getRawParameterNames() throws JavaModelException {
IBinaryMethod info = (IBinaryMethod) getElementInfo();
int paramCount = Signature.getParameterCount(new String(info.getMethodDescriptor()));
return getRawParameterNames(paramCount);
}
private String[] getRawParameterNames(int paramCount) {
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
public String[] getRawParameterNames() throws JavaModelException {
IBinaryMethod info = (IBinaryMethod) getElementInfo();
int paramCount = Signature.getParameterCount(new String(info.getMethodDescriptor()));
return getRawParameterNames(paramCount);
}
private String[] getRawParameterNames(int paramCount) {
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public String[] getRawParameterNames() throws JavaModelException {
IBinaryMethod info = (IBinaryMethod) getElementInfo();
int paramCount = Signature.getParameterCount(new String(info.getMethodDescriptor()));
return getRawParameterNames(paramCount);
}
private String[] getRawParameterNames(int paramCount) {
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public String[] getRawParameterNames() throws JavaModelException {
IBinaryMethod info = (IBinaryMethod) getElementInfo();
int paramCount = Signature.getParameterCount(new String(info.getMethodDescriptor()));
return getRawParameterNames(paramCount);
}
private String[] getRawParameterNames(int paramCount) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public String[] getRawParameterNames() throws JavaModelException {
IBinaryMethod info = (IBinaryMethod) getElementInfo();
int paramCount = Signature.getParameterCount(new String(info.getMethodDescriptor()));
return getRawParameterNames(paramCount);
}
private String[] getRawParameterNames(int paramCount) {
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public String[] getRawParameterNames() throws JavaModelException {
IBinaryMethod info = (IBinaryMethod) getElementInfo();
int paramCount = Signature.getParameterCount(new String(info.getMethodDescriptor()));
return getRawParameterNames(paramCount);
}
private String[] getRawParameterNames(int paramCount) {
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
private IJavaCompletionProposal createMethodReferenceProposal(CompletionProposal methodProposal) {
String completion= String.valueOf(methodProposal.getCompletion());
// super class' behavior if this is not a normal completion or has no
// parameters
if ((completion.length() == 0) || ((completion.length() == 1) && completion.charAt(0) == ')') || Signature.getParameterCount(methodProposal.getSignature()) == 0 || getContext().isInJavadoc())
return super.createJavaCompletionProposal(methodProposal);
LazyJavaCompletionProposal proposal= null;
proposal= ParameterGuessingProposal.createProposal(methodProposal, getInvocationContext(), fIsGuessArguments);
if (proposal == null) {
proposal= new FilledArgumentNamesMethodProposal(methodProposal, getInvocationContext());
}
return proposal;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
private IJavaCompletionProposal createMethodReferenceProposal(CompletionProposal methodProposal) {
String completion= String.valueOf(methodProposal.getCompletion());
// super class' behavior if this is not a normal completion or has no
// parameters
if ((completion.length() == 0) || ((completion.length() == 1) && completion.charAt(0) == ')') || Signature.getParameterCount(methodProposal.getSignature()) == 0 || getContext().isInJavadoc())
return super.createJavaCompletionProposal(methodProposal);
LazyJavaCompletionProposal proposal= null;
proposal= ParameterGuessingProposal.createProposal(methodProposal, getInvocationContext(), fIsGuessArguments);
if (proposal == null) {
proposal= new FilledArgumentNamesMethodProposal(methodProposal, getInvocationContext());
}
return proposal;
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
private IJavaCompletionProposal createMethodReferenceProposal(CompletionProposal methodProposal) {
String completion= String.valueOf(methodProposal.getCompletion());
// super class' behavior if this is not a normal completion or has no
// parameters
if ((completion.length() == 0) || ((completion.length() == 1) && completion.charAt(0) == ')') || Signature.getParameterCount(methodProposal.getSignature()) == 0 || getContext().isInJavadoc())
return super.createJavaCompletionProposal(methodProposal);
LazyJavaCompletionProposal proposal;
ICompilationUnit compilationUnit= getCompilationUnit();
if (compilationUnit != null && fIsGuessArguments)
proposal= new ParameterGuessingProposal(methodProposal, getInvocationContext());
else
proposal= new FilledArgumentNamesMethodProposal(methodProposal, getInvocationContext());
return proposal;
}
内容来源于网络,如有侵权,请联系作者删除!