本文整理了Java中org.eclipse.jdt.core.Signature.getParameterTypes()
方法的一些代码示例,展示了Signature.getParameterTypes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Signature.getParameterTypes()
方法的具体详情如下:
包路径:org.eclipse.jdt.core.Signature
类名称:Signature
方法名:getParameterTypes
[英]Extracts the parameter type signatures from the given method signature. The method signature is expected to be dot-based.
[中]从给定的方法签名中提取参数类型签名。方法签名预计是基于点的。
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
private char[][] getParameterPackages(char[] methodSignature) {
char[][] parameterQualifiedTypes = Signature.getParameterTypes(methodSignature);
int length = parameterQualifiedTypes == null ? 0 : parameterQualifiedTypes.length;
char[][] parameterPackages = new char[length][];
for(int i = 0; i < length; i++) {
parameterPackages[i] = Signature.getSignatureQualifier(parameterQualifiedTypes[i]);
}
return parameterPackages;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
private char[][] getParameterTypes(char[] methodSignature) {
char[][] parameterQualifiedTypes = Signature.getParameterTypes(methodSignature);
int length = parameterQualifiedTypes == null ? 0 : parameterQualifiedTypes.length;
char[][] parameterPackages = new char[length][];
for(int i = 0; i < length; i++) {
parameterPackages[i] = Signature.getSignatureSimpleName(parameterQualifiedTypes[i]);
}
return parameterPackages;
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
private char[][] getParameterPackages(char[] methodSignature) {
char[][] parameterQualifiedTypes = Signature.getParameterTypes(methodSignature);
int length = parameterQualifiedTypes == null ? 0 : parameterQualifiedTypes.length;
char[][] parameterPackages = new char[length][];
for(int i = 0; i < length; i++) {
parameterPackages[i] = Signature.getSignatureQualifier(parameterQualifiedTypes[i]);
}
return parameterPackages;
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
private char[][] getParameterPackages(char[] methodSignature) {
char[][] parameterQualifiedTypes = Signature.getParameterTypes(methodSignature);
int length = parameterQualifiedTypes == null ? 0 : parameterQualifiedTypes.length;
char[][] parameterPackages = new char[length][];
for(int i = 0; i < length; i++) {
parameterPackages[i] = Signature.getSignatureQualifier(parameterQualifiedTypes[i]);
}
return parameterPackages;
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
private char[][] getParameterPackages(char[] methodSignature) {
char[][] parameterQualifiedTypes = Signature.getParameterTypes(methodSignature);
int length = parameterQualifiedTypes == null ? 0 : parameterQualifiedTypes.length;
char[][] parameterPackages = new char[length][];
for(int i = 0; i < length; i++) {
parameterPackages[i] = Signature.getSignatureQualifier(parameterQualifiedTypes[i]);
}
return parameterPackages;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
private char[][] getParameterTypes(char[] methodSignature) {
char[][] parameterQualifiedTypes = Signature.getParameterTypes(methodSignature);
int length = parameterQualifiedTypes == null ? 0 : parameterQualifiedTypes.length;
char[][] parameterPackages = new char[length][];
for(int i = 0; i < length; i++) {
parameterPackages[i] = Signature.getSignatureSimpleName(parameterQualifiedTypes[i]);
}
return parameterPackages;
}
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public void consumeMethod(char[] selector, char[] signature) {
if (!(this.element instanceof IType)) return;
String[] parameterTypes = Signature.getParameterTypes(new String(signature));
IType type = (IType) this.element;
IMethod method = type.getMethod(new String(selector), parameterTypes);
IMethod[] methods = type.findMethods(method);
if (methods.length > 0)
this.element = methods[0];
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
public void consumeMethod(char[] selector, char[] signature) {
if (!(this.element instanceof IType)) return;
String[] parameterTypes = Signature.getParameterTypes(new String(signature));
IType type = (IType) this.element;
IMethod method = type.getMethod(new String(selector), parameterTypes);
IMethod[] methods = type.findMethods(method);
if (methods.length > 0)
this.element = methods[0];
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public void consumeMethod(char[] selector, char[] signature) {
if (!(this.element instanceof IType)) return;
String[] parameterTypes = Signature.getParameterTypes(new String(signature));
IType type = (IType) this.element;
IMethod method = type.getMethod(new String(selector), parameterTypes);
IMethod[] methods = type.findMethods(method);
if (methods.length > 0)
this.element = methods[0];
}
代码示例来源:origin: org.eclipse.recommenders.completion/rcp
private static String[] computeParamTypes(CompletionProposal proposal) {
// parameter types do not contain any ; and don't start with L:
String[] paramTypes = Signature.getParameterTypes(String.valueOf(proposal.getSignature()));
for (int index = 0; index < paramTypes.length; index++)
paramTypes[index] = Signature.toString(paramTypes[index]);
return paramTypes;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
private boolean checkParameters(char[] methodDescriptor, char[][] parameterSimpleNames, char[][] parameterQualifications, boolean isCaseSensitive, boolean isCamelCase) {
char[][] arguments = Signature.getParameterTypes(methodDescriptor);
int parameterCount = parameterSimpleNames.length;
if (parameterCount != arguments.length) return false;
for (int i = 0; i < parameterCount; i++)
if (!checkTypeName(parameterSimpleNames[i], parameterQualifications[i], Signature.toCharArray(arguments[i]), isCaseSensitive, isCamelCase))
return false;
return true;
}
private boolean checkStandardAnnotations(long annotationTagBits, TypeReferencePattern pattern) {
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
private boolean checkParameters(char[] methodDescriptor, char[][] parameterSimpleNames, char[][] parameterQualifications, boolean isCaseSensitive, boolean isCamelCase) {
char[][] arguments = Signature.getParameterTypes(methodDescriptor);
int parameterCount = parameterSimpleNames.length;
if (parameterCount != arguments.length) return false;
for (int i = 0; i < parameterCount; i++)
if (!checkTypeName(parameterSimpleNames[i], parameterQualifications[i], Signature.toCharArray(arguments[i]), isCaseSensitive, isCamelCase))
return false;
return true;
}
private boolean checkStandardAnnotations(long annotationTagBits, TypeReferencePattern pattern) {
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
private boolean checkParameters(char[] methodDescriptor, char[][] parameterSimpleNames, char[][] parameterQualifications, boolean isCaseSensitive, boolean isCamelCase) {
char[][] arguments = Signature.getParameterTypes(methodDescriptor);
int parameterCount = parameterSimpleNames.length;
if (parameterCount != arguments.length) return false;
for (int i = 0; i < parameterCount; i++)
if (!checkTypeName(parameterSimpleNames[i], parameterQualifications[i], Signature.toCharArray(arguments[i]), isCaseSensitive, isCamelCase))
return false;
return true;
}
private boolean checkStandardAnnotations(long annotationTagBits, TypeReferencePattern pattern) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
private boolean checkParameters(char[] methodDescriptor, char[][] parameterSimpleNames, char[][] parameterQualifications, boolean isCaseSensitive, boolean isCamelCase) {
char[][] arguments = Signature.getParameterTypes(methodDescriptor);
int parameterCount = parameterSimpleNames.length;
if (parameterCount != arguments.length) return false;
for (int i = 0; i < parameterCount; i++)
if (!checkTypeName(parameterSimpleNames[i], parameterQualifications[i], Signature.toCharArray(arguments[i]), isCaseSensitive, isCamelCase))
return false;
return true;
}
private boolean checkStandardAnnotations(long annotationTagBits, TypeReferencePattern pattern) {
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
private boolean checkParameters(char[] methodDescriptor, char[][] parameterSimpleNames, char[][] parameterQualifications, boolean isCaseSensitive, boolean isCamelCase) {
char[][] arguments = Signature.getParameterTypes(methodDescriptor);
int parameterCount = parameterSimpleNames.length;
if (parameterCount != arguments.length) return false;
for (int i = 0; i < parameterCount; i++)
if (!checkTypeName(parameterSimpleNames[i], parameterQualifications[i], Signature.toCharArray(arguments[i]), isCaseSensitive, isCamelCase))
return false;
return true;
}
private boolean checkStandardAnnotations(long annotationTagBits, TypeReferencePattern pattern) {
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
private boolean checkParameters(char[] methodDescriptor, char[][] parameterSimpleNames, char[][] parameterQualifications, boolean isCaseSensitive, boolean isCamelCase) {
char[][] arguments = Signature.getParameterTypes(methodDescriptor);
int parameterCount = parameterSimpleNames.length;
if (parameterCount != arguments.length) return false;
for (int i = 0; i < parameterCount; i++)
if (!checkTypeName(parameterSimpleNames[i], parameterQualifications[i], Signature.toCharArray(arguments[i]), isCaseSensitive, isCamelCase))
return false;
return true;
}
private boolean checkStandardAnnotations(long annotationTagBits, TypeReferencePattern pattern) {
代码示例来源:origin: eclipse/eclipse.jdt.ls
private IJavaElement[][] getAssignableElements(CompletionProposal proposal) {
char[] signature = SignatureUtil.fix83600(proposal.getSignature());
char[][] types = Signature.getParameterTypes(signature);
IJavaElement[][] assignableElements = new IJavaElement[types.length][];
for (int i = 0; i < types.length; i++) {
assignableElements[i] = context.getVisibleElements(new String(types[i]));
}
return assignableElements;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
private String[] getParameterTypes() {
char[] signature= SignatureUtil.fix83600(fProposal.getSignature());
char[][] types= Signature.getParameterTypes(signature);
String[] ret= new String[types.length];
for (int i= 0; i < types.length; i++) {
ret[i]= new String(Signature.toCharArray(types[i]));
}
return ret;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
private String[] getParameterTypes() {
char[] signature= SignatureUtil.fix83600(fProposal.getSignature());
char[][] types= Signature.getParameterTypes(signature);
String[] ret= new String[types.length];
for (int i= 0; i < types.length; i++) {
ret[i]= new String(Signature.toCharArray(types[i]));
}
return ret;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
private IJavaElement[][] getAssignableElements() {
char[] signature= SignatureUtil.fix83600(getProposal().getSignature());
char[][] types= Signature.getParameterTypes(signature);
IJavaElement[][] assignableElements= new IJavaElement[types.length][];
for (int i= 0; i < types.length; i++) {
assignableElements[i]= fCoreContext.getVisibleElements(new String(types[i]));
}
return assignableElements;
}
内容来源于网络,如有侵权,请联系作者删除!