Skip to content
lexicalscope edited this page Jun 29, 2012 · 8 revisions

Fluent Reflection is a library which wraps the Java reflection API to offer an expressive fluent style of interface. The Fluent Reflection Javadoc is available.

You can download the fluent-reflection library jars using maven.

Simple to use

assertThat(type("java.lang.String").
               construct("Hello World").
               call("substring", 6).
               call("toString").
               as(String.class),
           equalTo("World"));

Works with LambdaJ

forEach(
    object(subject).methods(annotatedWith(PostConstruct.class)),
    FluentMethod.class).callRaw();
Clone this wiki locally