本文整理汇总了Java中com.github.javaparser.ast.stmt.SynchronizedStmt类的典型用法代码示例。如果您正苦于以下问题:Java SynchronizedStmt类的具体用法?Java SynchronizedStmt怎么用?Java SynchronizedStmt使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SynchronizedStmt类属于com.github.javaparser.ast.stmt包,在下文中一共展示了SynchronizedStmt类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override
public void visit(final SynchronizedStmt n, final Object arg) {
printer.printLn("SynchronizedStmt");
printJavaComment(n.getComment(), arg);
printer.print("synchronized (");
n.getExpr().accept(this, arg);
printer.print(") ");
n.getBlock().accept(this, arg);
}
示例2: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override
public JCTree visit(final SynchronizedStmt n, final Object arg) {
//ARG0: JCExpression lock
JCExpression arg0 = null;
if (n.getExpr() != null) {
arg0 = (JCExpression) n.getExpr().accept(this, arg);
}
//ARG0: JCBlock body
JCBlock arg1 = (JCBlock) n.getBlock().accept(this, arg);
return new AJCSynchronized(make.Synchronized(arg0, arg1), ((n.getComment() != null) ? n.getComment().getContent() : null));
}
示例3: doMerge
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override public SynchronizedStmt doMerge(SynchronizedStmt first, SynchronizedStmt second) {
SynchronizedStmt ss = new SynchronizedStmt();
ss.setExpr(mergeSingle(first.getExpr(),second.getExpr()));
ss.setBlock(mergeSingle(first.getBlock(),second.getBlock()));
return ss;
}
示例4: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override public Boolean visit(final SynchronizedStmt n1, final Node arg) {
final SynchronizedStmt n2 = (SynchronizedStmt) arg;
if (!nodeEquals(n1.getExpr(), n2.getExpr())) {
return Boolean.FALSE;
}
if (!nodeEquals(n1.getBlock(), n2.getBlock())) {
return Boolean.FALSE;
}
return Boolean.TRUE;
}
示例5: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override public void visit(final SynchronizedStmt n, final Object arg) {
printJavaComment(n.getComment(), arg);
printer.print("synchronized (");
n.getExpr().accept(this, arg);
printer.print(") ");
n.getBlock().accept(this, arg);
}
示例6: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override public Boolean visit(final SynchronizedStmt n1, final Node arg) {
final SynchronizedStmt n2 = (SynchronizedStmt) arg;
if (!nodeEquals(n1.getExpr(), n2.getExpr())) {
return false;
}
if (!nodeEquals(n1.getBody(), n2.getBody())) {
return false;
}
return true;
}
示例7: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override
public Node visit(SynchronizedStmt _n, Object _arg) {
Expression expr = cloneNodes(_n.getExpr(), _arg);
BlockStmt block = cloneNodes(_n.getBody(), _arg);
Comment comment = cloneNodes(_n.getComment(), _arg);
SynchronizedStmt r = new SynchronizedStmt(
_n.getRange(),
expr, block
);
r.setComment(comment);
return r;
}
示例8: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override public void visit(final SynchronizedStmt n, final Object arg) {
printJavaComment(n.getComment(), arg);
printer.print("synchronized (");
n.getExpr().accept(this, arg);
printer.print(") ");
n.getBlock().accept(this, arg);
}
示例9: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override
public Node visit(
SynchronizedStmt n, Map<Node, Node> arg
) {
if (arg.containsKey(n)) {
return arg.get(n);
}
return super.visit(n, arg);
}
示例10: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override
public void visit(SynchronizedStmt n, Script arg) {
}
示例11: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override public void visit(final SynchronizedStmt n, final A arg) {
visitComment(n.getComment(), arg);
n.getExpr().accept(this, arg);
n.getBlock().accept(this, arg);
}
示例12: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override public void visit(final SynchronizedStmt n, final A arg) {
jw.write(n);
visitComment(n.getComment(), arg);
n.getExpr().accept(this, arg);
n.getBlock().accept(this, arg);
}
示例13: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override public Node visit(final SynchronizedStmt n, final A arg) {
n.setExpr((Expression) n.getExpr().accept(this, arg));
n.setBlock((BlockStmt) n.getBlock().accept(this, arg));
return n;
}
示例14: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override public Node visit(final SynchronizedStmt n, final A arg) {
visitComment(n, arg);
n.setExpr((Expression) n.getExpr().accept(this, arg));
n.setBody((BlockStmt) n.getBody().accept(this, arg));
return n;
}
示例15: visit
import com.github.javaparser.ast.stmt.SynchronizedStmt; //导入依赖的package包/类
@Override
public void visit(final SynchronizedStmt n, final Context ctx) {
visitNode(n, ctx);
super.visit(n, ctx);
}