• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ArrayTypeReference类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java FilesTooBigForDiffException类代码示例发布时间:2022-05-22
下一篇:
Java GraphDistanceFilter类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap