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

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

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

Signature.getSimpleNames介绍

[英]Returns all segments of the given dot-separated qualified name. Returns an array with only the given name if it is not qualified. Returns an empty array if the name is empty.

For example:

getSimpleNames("java.lang.Object") -> {"java", "lang", "Object"} 
getSimpleNames("Object") -> {"Object"} 
getSimpleNames("") -> {} 
getSimpleNames("java.util.List<java.lang.String>") -> 
{"java", "util", "List<java.lang.String>"}

[中]返回给定以点分隔的限定名称的所有段。如果数组不合格,则返回仅包含给定名称的数组。如果名称为空,则返回空数组。
例如:

getSimpleNames("java.lang.Object") -> {"java", "lang", "Object"} 
getSimpleNames("Object") -> {"Object"} 
getSimpleNames("") -> {} 
getSimpleNames("java.util.List<java.lang.String>") -> 
{"java", "util", "List<java.lang.String>"}

代码示例

代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps

/**
 * Returns a trimmed version the simples names returned by Signature.
 */
public static String[] getTrimmedSimpleNames(String name) {
  String[] result = Signature.getSimpleNames(name);
  for (int i = 0, length = result.length; i < length; i++) {
    result[i] = result[i].trim();
  }
  return result;
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

/**
 * Returns a trimmed version the simples names returned by Signature.
 */
public static String[] getTrimmedSimpleNames(String name) {
  String[] result = Signature.getSimpleNames(name);
  for (int i = 0, length = result.length; i < length; i++) {
    result[i] = result[i].trim();
  }
  return result;
}

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

/**
 * Returns a trimmed version the simples names returned by Signature.
 */
public static String[] getTrimmedSimpleNames(String name) {
  String[] result = Signature.getSimpleNames(name);
  for (int i = 0, length = result.length; i < length; i++) {
    result[i] = result[i].trim();
  }
  return result;
}

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

/**
 * Returns a trimmed version the simples names returned by Signature.
 */
public static String[] getTrimmedSimpleNames(String name) {
  String[] result = Signature.getSimpleNames(name);
  for (int i = 0, length = result.length; i < length; i++) {
    result[i] = result[i].trim();
  }
  return result;
}

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

/**
 * Returns a trimmed version the simples names returned by Signature.
 */
public static String[] getTrimmedSimpleNames(String name) {
  String[] result = Signature.getSimpleNames(name);
  for (int i = 0, length = result.length; i < length; i++) {
    result[i] = result[i].trim();
  }
  return result;
}

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

/**
 * Returns a trimmed version the simples names returned by Signature.
 */
public static String[] getTrimmedSimpleNames(String name) {
  String[] result = Signature.getSimpleNames(name);
  for (int i = 0, length = result.length; i < length; i++) {
    result[i] = result[i].trim();
  }
  return result;
}

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

/**
 * Returns a trimmed version the simples names returned by Signature.
 */
public static String[] getTrimmedSimpleNames(String name) {
  String[] result = Signature.getSimpleNames(name);
  for (int i = 0, length = result.length; i < length; i++) {
    result[i] = result[i].trim();
  }
  return result;
}

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

/**
 * Returns all segments of the given dot-separated qualified name.
 * Returns an array with only the given name if it is not qualified.
 * Returns an empty array if the name is empty.
 * <p>
 * For example:
 * <pre>
 * <code>
 * getSimpleNames("java.lang.Object") -&gt; {"java", "lang", "Object"}
 * getSimpleNames("Object") -&gt; {"Object"}
 * getSimpleNames("") -&gt; {}
 * getSimpleNames("java.util.List&lt;java.lang.String&gt;") -&gt;
 *   {"java", "util", "List&lt;java.lang.String&gt;"}
 * </code>
 * </pre>
 *
 * @param name the name
 * @return the list of simple names, possibly empty
 * @exception NullPointerException if name is null
 */
public static String[] getSimpleNames(String name) {
  return CharOperation.toStrings(getSimpleNames(name.toCharArray()));
}

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

/**
 * Returns all segments of the given dot-separated qualified name.
 * Returns an array with only the given name if it is not qualified.
 * Returns an empty array if the name is empty.
 * <p>
 * For example:
 * <pre>
 * <code>
 * getSimpleNames("java.lang.Object") -&gt; {"java", "lang", "Object"}
 * getSimpleNames("Object") -&gt; {"Object"}
 * getSimpleNames("") -&gt; {}
 * getSimpleNames("java.util.List&lt;java.lang.String&gt;") -&gt;
 *   {"java", "util", "List&lt;java.lang.String&gt;"}
 * </code>
 * </pre>
 *
 * @param name the name
 * @return the list of simple names, possibly empty
 * @exception NullPointerException if name is null
 */
public static String[] getSimpleNames(String name) {
  return CharOperation.toStrings(getSimpleNames(name.toCharArray()));
}

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

/**
 * Returns all segments of the given dot-separated qualified name.
 * Returns an array with only the given name if it is not qualified.
 * Returns an empty array if the name is empty.
 * <p>
 * For example:
 * <pre>
 * <code>
 * getSimpleNames("java.lang.Object") -&gt; {"java", "lang", "Object"}
 * getSimpleNames("Object") -&gt; {"Object"}
 * getSimpleNames("") -&gt; {}
 * getSimpleNames("java.util.List&lt;java.lang.String&gt;") -&gt;
 *   {"java", "util", "List&lt;java.lang.String&gt;"}
 * </code>
 * </pre>
 *
 * @param name the name
 * @return the list of simple names, possibly empty
 * @exception NullPointerException if name is null
 */
public static String[] getSimpleNames(String name) {
  return CharOperation.toStrings(getSimpleNames(name.toCharArray()));
}

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

/**
 * Returns all segments of the given dot-separated qualified name.
 * Returns an array with only the given name if it is not qualified.
 * Returns an empty array if the name is empty.
 * <p>
 * For example:
 * <pre>
 * <code>
 * getSimpleNames("java.lang.Object") -&gt; {"java", "lang", "Object"}
 * getSimpleNames("Object") -&gt; {"Object"}
 * getSimpleNames("") -&gt; {}
 * getSimpleNames("java.util.List&lt;java.lang.String&gt;") -&gt;
 *   {"java", "util", "List&lt;java.lang.String&gt;"}
 * </code>
 * </pre>
 *
 * @param name the name
 * @return the list of simple names, possibly empty
 * @exception NullPointerException if name is null
 */
public static String[] getSimpleNames(String name) {
  return CharOperation.toStrings(getSimpleNames(name.toCharArray()));
}

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

/**
 * Returns all segments of the given dot-separated qualified name.
 * Returns an array with only the given name if it is not qualified.
 * Returns an empty array if the name is empty.
 * <p>
 * For example:
 * <pre>
 * <code>
 * getSimpleNames("java.lang.Object") -&gt; {"java", "lang", "Object"}
 * getSimpleNames("Object") -&gt; {"Object"}
 * getSimpleNames("") -&gt; {}
 * getSimpleNames("java.util.List&lt;java.lang.String&gt;") -&gt;
 *   {"java", "util", "List&lt;java.lang.String&gt;"}
 * </code>
 * </pre>
 *
 * @param name the name
 * @return the list of simple names, possibly empty
 * @exception NullPointerException if name is null
 */
public static String[] getSimpleNames(String name) {
  return CharOperation.toStrings(getSimpleNames(name.toCharArray()));
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

/**
 * Returns all segments of the given dot-separated qualified name.
 * Returns an array with only the given name if it is not qualified.
 * Returns an empty array if the name is empty.
 * <p>
 * For example:
 * <pre>
 * <code>
 * getSimpleNames("java.lang.Object") -&gt; {"java", "lang", "Object"}
 * getSimpleNames("Object") -&gt; {"Object"}
 * getSimpleNames("") -&gt; {}
 * getSimpleNames("java.util.List&lt;java.lang.String&gt;") -&gt;
 *   {"java", "util", "List&lt;java.lang.String&gt;"}
 * </code>
 * </pre>
 *
 * @param name the name
 * @return the list of simple names, possibly empty
 * @exception NullPointerException if name is null
 */
public static String[] getSimpleNames(String name) {
  return CharOperation.toStrings(getSimpleNames(name.toCharArray()));
}

相关文章