Examples of JCBinary


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

          return (IdentifierTree) assignOp.lhs;
        }
      } else if (kind == Kind.ASSIGNMENT) {
        JCAssign assign = (JCAssign) ((JCExpressionStatement) statement).getExpression();
        if (assign.lhs.getKind() == Kind.IDENTIFIER && assign.rhs.getKind() == Kind.PLUS) {
          JCBinary binary = (JCBinary) assign.rhs;
          if (binary.lhs.getKind() == Kind.IDENTIFIER) {
            if (((JCIdent) assign.lhs).sym == ((JCIdent) binary.lhs).sym) {
              if (isConstantOne(binary.rhs)) {
                return (IdentifierTree) binary.lhs;
              }
View Full Code Here

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

                JCExpression exarg2 = makeUnquotedIdent(innerExTmpVarName);
                JCExpression resVar2 = expressionGen().applyErasureAndBoxing(makeUnquotedIdent(resVarName), resVarType, true, BoxingStrategy.BOXED, resVarExpectedType);
                JCMethodInvocation closeCall2 = make().Apply(null, makeQualIdent(resVar2, isDestroyable ? "destroy" : "release"), List.<JCExpression>of(exarg2));
               
                // if ($tmpex != null) { ... } else { ... }
                JCBinary closeCatchCond = make().Binary(JCTree.NE, makeUnquotedIdent(innerExTmpVarName), makeNull());
                JCIf closeCatchIf = make().If(closeCatchCond, closeTry, make().Exec(closeCall2));
   
                // try { .... } catch (Exception ex) { $tmpex=ex; throw ex; }
                // finally { try { $var.close() } catch (Exception closex) { } }
                JCExpression innerCatchExType = makeJavaType(typeFact().getThrowableDeclaration().getType(), JT_CATCH);
View Full Code Here

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

     * Turn this long value into an int value by applying (int)(e ^ (e >>> 32))
     */
    public JCExpression convertToIntForHashAttribute(JCExpression value) {
        SyntheticName tempName = naming.temp("hash");
        JCExpression type = make().Type(syms().longType);
        JCBinary combine = make().Binary(JCTree.BITXOR, makeUnquotedIdent(tempName.asName()),
                make().Binary(JCTree.USR, makeUnquotedIdent(tempName.asName()), makeInteger(32)));
        return make().TypeCast(syms().intType, makeLetExpr(tempName, null, type, value, combine));
    }
View Full Code Here

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

           
            JCStatement result;
            if (initializingParameter == null) {
                // If the field isn't initialized by a parameter we have to
                // cope with the possibility that it's never initialized
                final JCBinary cond = make().Binary(JCTree.EQ, makeUnquotedIdent(fieldName), makeNull());
                final JCStatement throw_ = make().Throw(make().NewClass(null, null,
                        makeIdent(syms().ceylonUninitializedMethodErrorType),
                        List.<JCExpression>nil(),
                        null));
                result = make().If(cond, throw_, stmt);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.