本文整理汇总了Java中org.eclipse.jdt.internal.core.JavaElement.JEM_COUNT属性的典型用法代码示例。如果您正苦于以下问题:Java JavaElement.JEM_COUNT属性的具体用法?Java JavaElement.JEM_COUNT怎么用?Java JavaElement.JEM_COUNT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.internal.core.JavaElement
的用法示例。
在下文中一共展示了JavaElement.JEM_COUNT属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: nextToken
public String nextToken() {
int start = this.index;
StringBuffer buffer = null;
switch (this.memento[this.index++]) {
case JavaElement.JEM_ESCAPE:
buffer = new StringBuffer();
buffer.append(this.memento[this.index]);
start = ++this.index;
break;
case JavaElement.JEM_COUNT:
return COUNT;
case JavaElement.JEM_JAVAPROJECT:
return JAVAPROJECT;
case JavaElement.JEM_PACKAGEFRAGMENTROOT:
return PACKAGEFRAGMENTROOT;
case JavaElement.JEM_PACKAGEFRAGMENT:
return PACKAGEFRAGMENT;
case JavaElement.JEM_FIELD:
return FIELD;
case JavaElement.JEM_METHOD:
return METHOD;
case JavaElement.JEM_INITIALIZER:
return INITIALIZER;
case JavaElement.JEM_COMPILATIONUNIT:
return COMPILATIONUNIT;
case JavaElement.JEM_CLASSFILE:
return CLASSFILE;
case JavaElement.JEM_TYPE:
return TYPE;
case JavaElement.JEM_PACKAGEDECLARATION:
return PACKAGEDECLARATION;
case JavaElement.JEM_IMPORTDECLARATION:
return IMPORTDECLARATION;
case JavaElement.JEM_LOCALVARIABLE:
return LOCALVARIABLE;
case JavaElement.JEM_TYPE_PARAMETER:
return TYPE_PARAMETER;
case JavaElement.JEM_ANNOTATION:
return ANNOTATION;
}
loop: while (this.index < this.length) {
switch (this.memento[this.index]) {
case JavaElement.JEM_ESCAPE:
if (buffer == null) buffer = new StringBuffer();
buffer.append(this.memento, start, this.index - start);
start = ++this.index;
break;
case JavaElement.JEM_COUNT:
case JavaElement.JEM_JAVAPROJECT:
case JavaElement.JEM_PACKAGEFRAGMENTROOT:
case JavaElement.JEM_PACKAGEFRAGMENT:
case JavaElement.JEM_FIELD:
case JavaElement.JEM_METHOD:
case JavaElement.JEM_INITIALIZER:
case JavaElement.JEM_COMPILATIONUNIT:
case JavaElement.JEM_CLASSFILE:
case JavaElement.JEM_TYPE:
case JavaElement.JEM_PACKAGEDECLARATION:
case JavaElement.JEM_IMPORTDECLARATION:
case JavaElement.JEM_LOCALVARIABLE:
case JavaElement.JEM_TYPE_PARAMETER:
case JavaElement.JEM_ANNOTATION:
break loop;
}
this.index++;
}
if (buffer != null) {
buffer.append(this.memento, start, this.index - start);
return buffer.toString();
} else {
return new String(this.memento, start, this.index - start);
}
}