本文整理汇总了Java中org.eclipse.jdt.core.Signature.SIG_VOID属性的典型用法代码示例。如果您正苦于以下问题:Java Signature.SIG_VOID属性的具体用法?Java Signature.SIG_VOID怎么用?Java Signature.SIG_VOID使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.core.Signature
的用法示例。
在下文中一共展示了Signature.SIG_VOID属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isSpecialCase
private boolean isSpecialCase() throws CoreException {
String[] noParams = new String[0];
String[] specialNames =
new String[] {
"toString",
"toString",
"toString",
"toString",
"equals", // $NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
"equals",
"getClass",
"getClass",
"hashCode",
"notify", // $NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
"notifyAll",
"wait",
"wait",
"wait"
}; // $NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
String[][] specialParamTypes =
new String[][] {
noParams,
noParams,
noParams,
noParams,
{"QObject;"},
{"Qjava.lang.Object;"},
noParams,
noParams, // $NON-NLS-2$ //$NON-NLS-1$
noParams,
noParams,
noParams,
{Signature.SIG_LONG, Signature.SIG_INT},
{Signature.SIG_LONG},
noParams
};
String[] specialReturnTypes =
new String[] {
"QString;",
"QString;",
"Qjava.lang.String;",
"Qjava.lang.String;", // $NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
Signature.SIG_BOOLEAN,
Signature.SIG_BOOLEAN,
"QClass;",
"Qjava.lang.Class;", // $NON-NLS-2$ //$NON-NLS-1$
Signature.SIG_INT,
Signature.SIG_VOID,
Signature.SIG_VOID,
Signature.SIG_VOID,
Signature.SIG_VOID,
Signature.SIG_VOID
};
Assert.isTrue(
(specialNames.length == specialParamTypes.length)
&& (specialParamTypes.length == specialReturnTypes.length));
for (int i = 0; i < specialNames.length; i++) {
if (specialNames[i].equals(getNewElementName())
&& Checks.compareParamTypes(getMethod().getParameterTypes(), specialParamTypes[i])
&& !specialReturnTypes[i].equals(getMethod().getReturnType())) {
return true;
}
}
return false;
}