protected boolean shouldShowOffset(Date date, int dateType, Environment env) { if (dateType == TemplateDateModel.DATE) { return false; // ISO 8061 doesn't allow zone for date-only values } else if (this.showOffset != null) { return this.showOffset.booleanValue(); } else { // java.sql.Time values meant to carry calendar field values only, so we don't show offset for them. return !(date instanceof java.sql.Time && _TemplateAPI.getTemplateLanguageVersionAsInt(this) >= _TemplateAPI.VERSION_INT_2_3_21); } }
private TemplateModel emptyResult(boolean seq) { return seq ? (_TemplateAPI.getTemplateLanguageVersionAsInt(this) < _TemplateAPI.VERSION_INT_2_3_21 ? new SimpleSequence(Collections.EMPTY_LIST, null) : Constants.EMPTY_SEQUENCE) : TemplateScalarModel.EMPTY_STRING; }
public static int getTemplateLanguageVersionAsInt(TemplateObject to) { return getTemplateLanguageVersionAsInt(to.getTemplate()); }
@Override TemplateModel _eval(Environment env) throws TemplateException { TemplateModel tm = target.eval(env); target.assertNonNull(tm, env); return (tm instanceof TemplateSequenceModel || tm instanceof TemplateCollectionModel) && (_TemplateAPI.getTemplateLanguageVersionAsInt(this) < _TemplateAPI.VERSION_INT_2_3_21 // These implement TemplateSequenceModel, yet they can't be #list-ed: || !(tm instanceof SimpleMethodModel || tm instanceof OverloadedMethodsModel)) ? TemplateBooleanModel.TRUE : TemplateBooleanModel.FALSE; } }
@Override TemplateModel _eval(Environment env) throws TemplateException { final int begin = lho.evalToNumber(env).intValue(); if (endType != END_UNBOUND) { final int lhoValue = rho.evalToNumber(env).intValue(); return new BoundedRangeModel( begin, endType != END_SIZE_LIMITED ? lhoValue : begin + lhoValue, endType == END_INCLUSIVE, endType == END_SIZE_LIMITED); } else { return _TemplateAPI.getTemplateLanguageVersionAsInt(this) >= _TemplateAPI.VERSION_INT_2_3_21 ? (RangeModel) new ListableRightUnboundedRangeModel(begin) : (RangeModel) new NonListableRightUnboundedRangeModel(begin); } }
SequenceHash(Environment env) throws TemplateException { if (_TemplateAPI.getTemplateLanguageVersionAsInt(HashLiteral.this) >= _TemplateAPI.VERSION_INT_2_3_21) { map = new LinkedHashMap(); for (int i = 0; i < size; i++) {
&& _TemplateAPI.getTemplateLanguageVersionAsInt(template) >= _TemplateAPI.VERSION_INT_2_3_21) { {if (true) throw new ParseException("Unclosed \"" + start.image + "\"", template, start);}
protected boolean shouldShowOffset(Date date, int dateType, Environment env) { if (dateType == TemplateDateModel.DATE) { return false; // ISO 8061 doesn't allow zone for date-only values } else if (this.showOffset != null) { return this.showOffset.booleanValue(); } else { // java.sql.Time values meant to carry calendar field values only, so we don't show offset for them. return !(date instanceof java.sql.Time && _TemplateAPI.getTemplateLanguageVersionAsInt(this) >= _TemplateAPI.VERSION_INT_2_3_21); } }
protected boolean shouldShowOffset(Date date, int dateType, Environment env) { if (dateType == TemplateDateModel.DATE) { return false; // ISO 8061 doesn't allow zone for date-only values } else if (this.showOffset != null) { return this.showOffset.booleanValue(); } else { // java.sql.Time values meant to carry calendar field values only, so we don't show offset for them. return !(date instanceof java.sql.Time && _TemplateAPI.getTemplateLanguageVersionAsInt(this) >= _TemplateAPI.VERSION_INT_2_3_21); } }
private TemplateModel emptyResult(boolean seq) { return seq ? (_TemplateAPI.getTemplateLanguageVersionAsInt(this) < _TemplateAPI.VERSION_INT_2_3_21 ? new SimpleSequence(Collections.EMPTY_LIST, null) : Constants.EMPTY_SEQUENCE) : TemplateScalarModel.EMPTY_STRING; }
private TemplateModel emptyResult(boolean seq) { return seq ? (_TemplateAPI.getTemplateLanguageVersionAsInt(this) < _TemplateAPI.VERSION_INT_2_3_21 ? new SimpleSequence(Collections.EMPTY_LIST, null) : Constants.EMPTY_SEQUENCE) : TemplateScalarModel.EMPTY_STRING; }
public static int getTemplateLanguageVersionAsInt(TemplateObject to) { return getTemplateLanguageVersionAsInt(to.getTemplate()); }
public static int getTemplateLanguageVersionAsInt(TemplateObject to) { return getTemplateLanguageVersionAsInt(to.getTemplate()); }
@Override TemplateModel _eval(Environment env) throws TemplateException { TemplateModel tm = target.eval(env); target.assertNonNull(tm, env); return (tm instanceof TemplateSequenceModel || tm instanceof TemplateCollectionModel) && (_TemplateAPI.getTemplateLanguageVersionAsInt(this) < _TemplateAPI.VERSION_INT_2_3_21 // These implement TemplateSequenceModel, yet they can't be #list-ed: || !(tm instanceof SimpleMethodModel || tm instanceof OverloadedMethodsModel)) ? TemplateBooleanModel.TRUE : TemplateBooleanModel.FALSE; } }
@Override TemplateModel _eval(Environment env) throws TemplateException { TemplateModel tm = target.eval(env); target.assertNonNull(tm, env); return (tm instanceof TemplateSequenceModel || tm instanceof TemplateCollectionModel) && (_TemplateAPI.getTemplateLanguageVersionAsInt(this) < _TemplateAPI.VERSION_INT_2_3_21 // These implement TemplateSequenceModel, yet they can't be #list-ed: || !(tm instanceof SimpleMethodModel || tm instanceof OverloadedMethodsModel)) ? TemplateBooleanModel.TRUE : TemplateBooleanModel.FALSE; } }
@Override TemplateModel _eval(Environment env) throws TemplateException { final int begin = lho.evalToNumber(env).intValue(); if (endType != END_UNBOUND) { final int lhoValue = rho.evalToNumber(env).intValue(); return new BoundedRangeModel( begin, endType != END_SIZE_LIMITED ? lhoValue : begin + lhoValue, endType == END_INCLUSIVE, endType == END_SIZE_LIMITED); } else { return _TemplateAPI.getTemplateLanguageVersionAsInt(this) >= _TemplateAPI.VERSION_INT_2_3_21 ? (RangeModel) new ListableRightUnboundedRangeModel(begin) : (RangeModel) new NonListableRightUnboundedRangeModel(begin); } }
@Override TemplateModel _eval(Environment env) throws TemplateException { final int begin = lho.evalToNumber(env).intValue(); if (endType != END_UNBOUND) { final int lhoValue = rho.evalToNumber(env).intValue(); return new BoundedRangeModel( begin, endType != END_SIZE_LIMITED ? lhoValue : begin + lhoValue, endType == END_INCLUSIVE, endType == END_SIZE_LIMITED); } else { return _TemplateAPI.getTemplateLanguageVersionAsInt(this) >= _TemplateAPI.VERSION_INT_2_3_21 ? (RangeModel) new ListableRightUnboundedRangeModel(begin) : (RangeModel) new NonListableRightUnboundedRangeModel(begin); } }
SequenceHash(Environment env) throws TemplateException { if (_TemplateAPI.getTemplateLanguageVersionAsInt(HashLiteral.this) >= _TemplateAPI.VERSION_INT_2_3_21) { map = new LinkedHashMap(); for (int i = 0; i < size; i++) {
SequenceHash(Environment env) throws TemplateException { if (_TemplateAPI.getTemplateLanguageVersionAsInt(HashLiteral.this) >= _TemplateAPI.VERSION_INT_2_3_21) { map = new LinkedHashMap(); for (int i = 0; i < size; i++) {
&& _TemplateAPI.getTemplateLanguageVersionAsInt(template) >= _TemplateAPI.VERSION_INT_2_3_21) { {if (true) throw new ParseException("Unclosed \"" + start.image + "\"", template, start);}