本文整理汇总了Java中com.sun.tools.javac.tree.JCTree.JCAssert类的典型用法代码示例。如果您正苦于以下问题:Java JCAssert类的具体用法?Java JCAssert怎么用?Java JCAssert使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JCAssert类属于com.sun.tools.javac.tree.JCTree包,在下文中一共展示了JCAssert类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: diffAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
protected int diffAssert(JCAssert oldT, JCAssert newT, int[] bounds) {
int localPointer = bounds[0];
// cond
int[] condBounds = getBounds(oldT.cond);
copyTo(localPointer, condBounds[0]);
localPointer = diffTree(oldT.cond, newT.cond, condBounds);
// detail
if (oldT.detail != newT.detail) {
if (oldT.detail == null) {
copyTo(localPointer, condBounds[1]);
localPointer = condBounds[1];
printer.print(" : ");
printer.print(newT.detail);
} else {
int[] detailBounds = getBounds(oldT.detail);
if (newT.detail == null) {
copyTo(localPointer, condBounds[1]);
localPointer = detailBounds[1];
} else {
copyTo(localPointer, detailBounds[0]);
localPointer = diffTree(oldT.detail, newT.detail, detailBounds);
}
}
}
copyTo(localPointer, bounds[1]);
return bounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:29,代码来源:CasualDiff.java
示例2: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
@Override public void visitAssert(JCAssert tree) {
aPrint("assert ");
print(tree.cond);
if (tree.detail != null) {
print(" : ");
print(tree.detail);
}
println(";", tree);
}
开发者ID:git03394538,项目名称:lombok-ianchiu,代码行数:10,代码来源:PrettyPrinter.java
示例3: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
public void visitAssert(JCAssert that) {
try {
print("JCAssert:");
} catch (Exception e) {
}
super.visitAssert(that);
}
开发者ID:pcgomes,项目名称:javaparser2jctree,代码行数:8,代码来源:PrintAstVisitor.java
示例4: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
public void visitAssert(JCAssert tree) {
try {
print("assert ");
printExpr(tree.cond);
if (tree.detail != null) {
print(" : ");
printExpr(tree.detail);
}
print(";");
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:mobmead,项目名称:EasyMPermission,代码行数:14,代码来源:PrettyCommentsPrinter.java
示例5: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
public void visitAssert(JCAssert tree) {
try {
print("assert ");
printExpr(tree.cond);
if (tree.detail != null) {
print(" : ");
printExpr(tree.detail);
}
print(";");
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:sebastianoe,项目名称:s4j,代码行数:14,代码来源:Pretty.java
示例6: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
public void visitAssert(JCAssert tree) {
attribExpr(tree.cond, env, syms.booleanType);
if (tree.detail != null) {
chk.checkNonVoid(tree.detail.pos(), attribExpr(tree.detail, env));
}
result = null;
}
开发者ID:sebastianoe,项目名称:s4j,代码行数:8,代码来源:Attr.java
示例7: matchAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
private boolean matchAssert(JCAssert t1, JCAssert t2) {
return treesMatch(t1.cond, t2.cond) && treesMatch(t1.detail, t2.detail);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:CasualDiff.java
示例8: Assert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
public JCAssert Assert(JCExpression cond, JCExpression detail) {
return invoke(Assert, cond, detail);
}
开发者ID:git03394538,项目名称:lombok-ianchiu,代码行数:4,代码来源:JavacTreeMaker.java
示例9: AJCAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
public AJCAssert(JCAssert ltree) {
super(ltree.cond, ltree.detail);
}
开发者ID:pcgomes,项目名称:javaparser2jctree,代码行数:4,代码来源:AJCAssert.java
示例10: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
@Override public void visitAssert(JCAssert tree) {
printNode(tree);
child("cond", tree.cond);
child("detail", tree.detail);
indent--;
}
开发者ID:evant,项目名称:android-retrolambda-lombok,代码行数:7,代码来源:JcTreePrinter.java
示例11: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
@Override public void visitAssert(JCAssert node) {
set(node, new Assert().rawAssertion(toTree(node.getCondition())).rawMessage(toTree(node.getDetail())));
}
开发者ID:evant,项目名称:android-retrolambda-lombok,代码行数:4,代码来源:JcTreeConverter.java
注:本文中的com.sun.tools.javac.tree.JCTree.JCAssert类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论