@Override
            public <T> Schema<T> create(final RuntimeSchema<T> ms, Instantiator<T> instantiator, Predicate.Factory pf,
                    String[] args)
            {
                if (pf == null)
                    throw new IllegalArgumentException("Predicate.Factory arg must not be null.");

                final Predicate predicate = pf.create(args);

                return new BaseSchema<T>(ms.typeClass(), instantiator)
                {
                    @Override
                    public int getFieldNumber(String name)
                    {
                        final Field<T> field = ms.getFieldByName(name);
                        return field != null && predicate.apply(field) ? field.number : 0;
                    }

                    @Override
                    public void mergeFrom(Input input, T message) throws IOException
                    {
                        for (int number = input.readFieldNumber(this); number != 0;
                        number = input.readFieldNumber(this))
                        {
                            final Field<T> field = ms.getFieldByNumber(number);
                            if (field == null || !predicate.apply(field, message))
                                input.handleUnknownField(number, this);
                            else
                                field.mergeFrom(input, message);
                        }
                    }

                    @Override
                    public String getFieldName(int number)
                    {
                        // only called during writes
                        // the predicate already applied on writeTo (the method below)
                        final Field<T> field = ms.getFieldByNumber(number);
                        return field == null ? null : field.name;
                    }

                    @Override
                    public void writeTo(Output output, T message) throws IOException
                    {
                        for (Field<T> f : ms.getFields())
                        {
                            if (predicate.apply(f, message))
                                f.writeTo(output, message);
                        }
                    }
                };
            }
Filters the fields to include based on a {@link Predicate}.
<p>
The {@link Predicate.Factory} arg is required.
protostuff-runtime-view/src/main/java/io/protostuff/runtime/RuntimeView.java