コード例 #1
0
 @Override
 public void call(
     final WriterNameSpace namespace,
     final PojoAccessor<Object> accessor,
     final List<Object> parameters,
     final String args,
     final String content)
     throws PojoAccessorValueNotFoundException, PojoPropertiesNotFoundException {
   namespace.append(accessor.to(args).value(String.class));
 }
コード例 #2
0
      @Override
      public void call(
          final WriterNameSpace namespace,
          final PojoAccessor<Object> accessor,
          final List<Object> parameters,
          final String args,
          final String content)
          throws PojoAccessorValueNotFoundException, PojoPropertiesNotFoundException {
        final List<String> keys = new SkipList<String>();

        final String[] tokens = args.split("@");
        final String key = tokens[0];
        final String id = tokens.length > 1 ? tokens[1] : "self";
        for (final PojoAccessor<Object> object : accessor.to(key).accessorIterable(Object.class)) {
          parameters.add(object.to(id).value(Object.class));
          keys.add("?");
        }

        namespace.append(join(",", keys));
      }