本文整理汇总了Java中org.eclipse.jdt.core.Signature.C_DOT属性的典型用法代码示例。如果您正苦于以下问题:Java Signature.C_DOT属性的具体用法?Java Signature.C_DOT怎么用?Java Signature.C_DOT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.core.Signature
的用法示例。
在下文中一共展示了Signature.C_DOT属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: appendClassTypeSignature
private static void appendClassTypeSignature(
char[] string, int start, StringBuffer buffer, boolean compact) {
char c = string[start];
if (c != Signature.C_RESOLVED) {
return;
}
int p = start + 1;
int checkpoint = buffer.length();
while (true) {
c = string[p];
switch (c) {
case Signature.C_SEMICOLON:
// all done
return;
case Signature.C_DOT:
case '/':
// erase package prefix
if (compact) {
buffer.setLength(checkpoint);
} else {
buffer.append('.');
}
break;
case Signature.C_DOLLAR:
/**
* Convert '$' in resolved type signatures into '.'. NOTE: This assumes that the type
* signature is an inner type signature. This is true in most cases, but someone can
* define a non-inner type name containing a '$'.
*/
buffer.append('.');
break;
default:
buffer.append(c);
}
p++;
}
}
示例2: appendClassTypeSignatureForAnchor
private static int appendClassTypeSignatureForAnchor(
char[] string, int start, StringBuffer buffer) {
// need a minimum 3 chars "Lx;"
if (start >= string.length - 2) {
throw new IllegalArgumentException();
}
// must start in "L" or "Q"
char c = string[start];
if (c != Signature.C_RESOLVED && c != Signature.C_UNRESOLVED) {
throw new IllegalArgumentException();
}
int p = start + 1;
while (true) {
if (p >= string.length) {
throw new IllegalArgumentException();
}
c = string[p];
switch (c) {
case Signature.C_SEMICOLON:
// all done
return p;
case Signature.C_GENERIC_START:
int e = scanGenericEnd(string, p + 1);
// once we hit type arguments there are no more package prefixes
p = e;
break;
case Signature.C_DOT:
buffer.append('.');
break;
case '/':
buffer.append('/');
break;
case Signature.C_DOLLAR:
// once we hit "$" there are no more package prefixes
/**
* Convert '$' in resolved type signatures into '.'. NOTE: This assumes that the type
* signature is an inner type signature. This is true in most cases, but someone can
* define a non-inner type name containing a '$'.
*/
buffer.append('.');
break;
default:
buffer.append(c);
}
p++;
}
}
示例3: SourceTypeConverter
private SourceTypeConverter(int flags, ProblemReporter problemReporter) {
super(problemReporter, Signature.C_DOT);
this.flags = flags;
}