本文整理了Java中org.eclipse.jdt.internal.core.util.Util
类的一些代码示例,展示了Util
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util
类的具体详情如下:
包路径:org.eclipse.jdt.internal.core.util.Util
类名称:Util
[英]Provides convenient utility methods to other types in this package.
[中]为该包中的其他类型提供方便的实用程序方法。
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
/**
* Creates a new DOM factory.
*/
public DOMFactory() {
// constructor is explicitly API
this.lineSeparator = org.eclipse.jdt.internal.core.util.Util.getLineSeparator(null, null/*take the workspace line separator as no project is available*/);
}
/* (non-Javadoc)
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public void handleException(Throwable exception) {
Util.log(exception, "Exception occurred while loading annotation processor manager"); //$NON-NLS-1$
}
@Override
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
private static int appendCaptureTypeSignatureForAnchor(char[] string, int start, StringBuffer buffer) {
// need a minimum 2 char
if (start >= string.length - 1) {
throw raiseIllegalSignatureException(string, start);
}
char c = string[start];
if (c != Signature.C_CAPTURE) {
throw raiseUnexpectedCharacterException(string, start, c);
}
return appendTypeArgumentSignatureForAnchor(string, start + 1, buffer);
}
private static int appendArrayTypeSignatureForAnchor(char[] string, int start, StringBuffer buffer, boolean isVarArgs) {
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
private static void appendArrayTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
int length = string.length;
// need a minimum 2 char
if (start >= length - 1) {
throw raiseIllegalSignatureException(string, start);
}
char c = string[start];
if (c != Signature.C_ARRAY) {
throw raiseUnexpectedCharacterException(string, start, c);
}
int index = start;
c = string[++index];
while(c == Signature.C_ARRAY) {
// need a minimum 2 char
if (index >= length - 1) {
throw raiseIllegalSignatureException(string, start);
}
c = string[++index];
}
appendTypeSignature(string, index, buffer, compact);
for(int i = 0, dims = index - start; i < dims; i++) {
buffer.append('[').append(']');
}
}
private static void appendClassTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
private static int appendTypeSignatureForAnchor(char[] string, int start, StringBuffer buffer, boolean isVarArgs) {
throw raiseIllegalSignatureException(string, start);
switch (c) {
case Signature.C_ARRAY :
return appendArrayTypeSignatureForAnchor(string, start, buffer, true);
case Signature.C_RESOLVED :
case Signature.C_TYPE_VARIABLE :
default:
throw raiseUnexpectedCharacterException(string, start, c);
return appendArrayTypeSignatureForAnchor(string, start, buffer, false);
case Signature.C_RESOLVED :
return appendClassTypeSignatureForAnchor(string, start, buffer);
case Signature.C_TYPE_VARIABLE :
int e = org.eclipse.jdt.internal.compiler.util.Util.scanTypeVariableSignature(string, start);
return start;
case Signature.C_CAPTURE :
return appendCaptureTypeSignatureForAnchor(string, start, buffer);
case Signature.C_STAR:
case Signature.C_EXTENDS:
case Signature.C_SUPER:
return appendTypeArgumentSignatureForAnchor(string, start, buffer);
default :
throw raiseIllegalSignatureException(string, start);
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
switch (c) {
case Signature.C_ARRAY :
return appendArrayTypeSignatureForAnchor(string, start, buffer, true);
case Signature.C_RESOLVED :
case Signature.C_TYPE_VARIABLE :
switch (c) {
case Signature.C_ARRAY :
return appendArrayTypeSignatureForAnchor(string, start, buffer, false);
case Signature.C_RESOLVED :
return appendClassTypeSignatureForAnchor(string, start, buffer);
case Signature.C_TYPE_VARIABLE :
int e = org.eclipse.jdt.internal.compiler.util.Util.scanTypeVariableSignature(string, start);
return start;
case Signature.C_CAPTURE :
return appendCaptureTypeSignatureForAnchor(string, start, buffer);
case Signature.C_STAR:
case Signature.C_EXTENDS:
case Signature.C_SUPER:
return appendTypeArgumentSignatureForAnchor(string, start, buffer);
default :
throw new IllegalArgumentException();
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
protected boolean isExcluded(IResource resource) {
if (this.exclusionPatterns != null || this.inclusionPatterns != null)
if (this.sourceFolder.equals(this.binaryFolder))
return Util.isExcluded(resource, this.inclusionPatterns, this.exclusionPatterns);
return false;
}
@Override
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
switch (c) {
case Signature.C_ARRAY :
appendArrayTypeSignature(string, start, buffer, compact);
break;
case Signature.C_RESOLVED :
appendClassTypeSignature(string, start, buffer, compact);
break;
case Signature.C_TYPE_VARIABLE :
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
private static void appendArrayTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
int length = string.length;
// need a minimum 2 char
if (start >= length - 1) {
throw new IllegalArgumentException();
}
char c = string[start];
if (c != Signature.C_ARRAY) {
throw new IllegalArgumentException();
}
int index = start;
c = string[++index];
while(c == Signature.C_ARRAY) {
// need a minimum 2 char
if (index >= length - 1) {
throw new IllegalArgumentException();
}
c = string[++index];
}
appendTypeSignature(string, index, buffer, compact);
for(int i = 0, dims = index - start; i < dims; i++) {
buffer.append('[').append(']');
}
}
private static void appendClassTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
private static int appendCaptureTypeSignatureForAnchor(char[] string, int start, StringBuffer buffer) {
// need a minimum 2 char
if (start >= string.length - 1) {
throw new IllegalArgumentException();
}
char c = string[start];
if (c != Signature.C_CAPTURE) {
throw new IllegalArgumentException();
}
return appendTypeArgumentSignatureForAnchor(string, start + 1, buffer);
}
private static int appendArrayTypeSignatureForAnchor(char[] string, int start, StringBuffer buffer, boolean isVarArgs) {
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
private static int appendTypeSignatureForAnchor(char[] string, int start, StringBuffer buffer, boolean isVarArgs) {
throw raiseIllegalSignatureException(string, start);
switch (c) {
case Signature.C_ARRAY :
return appendArrayTypeSignatureForAnchor(string, start, buffer, true);
case Signature.C_RESOLVED :
case Signature.C_TYPE_VARIABLE :
default:
throw raiseUnexpectedCharacterException(string, start, c);
return appendArrayTypeSignatureForAnchor(string, start, buffer, false);
case Signature.C_RESOLVED :
return appendClassTypeSignatureForAnchor(string, start, buffer);
case Signature.C_TYPE_VARIABLE :
int e = org.eclipse.jdt.internal.compiler.util.Util.scanTypeVariableSignature(string, start);
return start;
case Signature.C_CAPTURE :
return appendCaptureTypeSignatureForAnchor(string, start, buffer);
case Signature.C_STAR:
case Signature.C_EXTENDS:
case Signature.C_SUPER:
return appendTypeArgumentSignatureForAnchor(string, start, buffer);
default :
throw raiseIllegalSignatureException(string, start);
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
switch (c) {
case Signature.C_ARRAY :
return appendArrayTypeSignatureForAnchor(string, start, buffer, true);
case Signature.C_RESOLVED :
case Signature.C_TYPE_VARIABLE :
switch (c) {
case Signature.C_ARRAY :
return appendArrayTypeSignatureForAnchor(string, start, buffer, false);
case Signature.C_RESOLVED :
return appendClassTypeSignatureForAnchor(string, start, buffer);
case Signature.C_TYPE_VARIABLE :
int e = org.eclipse.jdt.internal.compiler.util.Util.scanTypeVariableSignature(string, start);
return start;
case Signature.C_CAPTURE :
return appendCaptureTypeSignatureForAnchor(string, start, buffer);
case Signature.C_STAR:
case Signature.C_EXTENDS:
case Signature.C_SUPER:
return appendTypeArgumentSignatureForAnchor(string, start, buffer);
default :
throw new IllegalArgumentException();
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
protected boolean isExcluded(IResource resource) {
if (this.exclusionPatterns != null || this.inclusionPatterns != null)
if (this.sourceFolder.equals(this.binaryFolder))
return Util.isExcluded(resource, this.inclusionPatterns, this.exclusionPatterns);
return false;
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
switch (c) {
case Signature.C_ARRAY :
appendArrayTypeSignature(string, start, buffer, compact);
break;
case Signature.C_RESOLVED :
appendClassTypeSignature(string, start, buffer, compact);
break;
case Signature.C_TYPE_VARIABLE :
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
private static void appendArrayTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
int length = string.length;
// need a minimum 2 char
if (start >= length - 1) {
throw raiseIllegalSignatureException(string, start);
}
char c = string[start];
if (c != Signature.C_ARRAY) {
throw raiseUnexpectedCharacterException(string, start, c);
}
int index = start;
c = string[++index];
while(c == Signature.C_ARRAY) {
// need a minimum 2 char
if (index >= length - 1) {
throw raiseIllegalSignatureException(string, start);
}
c = string[++index];
}
appendTypeSignature(string, index, buffer, compact);
for(int i = 0, dims = index - start; i < dims; i++) {
buffer.append('[').append(']');
}
}
private static void appendClassTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
private static void appendArrayTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
int length = string.length;
// need a minimum 2 char
if (start >= length - 1) {
throw new IllegalArgumentException();
}
char c = string[start];
if (c != Signature.C_ARRAY) {
throw new IllegalArgumentException();
}
int index = start;
c = string[++index];
while(c == Signature.C_ARRAY) {
// need a minimum 2 char
if (index >= length - 1) {
throw new IllegalArgumentException();
}
c = string[++index];
}
appendTypeSignature(string, index, buffer, compact);
for(int i = 0, dims = index - start; i < dims; i++) {
buffer.append('[').append(']');
}
}
private static void appendClassTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
private static int appendCaptureTypeSignatureForAnchor(char[] string, int start, StringBuffer buffer) {
// need a minimum 2 char
if (start >= string.length - 1) {
throw new IllegalArgumentException();
}
char c = string[start];
if (c != Signature.C_CAPTURE) {
throw new IllegalArgumentException();
}
return appendTypeArgumentSignatureForAnchor(string, start + 1, buffer);
}
private static int appendArrayTypeSignatureForAnchor(char[] string, int start, StringBuffer buffer, boolean isVarArgs) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
private static int appendTypeSignatureForAnchor(char[] string, int start, StringBuffer buffer, boolean isVarArgs) {
throw raiseIllegalSignatureException(string, start);
switch (c) {
case Signature.C_ARRAY :
return appendArrayTypeSignatureForAnchor(string, start, buffer, true);
case Signature.C_RESOLVED :
case Signature.C_TYPE_VARIABLE :
default:
throw raiseUnexpectedCharacterException(string, start, c);
return appendArrayTypeSignatureForAnchor(string, start, buffer, false);
case Signature.C_RESOLVED :
return appendClassTypeSignatureForAnchor(string, start, buffer);
case Signature.C_TYPE_VARIABLE :
int e = org.eclipse.jdt.internal.compiler.util.Util.scanTypeVariableSignature(string, start);
return start;
case Signature.C_CAPTURE :
return appendCaptureTypeSignatureForAnchor(string, start, buffer);
case Signature.C_STAR:
case Signature.C_EXTENDS:
case Signature.C_SUPER:
return appendTypeArgumentSignatureForAnchor(string, start, buffer);
default :
throw raiseIllegalSignatureException(string, start);
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
switch (c) {
case Signature.C_ARRAY :
return appendArrayTypeSignatureForAnchor(string, start, buffer, true);
case Signature.C_RESOLVED :
case Signature.C_TYPE_VARIABLE :
switch (c) {
case Signature.C_ARRAY :
return appendArrayTypeSignatureForAnchor(string, start, buffer, false);
case Signature.C_RESOLVED :
return appendClassTypeSignatureForAnchor(string, start, buffer);
case Signature.C_TYPE_VARIABLE :
int e = org.eclipse.jdt.internal.compiler.util.Util.scanTypeVariableSignature(string, start);
return start;
case Signature.C_CAPTURE :
return appendCaptureTypeSignatureForAnchor(string, start, buffer);
case Signature.C_STAR:
case Signature.C_EXTENDS:
case Signature.C_SUPER:
return appendTypeArgumentSignatureForAnchor(string, start, buffer);
default :
throw new IllegalArgumentException();
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
protected boolean isExcluded(IResource resource) {
if (this.exclusionPatterns != null || this.inclusionPatterns != null)
if (this.sourceFolder.equals(this.binaryFolder))
return Util.isExcluded(resource, this.inclusionPatterns, this.exclusionPatterns);
return false;
}
内容来源于网络,如有侵权,请联系作者删除!