本文整理汇总了Java中com.sun.tools.javac.tree.JCTree.JCSynchronized类的典型用法代码示例。如果您正苦于以下问题:Java JCSynchronized类的具体用法?Java JCSynchronized怎么用?Java JCSynchronized使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JCSynchronized类属于com.sun.tools.javac.tree.JCTree包,在下文中一共展示了JCSynchronized类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: diffSynchronized
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
protected int diffSynchronized(JCSynchronized oldT, JCSynchronized newT, int[] bounds) {
int localPointer = bounds[0];
// lock
int[] lockBounds = getBounds(oldT.lock);
copyTo(localPointer, lockBounds[0]);
localPointer = diffTree(oldT.lock, newT.lock, lockBounds);
// body
int[] bodyBounds = getBounds(oldT.body);
copyTo(localPointer, bodyBounds[0]);
int oldIndent = newT.body.hasTag(Tag.BLOCK) ? -1 : printer.indent();
localPointer = diffTree(oldT.body, newT.body, bodyBounds);
if (!newT.body.hasTag(Tag.BLOCK))
printer.undent(oldIndent);
copyTo(localPointer, bounds[1]);
return bounds[1];
}
示例2: visitSynchronized
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
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);
}
}
示例3: visitSynchronized
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
public void visitSynchronized(JCSynchronized tree) {
try {
print("synchronized ");
if (tree.lock.getTag() == JCTree.PARENS) {
printExpr(tree.lock);
} else {
print("(");
printExpr(tree.lock);
print(")");
}
print(" ");
printStat(tree.body);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
示例4: visitSynchronized
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
public void visitSynchronized(JCSynchronized tree) {
try {
print("synchronized ");
if (getTag(tree.lock) == PARENS) {
printExpr(tree.lock);
} else {
print("(");
printExpr(tree.lock);
print(")");
}
print(" ");
printStat(tree.body);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
示例5: visitSynchronized
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
@Override public void visitSynchronized(JCSynchronized tree) {
aPrint("synchronized ");
if (tree.lock instanceof JCParens) {
print(tree.lock);
} else {
print("(");
print(tree.lock);
print(")");
}
print(" ");
print(tree.body);
}
示例6: visitSynchronized
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
public void visitSynchronized(JCSynchronized that) {
try {
print("JCSynchronized:");
} catch (Exception e) {
}
super.visitSynchronized(that);
}
示例7: visitSynchronized
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
@Override
public Choice<State<JCSynchronized>> visitSynchronized(
final SynchronizedTree node, State<?> state) {
return chooseSubtrees(
state,
s -> unifyExpression(node.getExpression(), s),
s -> unifyStatement(node.getBlock(), s),
(expr, block) -> maker().Synchronized(expr, (JCBlock) block));
}
示例8: matchSynchronized
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
private boolean matchSynchronized(JCSynchronized t1, JCSynchronized t2) {
return treesMatch(t1.lock, t2.lock) && treesMatch(t1.body, t2.body);
}
示例9: Synchronized
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
public JCSynchronized Synchronized(JCExpression lock, JCBlock body) {
return invoke(Synchronized, lock, body);
}
示例10: AJCSynchronized
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
public AJCSynchronized(JCSynchronized ltree) {
super(ltree.lock, ltree.body);
}
示例11: inline
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
@Override
public JCSynchronized inline(Inliner inliner) throws CouldNotResolveImportException {
return inliner.maker().Synchronized(
getExpression().inline(inliner), getBlock().inline(inliner));
}
示例12: visitSynchronized
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
@Override public void visitSynchronized(JCSynchronized tree) {
printNode(tree);
child("lock", tree.lock);
child("body", tree.body);
indent--;
}
示例13: visitSynchronized
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
@Override public void visitSynchronized(JCSynchronized node) {
Synchronized s = new Synchronized();
JCExpression cond = node.getExpression();
setConversionPositionInfo(s, "()", getPosition(cond));
set(node, s.rawLock(toTree(removeParens(cond))).rawBody(toTree(node.getBlock())));
}
示例14: inline
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
@Override
public JCSynchronized inline(Inliner inliner) throws CouldNotResolveImportException {
return inliner
.maker()
.Synchronized(getExpression().inline(inliner), getBlock().inline(inliner));
}
示例15: visitSynchronized
import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
public void visitSynchronized(JCSynchronized tree) {
chk.checkRefType(tree.pos(), attribExpr(tree.lock, env));
attribStat(tree.body, env);
result = null;
}