本文整理汇总了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;
}
示例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)
}
示例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);
}
}
示例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);
}
示例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);
}