本文整理汇总了Java中org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference类的典型用法代码示例。如果您正苦于以下问题:Java ArrayTypeReference类的具体用法?Java ArrayTypeReference怎么用?Java ArrayTypeReference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ArrayTypeReference类属于org.eclipse.jdt.internal.compiler.ast包,在下文中一共展示了ArrayTypeReference类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: visit
import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference; //导入依赖的package包/类
/**
* @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
public boolean visit(
ArrayTypeReference arrayTypeReference,
BlockScope scope) {
final int numberOfParens = (arrayTypeReference.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
if (numberOfParens > 0) {
manageOpeningParenthesizedExpression(arrayTypeReference, numberOfParens);
}
if (arrayTypeReference.annotations != null) {
formatInlineAnnotations(arrayTypeReference.annotations[0], false);
}
this.scribe.printNextToken(SINGLETYPEREFERENCE_EXPECTEDTOKENS);
int dimensions = getDimensions();
if (dimensions != 0) {
formatDimensions(arrayTypeReference, 0, dimensions);
}
if (numberOfParens > 0) {
manageClosingParenthesizedExpression(arrayTypeReference, numberOfParens);
}
return false;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:26,代码来源:CodeFormatterVisitor.java
示例2: updateOnOpeningBrace
import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference; //导入依赖的package包/类
public RecoveredElement updateOnOpeningBrace(int braceStart, int braceEnd){
if (this.fieldDeclaration.declarationSourceEnd == 0) {
if (this.fieldDeclaration.type instanceof ArrayTypeReference || this.fieldDeclaration.type instanceof ArrayQualifiedTypeReference) {
if (!this.alreadyCompletedFieldInitialization) {
this.bracketBalance++;
return null; // no update is necessary (array initializer)
}
} else { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=308980
// in case an initializer bracket is opened in a non-array field
// e.g. int field = {..
this.bracketBalance++;
return null; // no update is necessary (array initializer)
}
}
if (this.fieldDeclaration.declarationSourceEnd == 0
&& this.fieldDeclaration.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT){
this.bracketBalance++;
return null; // no update is necessary (enum constant)
}
// might be an array initializer
this.updateSourceEndIfNecessary(braceStart - 1, braceEnd - 1);
return this.parent.updateOnOpeningBrace(braceStart, braceEnd);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:24,代码来源:RecoveredField.java
示例3: visitAny
import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference; //导入依赖的package包/类
@Override public void visitAny(ASTNode node) {
Collection<ComponentField> fields = findFields(node);
for (ComponentField f : fields) {
String skipListKey = node.getClass().getSimpleName() + "/" + f.field.getName();
if (propertySkipList.contains(skipListKey)) continue;
Object value;
if (node instanceof ConditionalExpression) ((ConditionalExpression)node).valueIfTrue.sourceEnd = -2;
if ("originalSourceEnd".equals(f.field.getName()) && node instanceof ArrayTypeReference) {
//workaround for eclipse arbitrarily skipping this field and setting it.
value = -2;
} else {
value = readField(f.field, node);
}
if (value == null) {
continue;
}
if (propertyIfValueSkipList.get(skipListKey).contains(value)) continue;
boolean trackRef = true;
for (ReferenceTrackingSkip skip : referenceTrackingSkipList) {
if (skip.getParent() != null && !skip.getParent().isInstance(node)) continue;
if (skip.getType() != null && !skip.getType().isInstance(value)) continue;
trackRef = false;
break;
}
f.print(printer, this, value, trackRef);
}
}
开发者ID:evant,项目名称:android-retrolambda-lombok,代码行数:32,代码来源:EcjTreePrinter.java
示例4: updateOnOpeningBrace
import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference; //导入依赖的package包/类
public RecoveredElement updateOnOpeningBrace(int braceStart, int braceEnd){
if (this.localDeclaration.declarationSourceEnd == 0
&& (this.localDeclaration.type instanceof ArrayTypeReference || this.localDeclaration.type instanceof ArrayQualifiedTypeReference)
&& !this.alreadyCompletedLocalInitialization){
this.bracketBalance++;
return null; // no update is necessary (array initializer)
}
// might be an array initializer
this.updateSourceEndIfNecessary(braceStart - 1, braceEnd - 1);
return this.parent.updateOnOpeningBrace(braceStart, braceEnd);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:12,代码来源:RecoveredLocalVariable.java
示例5: visit
import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference; //导入依赖的package包/类
/**
* @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
public boolean visit(
ArrayTypeReference arrayTypeReference,
BlockScope scope) {
final int numberOfParens = (arrayTypeReference.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
if (numberOfParens > 0) {
manageOpeningParenthesizedExpression(arrayTypeReference, numberOfParens);
}
this.scribe.printNextToken(SINGLETYPEREFERENCE_EXPECTEDTOKENS);
int dimensions = getDimensions();
if (dimensions != 0) {
if (this.preferences.insert_space_before_opening_bracket_in_array_type_reference) {
this.scribe.space();
}
for (int i = 0; i < dimensions; i++) {
this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
if (this.preferences.insert_space_between_brackets_in_array_type_reference) {
this.scribe.space();
}
this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
}
}
if (numberOfParens > 0) {
manageClosingParenthesizedExpression(arrayTypeReference, numberOfParens);
}
return false;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:32,代码来源:CodeFormatterVisitor.java
示例6: fixPositions
import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference; //导入依赖的package包/类
private void fixPositions(ArrayTypeReference node) {
node.sourceEnd = sourceEnd;
node.sourceStart = sourceStart;
node.statementEnd = sourceEnd;
node.originalSourceEnd = sourceEnd;
}
开发者ID:git03394538,项目名称:lombok-ianchiu,代码行数:7,代码来源:SetGeneratedByVisitor.java
示例7: visit
import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference; //导入依赖的package包/类
@Override public boolean visit(ArrayTypeReference node, BlockScope scope) {
fixPositions(setGeneratedBy(node, source));
return super.visit(node, scope);
}
开发者ID:git03394538,项目名称:lombok-ianchiu,代码行数:5,代码来源:SetGeneratedByVisitor.java
示例8: visit
import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference; //导入依赖的package包/类
public boolean visit(
ArrayTypeReference arrayTypeReference,
BlockScope scope) {
addRealFragment(arrayTypeReference);
return false;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:7,代码来源:BinaryExpressionFragmentBuilder.java
示例9: applyOffset
import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference; //导入依赖的package包/类
private void applyOffset(ArrayTypeReference node) {
applyOffsetExpression(node);
node.originalSourceEnd = newSourceEnd;
}
开发者ID:redundent,项目名称:lombok,代码行数:5,代码来源:SetGeneratedByVisitor.java
示例10: visit
import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference; //导入依赖的package包/类
@Override public boolean visit(ArrayTypeReference node, BlockScope scope) {
setGeneratedBy(node, source);
applyOffset(node);
return super.visit(node, scope);
}
开发者ID:redundent,项目名称:lombok,代码行数:6,代码来源:SetGeneratedByVisitor.java
注:本文中的org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论