Package com.github.mustachejava.util

Examples of com.github.mustachejava.util.Wrapper.call()


        if (wrapper != null) {
          // We need to dig into a scope when dot notation shows up
          wrappers.add(wrapper);
          try {
            // Pull out the next level
            scope = coerce(wrapper.call(new Object[]{scope}));
          } catch (GuardException e) {
            throw new AssertionError(e);
          }
        } else {
          // Failed to find a wrapper for the next dot
View Full Code Here


          final double multiplier = Double.parseDouble(split[1].trim());
          final Wrapper wrapper = super.find(split[0].trim(), scopes);
          return new Wrapper() {
            @Override
            public Object call(Object[] scopes) throws GuardException {
              Object value = wrapper.call(scopes);
              if (value instanceof Number) {
                value = ((Number) value).doubleValue();
              } else {
                value = value == null ? 0d : Double.parseDouble(value.toString());
              }
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.