当前位置: 首页>>代码示例>>Java>>正文


Java Signature.SIG_VOID属性代码示例

本文整理汇总了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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:65,代码来源:RenameVirtualMethodProcessor.java


注:本文中的org.eclipse.jdt.core.Signature.SIG_VOID属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。