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


Java JCSynchronized类代码示例

本文整理汇总了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];
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:CasualDiff.java

示例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);
	}
}
 
开发者ID:mobmead,项目名称:EasyMPermission,代码行数:17,代码来源:PrettyCommentsPrinter.java

示例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);
    }
}
 
开发者ID:sebastianoe,项目名称:s4j,代码行数:17,代码来源:Pretty.java

示例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);
    }
}
 
开发者ID:redundent,项目名称:lombok,代码行数:17,代码来源:PrettyCommentsPrinter.java

示例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);
}
 
开发者ID:git03394538,项目名称:lombok-ianchiu,代码行数:13,代码来源:PrettyPrinter.java

示例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);
}
 
开发者ID:pcgomes,项目名称:javaparser2jctree,代码行数:8,代码来源:PrintAstVisitor.java

示例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));
}
 
开发者ID:google,项目名称:error-prone,代码行数:10,代码来源:PlaceholderUnificationVisitor.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:CasualDiff.java

示例9: Synchronized

import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
public JCSynchronized Synchronized(JCExpression lock, JCBlock body) {
	return invoke(Synchronized, lock, body);
}
 
开发者ID:git03394538,项目名称:lombok-ianchiu,代码行数:4,代码来源:JavacTreeMaker.java

示例10: AJCSynchronized

import com.sun.tools.javac.tree.JCTree.JCSynchronized; //导入依赖的package包/类
public AJCSynchronized(JCSynchronized ltree) {
    super(ltree.lock, ltree.body);
}
 
开发者ID:pcgomes,项目名称:javaparser2jctree,代码行数:4,代码来源:AJCSynchronized.java

示例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));
}
 
开发者ID:sivakumar-kailasam,项目名称:refactor-faster,代码行数:6,代码来源:USynchronized.java

示例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--;
}
 
开发者ID:evant,项目名称:android-retrolambda-lombok,代码行数:7,代码来源:JcTreePrinter.java

示例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())));
}
 
开发者ID:evant,项目名称:android-retrolambda-lombok,代码行数:7,代码来源:JcTreeConverter.java

示例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));
}
 
开发者ID:google,项目名称:error-prone,代码行数:7,代码来源:USynchronized.java

示例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;
}
 
开发者ID:sebastianoe,项目名称:s4j,代码行数:6,代码来源:Attr.java


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