org.eclipse.jdt.core.Signature.getIntersectionTypeBounds()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(89)

本文整理了Java中org.eclipse.jdt.core.Signature.getIntersectionTypeBounds()方法的一些代码示例,展示了Signature.getIntersectionTypeBounds()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Signature.getIntersectionTypeBounds()方法的具体详情如下:
包路径:org.eclipse.jdt.core.Signature
类名称:Signature
方法名:getIntersectionTypeBounds

Signature.getIntersectionTypeBounds介绍

[英]Extracts the type bounds' signatures from the given intersection type signature. Returns an empty array if the type signature is not an intersection type signature.
[中]从给定的交集类型签名中提取类型边界的签名。如果类型签名不是交集类型签名,则返回空数组。

代码示例

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

/**
 * Extracts the type bounds' signatures from the given intersection type signature.
 * Returns an empty array if the type signature is not an intersection type signature.
 *
 * @param intersectionTypeSignature the intersection type signature
 * @return the signatures of the type bounds
 * @exception IllegalArgumentException if the signature is syntactically incorrect
 *
 * @since 3.7.1
 */
public static String[] getIntersectionTypeBounds(String intersectionTypeSignature) throws IllegalArgumentException {
  char[][] args = getIntersectionTypeBounds(intersectionTypeSignature.toCharArray());
  return CharOperation.toStrings(args);
}
/**

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Extracts the type bounds' signatures from the given intersection type signature.
 * Returns an empty array if the type signature is not an intersection type signature.
 *
 * @param intersectionTypeSignature the intersection type signature
 * @return the signatures of the type bounds
 * @exception IllegalArgumentException if the signature is syntactically incorrect
 *
 * @since 3.7.1
 */
public static String[] getIntersectionTypeBounds(String intersectionTypeSignature) throws IllegalArgumentException {
  char[][] args = getIntersectionTypeBounds(intersectionTypeSignature.toCharArray());
  return CharOperation.toStrings(args);
}
/**

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * Extracts the type bounds' signatures from the given intersection type signature.
 * Returns an empty array if the type signature is not an intersection type signature.
 *
 * @param intersectionTypeSignature the intersection type signature
 * @return the signatures of the type bounds
 * @exception IllegalArgumentException if the signature is syntactically incorrect
 *
 * @since 3.7.1
 */
public static String[] getIntersectionTypeBounds(String intersectionTypeSignature) throws IllegalArgumentException {
  char[][] args = getIntersectionTypeBounds(intersectionTypeSignature.toCharArray());
  return CharOperation.toStrings(args);
}
/**

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

/**
 * Extracts the type bounds' signatures from the given intersection type signature.
 * Returns an empty array if the type signature is not an intersection type signature.
 *
 * @param intersectionTypeSignature the intersection type signature
 * @return the signatures of the type bounds
 * @exception IllegalArgumentException if the signature is syntactically incorrect
 *
 * @since 3.7.1
 */
public static String[] getIntersectionTypeBounds(String intersectionTypeSignature) throws IllegalArgumentException {
  char[][] args = getIntersectionTypeBounds(intersectionTypeSignature.toCharArray());
  return CharOperation.toStrings(args);
}
/**

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Extracts the type bounds' signatures from the given intersection type signature.
 * Returns an empty array if the type signature is not an intersection type signature.
 *
 * @param intersectionTypeSignature the intersection type signature
 * @return the signatures of the type bounds
 * @exception IllegalArgumentException if the signature is syntactically incorrect
 *
 * @since 3.7.1
 */
public static String[] getIntersectionTypeBounds(String intersectionTypeSignature) throws IllegalArgumentException {
  char[][] args = getIntersectionTypeBounds(intersectionTypeSignature.toCharArray());
  return CharOperation.toStrings(args);
}
/**

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
protected void addHyperlinks(List<IHyperlink> hyperlinksCollector, IRegion wordRegion, SelectionDispatchAction openAction, IJavaElement element, boolean qualify, JavaEditor editor) {
  try {
    if (element.getElementType() == IJavaElement.FIELD || element.getElementType() == IJavaElement.LOCAL_VARIABLE) {
      String typeSignature= getTypeSignature(element);
      if (!JavaModelUtil.isPrimitive(typeSignature) && SelectionConverter.canOperateOn(editor)) {
        if (Signature.getTypeSignatureKind(typeSignature) == Signature.INTERSECTION_TYPE_SIGNATURE) {
          String[] bounds= Signature.getIntersectionTypeBounds(typeSignature);
          qualify|= bounds.length >= 2;
          for (int i= 0; i < bounds.length; i++) {
            hyperlinksCollector.add(new JavaElementDeclaredTypeHyperlink(wordRegion, openAction, element, bounds[i], qualify));
          }
        } else {
          hyperlinksCollector.add(new JavaElementDeclaredTypeHyperlink(wordRegion, openAction, element, qualify));
        }
      }
    }
  } catch (JavaModelException e) {
    JavaPlugin.log(e);
  }
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
protected void addHyperlinks(List<IHyperlink> hyperlinksCollector, IRegion wordRegion, SelectionDispatchAction openAction, IJavaElement element, boolean qualify, JavaEditor editor) {
  try {
    if (element.getElementType() == IJavaElement.FIELD || element.getElementType() == IJavaElement.LOCAL_VARIABLE) {
      String typeSignature= getTypeSignature(element);
      if (!JavaModelUtil.isPrimitive(typeSignature) && SelectionConverter.canOperateOn(editor)) {
        if (Signature.getTypeSignatureKind(typeSignature) == Signature.INTERSECTION_TYPE_SIGNATURE) {
          String[] bounds= Signature.getIntersectionTypeBounds(typeSignature);
          qualify|= bounds.length >= 2;
          for (int i= 0; i < bounds.length; i++) {
            hyperlinksCollector.add(new JavaElementDeclaredTypeHyperlink(wordRegion, openAction, element, bounds[i], qualify));
          }
        } else {
          hyperlinksCollector.add(new JavaElementDeclaredTypeHyperlink(wordRegion, openAction, element, qualify));
        }
      }
    }
  } catch (JavaModelException e) {
    JavaPlugin.log(e);
  }
}

代码示例来源:origin: eclipse/eclipse.jdt.ls

break;
case Signature.INTERSECTION_TYPE_SIGNATURE:
  String[] typeBounds= Signature.getIntersectionTypeBounds(typeSig);
  appendTypeBoundsSignaturesLabel(enclosingElement, typeBounds, flags);
  break;

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

break;
case Signature.INTERSECTION_TYPE_SIGNATURE:
  String[] typeBounds= Signature.getIntersectionTypeBounds(typeSig);
  appendTypeBoundsSignaturesLabel(enclosingElement, typeBounds, flags);
  break;

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core.manipulation

break;
case Signature.INTERSECTION_TYPE_SIGNATURE:
  String[] typeBounds= Signature.getIntersectionTypeBounds(typeSig);
  appendTypeBoundsSignaturesLabel(enclosingElement, typeBounds, flags, false);
  break;

相关文章