@Override public SoyValue computeForJava(List<SoyValue> args) { SoyValue arg = args.get(0); if (arg == null) { throw new IllegalArgumentException("Argument to length() function is null."); } if (!(arg instanceof SoyList)) { throw new IllegalArgumentException( "Argument to length() function is not a SoyList " + "(found type " + arg.getClass().getName() + ")."); } return IntegerData.forValue(((SoyList) arg).length()); }
int listLength = foreachList.length(); if (listLength > 0) {
int listLength = foreachList.length(); if (listLength > 0) {