Bean-related tools


BeanCopy class offers copying functionality. It copies properties from source to destination bean.


BeanTemplateParser is a variant of StringTemplateParser. It parses macros in the strings and replace them with bean values. The usage is quite simple:

    // prepare template
    String template = "Hello ${}. Today is ${dayName}.";

    // prepare the context
    Foo foo = new Foo();
    foo.getUser().setName("John Doe");

    // parse
    BeanTemplateParser beanTemplateParser = new BeanTemplateParser();
    ContextTemplateParser ctp = beanTemplateParser.of(foo);

    String result = ctp.parse(template);
    // result == "Hello John Doe. Today is Saturday."