当前位置: 首页>>代码示例>>Java>>正文


Java ArrayReference类代码示例

本文整理汇总了Java中org.eclipse.jdt.internal.compiler.ast.ArrayReference的典型用法代码示例。如果您正苦于以下问题:Java ArrayReference类的具体用法?Java ArrayReference怎么用?Java ArrayReference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ArrayReference类属于org.eclipse.jdt.internal.compiler.ast包,在下文中一共展示了ArrayReference类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

import org.eclipse.jdt.internal.compiler.ast.ArrayReference; //导入依赖的package包/类
/**
 * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.ArrayReference, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
 */
public boolean visit(ArrayReference arrayReference, BlockScope scope) {

	final int numberOfParens = (arrayReference.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
	if (numberOfParens > 0) {
		manageOpeningParenthesizedExpression(arrayReference, numberOfParens);
	}
	arrayReference.receiver.traverse(this, scope);
	this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET, this.preferences.insert_space_before_opening_bracket_in_array_reference);
	if (this.preferences.insert_space_after_opening_bracket_in_array_reference) {
		this.scribe.space();
	}
	arrayReference.position.traverse(this, scope);
	this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET, this.preferences.insert_space_before_closing_bracket_in_array_reference);

	if (numberOfParens > 0) {
		manageClosingParenthesizedExpression(arrayReference, numberOfParens);
	}
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:23,代码来源:CodeFormatterVisitor.java

示例2: consumeArrayAccess

import org.eclipse.jdt.internal.compiler.ast.ArrayReference; //导入依赖的package包/类
protected void consumeArrayAccess(boolean unspecifiedReference) {
	// ArrayAccess ::= Name '[' Expression ']' ==> true
	// ArrayAccess ::= PrimaryNoNewArray '[' Expression ']' ==> false


	//optimize push/pop
	Expression exp;
	if (unspecifiedReference) {
		exp =
			this.expressionStack[this.expressionPtr] =
				new ArrayReference(
					getUnspecifiedReferenceOptimized(),
					this.expressionStack[this.expressionPtr]);
	} else {
		this.expressionPtr--;
		this.expressionLengthPtr--;
		exp =
			this.expressionStack[this.expressionPtr] =
				new ArrayReference(
					this.expressionStack[this.expressionPtr],
					this.expressionStack[this.expressionPtr + 1]);
	}
	exp.sourceEnd = this.endStatementPosition;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:25,代码来源:Parser.java

示例3: referenceMustBeArrayTypeAt

import org.eclipse.jdt.internal.compiler.ast.ArrayReference; //导入依赖的package包/类
public void referenceMustBeArrayTypeAt(TypeBinding arrayType, ArrayReference arrayRef) {
	this.handle(
		IProblem.ArrayReferenceRequired,
		new String[] {new String(arrayType.readableName())},
		new String[] {new String(arrayType.shortReadableName())},
		arrayRef.sourceStart,
		arrayRef.sourceEnd);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:ProblemReporter.java

示例4: endVisit

import org.eclipse.jdt.internal.compiler.ast.ArrayReference; //导入依赖的package包/类
@Override
public void endVisit(ArrayReference x, BlockScope scope) {
  try {
    SourceInfo info = makeSourceInfo(x);
    JExpression position = pop(x.position);
    JExpression receiver = pop(x.receiver);
    push(new JArrayRef(info, receiver, position));
  } catch (Throwable e) {
    throw translateException(x, e);
  }
}
 
开发者ID:WeTheInternet,项目名称:xapi,代码行数:12,代码来源:GwtAstBuilder.java

示例5: visit

import org.eclipse.jdt.internal.compiler.ast.ArrayReference; //导入依赖的package包/类
@Override public boolean visit(ArrayReference node, BlockScope scope) {
	fixPositions(setGeneratedBy(node, source));
	return super.visit(node, scope);
}
 
开发者ID:git03394538,项目名称:lombok-ianchiu,代码行数:5,代码来源:SetGeneratedByVisitor.java

示例6: visit

import org.eclipse.jdt.internal.compiler.ast.ArrayReference; //导入依赖的package包/类
public boolean visit(ArrayReference arrayReference, BlockScope scope) {
	addRealFragment(arrayReference);
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:BinaryExpressionFragmentBuilder.java

示例7: arrayReferencePotentialNullReference

import org.eclipse.jdt.internal.compiler.ast.ArrayReference; //导入依赖的package包/类
public void arrayReferencePotentialNullReference(ArrayReference arrayReference) {
	// TODO(stephan): merge with other expressions
	this.handle(IProblem.ArrayReferencePotentialNullReference, NoArgument, NoArgument, arrayReference.sourceStart, arrayReference.sourceEnd);
	
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:6,代码来源:ProblemReporter.java

示例8: visit

import org.eclipse.jdt.internal.compiler.ast.ArrayReference; //导入依赖的package包/类
@Override public boolean visit(ArrayReference node, BlockScope scope) {
	setGeneratedBy(node, source);
	applyOffsetExpression(node);
	return super.visit(node, scope);
}
 
开发者ID:redundent,项目名称:lombok,代码行数:6,代码来源:SetGeneratedByVisitor.java


注:本文中的org.eclipse.jdt.internal.compiler.ast.ArrayReference类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。