com.sun.tools.javac.tree.JCTree.JCSynchronized Java Examples
The following examples show how to use
com.sun.tools.javac.tree.JCTree.JCSynchronized.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PrettyCommentsPrinter.java From EasyMPermission with MIT License | 6 votes |
public void visitSynchronized(JCSynchronized tree) { try { print("synchronized "); if (PARENS.equals(treeTag(tree.lock))) { printExpr(tree.lock); } else { print("("); printExpr(tree.lock); print(")"); } print(" "); printStat(tree.body); } catch (IOException e) { throw new UncheckedIOException(e); } }
Example #2
Source File: CRTable.java From lua-for-android with BSD 3-Clause "New" or "Revised" License | 4 votes |
public void visitSynchronized(JCSynchronized tree) { SourceRange sr = new SourceRange(startPos(tree), endPos(tree)); sr.mergeWith(csp(tree.lock)); sr.mergeWith(csp(tree.body)); result = sr; }
Example #3
Source File: TransTypes.java From lua-for-android with BSD 3-Clause "New" or "Revised" License | 4 votes |
public void visitSynchronized(JCSynchronized tree) { tree.lock = translate(tree.lock, erasure(tree.lock.type)); tree.body = translate(tree.body); result = tree; }
Example #4
Source File: CompilationUnitBuilder.java From j2cl with Apache License 2.0 | 4 votes |
private SynchronizedStatement convertSynchronized(JCSynchronized statement) { return new SynchronizedStatement( getSourcePosition(statement), convertExpression(statement.getExpression()), convertBlock(statement.getBlock())); }
Example #5
Source File: CompilationUnitBuilder.java From j2cl with Apache License 2.0 | 4 votes |
private Statement convertStatement(JCStatement jcStatement) { switch (jcStatement.getKind()) { case ASSERT: return convertAssert((JCAssert) jcStatement); case BLOCK: return convertBlock((JCBlock) jcStatement); case BREAK: return convertBreak((JCBreak) jcStatement); case CLASS: convertClassDeclaration((JCClassDecl) jcStatement); return null; case CONTINUE: return convertContinue((JCContinue) jcStatement); case DO_WHILE_LOOP: return convertDoWhileLoop((JCDoWhileLoop) jcStatement); case EMPTY_STATEMENT: return new EmptyStatement(getSourcePosition(jcStatement)); case ENHANCED_FOR_LOOP: return convertEnhancedForLoop((JCEnhancedForLoop) jcStatement); case EXPRESSION_STATEMENT: return convertExpressionStatement((JCExpressionStatement) jcStatement); case FOR_LOOP: return convertForLoop((JCForLoop) jcStatement); case IF: return convertIf((JCIf) jcStatement); case LABELED_STATEMENT: return convertLabeledStatement((JCLabeledStatement) jcStatement); case RETURN: return convertReturn((JCReturn) jcStatement); case SWITCH: return convertSwitch((JCSwitch) jcStatement); case THROW: return convertThrow((JCThrow) jcStatement); case TRY: return convertTry((JCTry) jcStatement); case VARIABLE: return convertVariableDeclaration((JCVariableDecl) jcStatement); case WHILE_LOOP: return convertWhileLoop((JCWhileLoop) jcStatement); case SYNCHRONIZED: return convertSynchronized((JCSynchronized) jcStatement); default: throw new AssertionError("Unknown statement node type: " + jcStatement.getKind()); } }
Example #6
Source File: JavacTreeMaker.java From EasyMPermission with MIT License | 4 votes |
public JCSynchronized Synchronized(JCExpression lock, JCBlock body) { return invoke(Synchronized, lock, body); }
Example #7
Source File: USynchronized.java From Refaster with Apache License 2.0 | 4 votes |
@Override public JCSynchronized inline(Inliner inliner) throws CouldNotResolveImportException { return inliner.maker().Synchronized( getExpression().inline(inliner), getBlock().inline(inliner)); }