Examples of JavaExpr


Examples of com.google.template.soy.javasrc.restricted.JavaExpr

        "Math.max(" + arg0.getText() + ", " + arg1.getText() + ")", Integer.MAX_VALUE);
  }


  @Override public JavaExpr computeForJavaSrc(List<JavaExpr> args) {
    JavaExpr arg0 = args.get(0);
    JavaExpr arg1 = args.get(1);

    return JavaCodeUtils.genJavaExprForNumberToNumberBinaryFunction(
        "Math.max", "$$max", arg0, arg1);
  }
View Full Code Here

Examples of jsky.util.JavaExpr

        try {
            _sizeVal = Double.parseDouble(_size);
        } catch (Exception e) {
            try {
                // cast to make sure the result of the expr is a double
                _sizeExpr = new JavaExpr("(double)" + _size, this);
            } catch (Throwable t) {
                _sizeVal = 5;
                _units = "image";
                //Logger.debug(this, "Error in symbol size expression: " + _size, t);
            }
        }

        if (_cond.length() != 0 && !_cond.equals("1")) {
            try {
                _condExpr = new JavaExpr(_cond, this);
            } catch (Throwable t) {
                //t.printStackTrace(); //XXX
            }
        }

        if (_angle.length() != 0 && !_angle.equals("0")) {
            try {
                _angleExpr = new JavaExpr("(double)" + _angle, this);
            } catch (Throwable ignored) {
            }
        }

        if (_ratio.length() != 0 && !_ratio.equals("1")) {
            try {
                _ratioExpr = new JavaExpr("(double)" + _ratio, this);
            } catch (Throwable ignored) {
            }
        }

        if (_label.length() != 0) {
            try {
                _labelExpr = new JavaExpr(_label, this);
            } catch (Throwable ignored) {
            }
        }
    }
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.