org.eclipse.jdt.internal.core.util.Util.checkTypeSignature()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(165)

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

Util.checkTypeSignature介绍

[英]Checks the type signature in String sig, starting at start and ending before end (end is not included). Returns the index of the character immediately after the signature if valid, or -1 if not valid.
[中]检查字符串sig中的类型签名,从开始到结束(不包括结束)。如果签名有效,则返回紧跟在签名之后的字符索引;如果签名无效,则返回-1。

代码示例

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

/**
 * Returns true if the given type signature is valid,
 * false if it is not.
 */
public static boolean isValidTypeSignature(String sig, boolean allowVoid) {
  int len = sig.length();
  return checkTypeSignature(sig, 0, len, allowVoid) == len;
}

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

/**
 * Returns true if the given type signature is valid,
 * false if it is not.
 */
public static boolean isValidTypeSignature(String sig, boolean allowVoid) {
  int len = sig.length();
  return checkTypeSignature(sig, 0, len, allowVoid) == len;
}

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

/**
 * Returns true if the given type signature is valid,
 * false if it is not.
 */
public static boolean isValidTypeSignature(String sig, boolean allowVoid) {
  int len = sig.length();
  return checkTypeSignature(sig, 0, len, allowVoid) == len;
}

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

/**
 * Returns true if the given type signature is valid,
 * false if it is not.
 */
public static boolean isValidTypeSignature(String sig, boolean allowVoid) {
  int len = sig.length();
  return checkTypeSignature(sig, 0, len, allowVoid) == len;
}

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

/**
 * Returns true if the given type signature is valid,
 * false if it is not.
 */
public static boolean isValidTypeSignature(String sig, boolean allowVoid) {
  int len = sig.length();
  return checkTypeSignature(sig, 0, len, allowVoid) == len;
}

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

/**
 * Returns true if the given type signature is valid,
 * false if it is not.
 */
public static boolean isValidTypeSignature(String sig, boolean allowVoid) {
  int len = sig.length();
  return checkTypeSignature(sig, 0, len, allowVoid) == len;
}

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

/**
 * Returns true if the given type signature is valid,
 * false if it is not.
 */
public static boolean isValidTypeSignature(String sig, boolean allowVoid) {
  int len = sig.length();
  return checkTypeSignature(sig, 0, len, allowVoid) == len;
}

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

/**
 * Returns true if the given method signature is valid,
 * false if it is not.
 */
public static boolean isValidMethodSignature(String sig) {
  int len = sig.length();
  if (len == 0) return false;
  int i = 0;
  char c = sig.charAt(i++);
  if (c != '(') return false;
  if (i >= len) return false;
  while (sig.charAt(i) != ')') {
    // Void is not allowed as a parameter type.
    i = checkTypeSignature(sig, i, len, false);
    if (i == -1) return false;
    if (i >= len) return false;
  }
  ++i;
  i = checkTypeSignature(sig, i, len, true);
  return i == len;
}

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

/**
 * Returns true if the given method signature is valid,
 * false if it is not.
 */
public static boolean isValidMethodSignature(String sig) {
  int len = sig.length();
  if (len == 0) return false;
  int i = 0;
  char c = sig.charAt(i++);
  if (c != '(') return false;
  if (i >= len) return false;
  while (sig.charAt(i) != ')') {
    // Void is not allowed as a parameter type.
    i = checkTypeSignature(sig, i, len, false);
    if (i == -1) return false;
    if (i >= len) return false;
  }
  ++i;
  i = checkTypeSignature(sig, i, len, true);
  return i == len;
}

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

/**
 * Returns true if the given method signature is valid,
 * false if it is not.
 */
public static boolean isValidMethodSignature(String sig) {
  int len = sig.length();
  if (len == 0) return false;
  int i = 0;
  char c = sig.charAt(i++);
  if (c != '(') return false;
  if (i >= len) return false;
  while (sig.charAt(i) != ')') {
    // Void is not allowed as a parameter type.
    i = checkTypeSignature(sig, i, len, false);
    if (i == -1) return false;
    if (i >= len) return false;
  }
  ++i;
  i = checkTypeSignature(sig, i, len, true);
  return i == len;
}

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

/**
 * Returns true if the given method signature is valid,
 * false if it is not.
 */
public static boolean isValidMethodSignature(String sig) {
  int len = sig.length();
  if (len == 0) return false;
  int i = 0;
  char c = sig.charAt(i++);
  if (c != '(') return false;
  if (i >= len) return false;
  while (sig.charAt(i) != ')') {
    // Void is not allowed as a parameter type.
    i = checkTypeSignature(sig, i, len, false);
    if (i == -1) return false;
    if (i >= len) return false;
  }
  ++i;
  i = checkTypeSignature(sig, i, len, true);
  return i == len;
}

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

/**
 * Returns true if the given method signature is valid,
 * false if it is not.
 */
public static boolean isValidMethodSignature(String sig) {
  int len = sig.length();
  if (len == 0) return false;
  int i = 0;
  char c = sig.charAt(i++);
  if (c != '(') return false;
  if (i >= len) return false;
  while (sig.charAt(i) != ')') {
    // Void is not allowed as a parameter type.
    i = checkTypeSignature(sig, i, len, false);
    if (i == -1) return false;
    if (i >= len) return false;
  }
  ++i;
  i = checkTypeSignature(sig, i, len, true);
  return i == len;
}

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

/**
 * Returns true if the given method signature is valid,
 * false if it is not.
 */
public static boolean isValidMethodSignature(String sig) {
  int len = sig.length();
  if (len == 0) return false;
  int i = 0;
  char c = sig.charAt(i++);
  if (c != '(') return false;
  if (i >= len) return false;
  while (sig.charAt(i) != ')') {
    // Void is not allowed as a parameter type.
    i = checkTypeSignature(sig, i, len, false);
    if (i == -1) return false;
    if (i >= len) return false;
  }
  ++i;
  i = checkTypeSignature(sig, i, len, true);
  return i == len;
}

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

/**
 * Returns true if the given method signature is valid,
 * false if it is not.
 */
public static boolean isValidMethodSignature(String sig) {
  int len = sig.length();
  if (len == 0) return false;
  int i = 0;
  char c = sig.charAt(i++);
  if (c != '(') return false;
  if (i >= len) return false;
  while (sig.charAt(i) != ')') {
    // Void is not allowed as a parameter type.
    i = checkTypeSignature(sig, i, len, false);
    if (i == -1) return false;
    if (i >= len) return false;
  }
  ++i;
  i = checkTypeSignature(sig, i, len, true);
  return i == len;
}

相关文章

微信公众号

最新文章

更多

Util类方法