本文整理汇总了Java中org.eclipse.jdt.core.Signature.C_BOOLEAN属性的典型用法代码示例。如果您正苦于以下问题:Java Signature.C_BOOLEAN属性的具体用法?Java Signature.C_BOOLEAN怎么用?Java Signature.C_BOOLEAN使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.core.Signature
的用法示例。
在下文中一共展示了Signature.C_BOOLEAN属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: appendExpression
protected void appendExpression(String signature, boolean castNull) {
switch (signature.charAt(0)) {
case Signature.C_BOOLEAN:
fBuffer.append("false"); // $NON-NLS-1$
break;
case Signature.C_BYTE:
case Signature.C_CHAR:
case Signature.C_DOUBLE:
case Signature.C_FLOAT:
case Signature.C_INT:
case Signature.C_LONG:
case Signature.C_SHORT:
fBuffer.append("0"); // $NON-NLS-1$
break;
default:
if (castNull) {
fBuffer.append("("); // $NON-NLS-1$
fBuffer.append(Signature.toString(signature));
fBuffer.append(")"); // $NON-NLS-1$
}
fBuffer.append("null"); // $NON-NLS-1$
break;
}
}
示例2: appendTypeSignature
static void appendTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
char c = string[start];
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:
int e =
org.eclipse.jdt.internal.compiler.util.Util.scanTypeVariableSignature(string, start);
buffer.append(string, start + 1, e - start - 1);
break;
case Signature.C_BOOLEAN:
buffer.append(BOOLEAN);
break;
case Signature.C_BYTE:
buffer.append(BYTE);
break;
case Signature.C_CHAR:
buffer.append(CHAR);
break;
case Signature.C_DOUBLE:
buffer.append(DOUBLE);
break;
case Signature.C_FLOAT:
buffer.append(FLOAT);
break;
case Signature.C_INT:
buffer.append(INT);
break;
case Signature.C_LONG:
buffer.append(LONG);
break;
case Signature.C_SHORT:
buffer.append(SHORT);
break;
case Signature.C_VOID:
buffer.append(VOID);
break;
}
}
示例3: appendTypeSignatureForAnchor
private static int appendTypeSignatureForAnchor(
char[] string, int start, StringBuffer buffer, boolean isVarArgs) {
// need a minimum 1 char
if (start >= string.length) {
throw new IllegalArgumentException();
}
char c = string[start];
if (isVarArgs) {
switch (c) {
case Signature.C_ARRAY:
return appendArrayTypeSignatureForAnchor(string, start, buffer, true);
case Signature.C_RESOLVED:
case Signature.C_TYPE_VARIABLE:
case Signature.C_BOOLEAN:
case Signature.C_BYTE:
case Signature.C_CHAR:
case Signature.C_DOUBLE:
case Signature.C_FLOAT:
case Signature.C_INT:
case Signature.C_LONG:
case Signature.C_SHORT:
case Signature.C_VOID:
case Signature.C_STAR:
case Signature.C_EXTENDS:
case Signature.C_SUPER:
case Signature.C_CAPTURE:
default:
throw new IllegalArgumentException(); // a var args is an array type
}
} else {
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);
buffer.append(string, start + 1, e - start - 1);
return e;
case Signature.C_BOOLEAN:
buffer.append(BOOLEAN);
return start;
case Signature.C_BYTE:
buffer.append(BYTE);
return start;
case Signature.C_CHAR:
buffer.append(CHAR);
return start;
case Signature.C_DOUBLE:
buffer.append(DOUBLE);
return start;
case Signature.C_FLOAT:
buffer.append(FLOAT);
return start;
case Signature.C_INT:
buffer.append(INT);
return start;
case Signature.C_LONG:
buffer.append(LONG);
return start;
case Signature.C_SHORT:
buffer.append(SHORT);
return start;
case Signature.C_VOID:
buffer.append(VOID);
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();
}
}
}