本文整理了Java中org.eclipse.jdt.internal.compiler.ast.Block
类的一些代码示例,展示了Block
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block
类的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.ast.Block
类名称:Block
暂无
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
private void visitIfNeeded(Initializer initializer) {
if (this.localDeclarationVisitor != null
&& (initializer.bits & ASTNode.HasLocalType) != 0) {
if (initializer.block != null) {
initializer.block.traverse(this.localDeclarationVisitor, null);
}
}
}
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public FlowInfo analyseCode(
MethodScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
if (this.block != null) {
return this.block.analyseCode(currentScope, flowContext, flowInfo);
}
return flowInfo;
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
/**
* Code generation for a non-static initializer:
* standard block code gen
*
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & IsReachable) == 0) {
return;
}
int pc = codeStream.position;
if (this.block != null) this.block.generateCode(currentScope, codeStream);
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output);
output.append("{\n"); //$NON-NLS-1$
printBody(indent, output);
return printIndent(indent, output).append('}');
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
if (this.block.isEmptyBlock()) {
switch(this.synchroVariable.type.id) {
case TypeIds.T_long :
this.block.generateCode(this.scope, codeStream);
if (this.scope != currentScope) {
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public RecoveredElement updateOnOpeningBrace(int braceStart, int braceEnd){
// create a nested block
Block block = new Block(0);
block.sourceStart = parser().scanner.startPosition;
return this.add(block, 1);
}
/*
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output);
output.append("synchronized ("); //$NON-NLS-1$
this.expression.printExpression(0, output).append(')');
output.append('\n');
return this.block.printStatement(indent + 1, output);
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
public String toString(int tab) {
StringBuffer result = new StringBuffer(tabString(tab));
result.append("Recovered block:\n"); //$NON-NLS-1$
this.blockDeclaration.print(tab + 1, result);
if (this.statements != null) {
for (int i = 0; i < this.statementCount; i++) {
result.append("\n"); //$NON-NLS-1$
result.append(this.statements[i].toString(tab + 1));
}
}
return result.toString();
}
/*
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public void resolve(MethodScope scope) {
FieldBinding previousField = scope.initializedField;
int previousFieldID = scope.lastVisibleFieldID;
try {
scope.initializedField = null;
scope.lastVisibleFieldID = this.lastVisibleFieldID;
if (isStatic()) {
ReferenceBinding declaringType = scope.enclosingSourceType();
if (declaringType.isNestedType() && !declaringType.isStatic())
scope.problemReporter().innerTypesCannotDeclareStaticInitializers(
declaringType,
this);
}
if (this.block != null) this.block.resolve(scope);
} finally {
scope.initializedField = previousField;
scope.lastVisibleFieldID = previousFieldID;
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output);
output.append("{\n"); //$NON-NLS-1$
printBody(indent, output);
return printIndent(indent, output).append('}');
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
if (this.block.isEmptyBlock()) {
switch(this.synchroVariable.type.id) {
case TypeIds.T_long :
this.block.generateCode(this.scope, codeStream);
if (this.scope != currentScope) {
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public RecoveredElement updateOnOpeningBrace(int braceStart, int braceEnd){
// create a nested block
Block block = new Block(0);
block.sourceStart = parser().scanner.startPosition;
return this.add(block, 1);
}
/*
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output);
output.append("synchronized ("); //$NON-NLS-1$
this.expression.printExpression(0, output).append(')');
output.append('\n');
return this.block.printStatement(indent + 1, output);
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
public String toString(int tab) {
StringBuffer result = new StringBuffer(tabString(tab));
result.append("Recovered block:\n"); //$NON-NLS-1$
this.blockDeclaration.print(tab + 1, result);
if (this.statements != null) {
for (int i = 0; i < this.statementCount; i++) {
result.append("\n"); //$NON-NLS-1$
result.append(this.statements[i].toString(tab + 1));
}
}
return result.toString();
}
/*
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public void resolve(MethodScope scope) {
FieldBinding previousField = scope.initializedField;
int previousFieldID = scope.lastVisibleFieldID;
try {
scope.initializedField = null;
scope.lastVisibleFieldID = this.lastVisibleFieldID;
if (isStatic()) {
ReferenceBinding declaringType = scope.enclosingSourceType();
if (declaringType.isNestedType() && !declaringType.isStatic())
scope.problemReporter().innerTypesCannotDeclareStaticInitializers(
declaringType,
this);
}
if (this.block != null) this.block.resolve(scope);
} finally {
scope.initializedField = previousField;
scope.lastVisibleFieldID = previousFieldID;
}
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output);
output.append("{\n"); //$NON-NLS-1$
printBody(indent, output);
return printIndent(indent, output).append('}');
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
if (this.block.isEmptyBlock()) {
switch(this.synchroVariable.type.id) {
case TypeIds.T_long :
this.block.generateCode(this.scope, codeStream);
if (this.scope != currentScope) {
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
public RecoveredElement updateOnOpeningBrace(int braceStart, int braceEnd){
// create a nested block
Block block = new Block(0);
block.sourceStart = parser().scanner.startPosition;
return this.add(block, 1);
}
/*
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public void traverse(ASTVisitor visitor, MethodScope scope) {
if (visitor.visit(this, scope)) {
if (this.block != null) this.block.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output);
output.append("synchronized ("); //$NON-NLS-1$
this.expression.printExpression(0, output).append(')');
output.append('\n');
return this.block.printStatement(indent + 1, output);
}
内容来源于网络,如有侵权,请联系作者删除!