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

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

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

Signature.getUnionTypeBounds介绍

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

代码示例

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

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

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

typeSignature= Signature.getTypeErasure(typeSignature);
} else if (kind == Signature.UNION_TYPE_SIGNATURE) {
  String[] typeBounds= Signature.getUnionTypeBounds(typeSignature);
  ArrayList<IType> types= new ArrayList<>();
  for (int i= 0; i < typeBounds.length; i++) {

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

break;
case Signature.UNION_TYPE_SIGNATURE:
  typeBounds= Signature.getUnionTypeBounds(typeSig);
  appendTypeBoundsSignaturesLabel(enclosingElement, typeBounds, flags, true);
  break;

相关文章