/** * Creates a converter that projects the value of the argument of an object using as alias * the argument property name as defined by {@link Argument#getInkvokedPropertyName()} * @param argument An argument defined using the {@link Lambda#on(Class)} method * @return A converter that can be used as projector in the {@link Lambda#project(Object, Converter[])} method */ public static <F> Converter<F, Map.Entry<String, Object>> as(Object argument) { return new AliasedArgumentConverter<F, Object>(argument); }
/** * Creates a converter that projects the value of the argument of an object using as the given alias * @param alias The key on which the argument value is paired * @param argument An argument defined using the {@link Lambda#on(Class)} method * @return A converter that can be used as projector in the {@link Lambda#project(Object, Converter[])} method */ public static <F> Converter<F, Map.Entry<String, Object>> as(String alias, Object argument) { return new AliasedArgumentConverter<F, Object>(alias, argument); }