code: public JCExpression coerce(Env<AttrContext> env, JCExpression tree, Type target) {
          Env<AttrContext> prevEnv = this.env;
          try {
              this.env = env;
              return coerce(tree, target);
          }
          finally {
              this.env = prevEnv;
          }
      }
docs: Construct an attributed tree to coerce an expression to some erased
  target type, unless the expression is already assignable to that type.
  If target type is a constant type, use its base type instead.
  @param tree    The expression tree.
  @param target  The target type.