References are used to carry information between steps. References can be written once and read multiple times. As additional features references might be enriched with properties to describe the contained object in more detail for later assertions.
For a detailed description of the BDD approach in Joala read the package documentation for {@link net.joala.bdd}.
Standalone usage: Although the references concept got invented as part of the Joala BDD concept with thorough logging support you can of course use the references directly without any other setting of JUnit Rules etc. Just use plain Java methods and do not rely on Spring:
public scenario_describe_title_with_underscores() throws Exception { Reference<File> documentD = ref("D"); Reference<String> textU = ref("U"); Reference<WebDriver> browserB = ref("B"); given_there_is_a_HTML_document_D(documentD); when_the_HTML_document_D_contains_unicode_text_U(documentD, textU); when_I_open_document_D_with_browser_B(browserB); then_browser_B_correctly_renders_text_U(browserB, textU); }@since 9/27/12 @see net.joala.bdd