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


Java SynchronizedStatement类代码示例

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


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

示例1: visit

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

	this.scribe.printNextToken(TerminalTokens.TokenNamesynchronized);

	final int line = this.scribe.line;

	this.scribe.printNextToken(TerminalTokens.TokenNameLPAREN, this.preferences.insert_space_before_opening_paren_in_synchronized);

	if (this.preferences.insert_space_after_opening_paren_in_synchronized) {
		this.scribe.space();
	}
	synchronizedStatement.expression.traverse(this, scope);

	this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_before_closing_paren_in_synchronized);

	formatLeftCurlyBrace(line, this.preferences.brace_position_for_block);
	synchronizedStatement.block.traverse(this, scope);
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:25,代码来源:CodeFormatterVisitor.java

示例2: consumeStatementSynchronized

import org.eclipse.jdt.internal.compiler.ast.SynchronizedStatement; //导入依赖的package包/类
protected void consumeStatementSynchronized() {
	// SynchronizedStatement ::= OnlySynchronized '(' Expression ')' Block
	//optimize the push/pop

	if (this.astLengthStack[this.astLengthPtr] == 0) {
		this.astLengthStack[this.astLengthPtr] = 1;
		this.expressionLengthPtr--;
		this.astStack[++this.astPtr] =
			new SynchronizedStatement(
				this.expressionStack[this.expressionPtr--],
				null,
				this.intStack[this.intPtr--],
				this.endStatementPosition);
	} else {
		this.expressionLengthPtr--;
		this.astStack[this.astPtr] =
			new SynchronizedStatement(
				this.expressionStack[this.expressionPtr--],
				(Block) this.astStack[this.astPtr],
				this.intStack[this.intPtr--],
				this.endStatementPosition);
	}
	this.modifiers = ClassFileConstants.AccDefault;
	this.modifiersSourceStart = -1; // <-- see comment into modifiersFlag(int)
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:26,代码来源:Parser.java

示例3: endVisit

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

示例4: visit

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

示例5: visit

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


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