Package com.sun.tools.javac.tree.JCTree

Examples of com.sun.tools.javac.tree.JCTree.JCUnary


      return null;
    }
    if (statement.getKind() == Kind.EXPRESSION_STATEMENT) {
      Tree.Kind kind = ((JCExpressionStatement) statement).getExpression().getKind();
      if (kind == Kind.PREFIX_INCREMENT || kind == Kind.POSTFIX_INCREMENT) {
        JCUnary unary = (JCUnary) ((JCExpressionStatement) statement).getExpression();
        if (unary.arg.getKind() == Kind.IDENTIFIER) {
          return (IdentifierTree) unary.arg;
        }
        return null;
      } else if (kind == Kind.PLUS_ASSIGNMENT) {
View Full Code Here


        // optimization: X.this is never null; skip null check
        Name name = TreeInfo.name(arg);
        if (name == names._this || name == names._super) return arg;

        int optag = JCTree.NULLCHK;
        JCUnary tree = make.at(arg.pos).Unary(optag, arg);
        tree.operator = syms.nullcheck;
        tree.type = arg.type;
        return tree;
    }
View Full Code Here

    // Unary operators

    public JCExpression transform(Tree.NotOp op) {
        // No need for an erasure cast since Term must be Boolean and we never need to erase that
        JCExpression term = transformExpression(op.getTerm(), CodegenUtil.getBoxingStrategy(op), null);
        JCUnary jcu = at(op).Unary(JCTree.NOT, term);
        return jcu;
    }
View Full Code Here

TOP

Related Classes of com.sun.tools.javac.tree.JCTree.JCUnary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.