<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tino Steinort</title>
    <description>The latest articles on DEV Community by Tino Steinort (@tinosteinort).</description>
    <link>https://dev.to/tinosteinort</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F44197%2F06e1c4c1-9a0b-4c00-8e19-485a87a9b5d6.png</url>
      <title>DEV Community: Tino Steinort</title>
      <link>https://dev.to/tinosteinort</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tinosteinort"/>
    <language>en</language>
    <item>
      <title>Dependency Injection with the BeanRepository</title>
      <dc:creator>Tino Steinort</dc:creator>
      <pubDate>Thu, 23 Aug 2018 20:23:38 +0000</pubDate>
      <link>https://dev.to/tinosteinort/dependency-injection-with-the-beanrepository-f58</link>
      <guid>https://dev.to/tinosteinort/dependency-injection-with-the-beanrepository-f58</guid>
      <description>&lt;p&gt;Oh no, it happend again! There is it, another dependency injection framework...&lt;/p&gt;

&lt;h1&gt;
  
  
  Why?
&lt;/h1&gt;

&lt;p&gt;In the past I want to start a project which should be runnable in the java sandbox, and I want to use dependency injection. First I thought I can use just the dependency mechanism of Spring (&lt;code&gt;spring-context&lt;/code&gt;), but that was not the case: Spring widely uses reflection, which is not allowed in the sandbox.&lt;/p&gt;

&lt;p&gt;Nearly the same result for my next try: Guice. Now, when I tried this for my needs, there was an error with some system properties, which are not allowed to read from within the sandbox. Today I'm not able to remember which property and error exactly.&lt;/p&gt;

&lt;p&gt;At this point, I don't want to try other frameworks, but I know there are a lot of them. For sure there are frameworks without using reflection. I thought it could be pretty cool, to create an own DI framework, and see what problems I have to solve, to match my expectations. And an other point: &lt;em&gt;coding is fun&lt;/em&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Original expectations
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;some kind of dependency injection&lt;/li&gt;
&lt;li&gt;singleton and protoype beans&lt;/li&gt;
&lt;li&gt;no reflections and annotations&lt;/li&gt;
&lt;li&gt;configuration in java code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These expectations expands after a while. As well as I finished the project for which the &lt;code&gt;BeanRepository&lt;/code&gt; was initiated.&lt;/p&gt;

&lt;h1&gt;
  
  
  What happend?
&lt;/h1&gt;

&lt;p&gt;However, the first result was a Service Locator. A bean has to ask activly for an other beans. Over the time the API evolved and now, I think I can say it is a mix of a Service Locator and Dependency Injection framework. It depends what you want to do, and how you do it. In &lt;a href="https://martinfowler.com/articles/injection.html"&gt;this link&lt;/a&gt; Martin Fowler describes his idea about both approaches.&lt;/p&gt;

&lt;h1&gt;
  
  
  Can I see some code?
&lt;/h1&gt;

&lt;p&gt;This is a very simple example with three classes. The usecase of this program is just to print out the command line parameter.&lt;/p&gt;

&lt;p&gt;This is our usecase, just a service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ArgumentPrinter&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;ArgsProvider&lt;/span&gt; &lt;span class="n"&gt;argsProvider&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="cm"&gt;/**
     * The ArgsProvider is responsible for getting the command line arguments,
     *  so we need it as a dependency. The ArgsProvider bean is provided by
     *  the BeanRepository.
     */&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;ArgumentPrinter&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;ArgsProvider&lt;/span&gt; &lt;span class="n"&gt;argsProvider&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;argsProvider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;argsProvider&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;printCommandLineArgs&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

        &lt;span class="c1"&gt;// Isn't it a nice use case? :-)&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Commandline args[]:"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;arg&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;argsProvider&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="o"&gt;())&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;" * '"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;arg&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s"&gt;"'"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The &lt;code&gt;BeanRepository&lt;/code&gt; is kind of a container, so we need an entry point to execute our own code:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * Every bean, that implements ApplicationStartedListener, will be triggered
 *  right after the BeanRepository is built. This should be used to execute code
 *  on startup.
 */&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;StartupListener&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;ApplicationStartedListener&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;ArgumentPrinter&lt;/span&gt; &lt;span class="n"&gt;argumentPrinter&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;StartupListener&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;ArgumentPrinter&lt;/span&gt; &lt;span class="n"&gt;argumentPrinter&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;argumentPrinter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;argumentPrinter&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="nd"&gt;@Override&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;onEvent&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;ApplicationStartedEvent&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

        &lt;span class="c1"&gt;// the entry point&lt;/span&gt;

        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Application started"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

        &lt;span class="n"&gt;argumentPrinter&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;printCommandLineArgs&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;At this point we miss just a starter class, and the configuration of the &lt;code&gt;BeanRepository&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SimpleExampleApp&lt;/span&gt; &lt;span class="kd"&gt;implements&lt;/span&gt; &lt;span class="nc"&gt;BeanRepositoryConfigurator&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

        &lt;span class="c1"&gt;// Set args manually without configuring IDE run configs&lt;/span&gt;
        &lt;span class="c1"&gt;// -&amp;gt; not needed for real applications&lt;/span&gt;
        &lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s"&gt;"argument 1"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"argument 2"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"value"&lt;/span&gt;&lt;span class="o"&gt;};&lt;/span&gt;

        &lt;span class="c1"&gt;// Start the application with dependency injection support&lt;/span&gt;
        &lt;span class="c1"&gt;//  1.: parameter: commandline args[]&lt;/span&gt;
        &lt;span class="c1"&gt;//  2.: parameter: Some class that implements BeanRepositoryConfigurator&lt;/span&gt;
        &lt;span class="nc"&gt;BeanRepositoryApplication&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SimpleExampleApp&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="nd"&gt;@Override&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;configure&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;BeanRepository&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;BeanRepositoryBuilder&lt;/span&gt; &lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

        &lt;span class="c1"&gt;// This method is used to configure the available beans an how&lt;/span&gt;
        &lt;span class="c1"&gt;//  they depends on each other.&lt;/span&gt;
        &lt;span class="c1"&gt;// The scheme of the singleton method is:&lt;/span&gt;
        &lt;span class="c1"&gt;//  1.: type of the bean&lt;/span&gt;
        &lt;span class="c1"&gt;//  2.: reference to the constructor of the bean&lt;/span&gt;
        &lt;span class="c1"&gt;//  3., 4., 5., 6., 7.: the types of the needed beans&lt;/span&gt;

        &lt;span class="n"&gt;builder&lt;/span&gt;
                           &lt;span class="c1"&gt;// type of the bean    // constructor ref    // type of reference&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;singleton&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;StartupListener&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;StartupListener:&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;ArgumentPrinter&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
                           &lt;span class="c1"&gt;// type of the bean    // constructor ref    // type of reference&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;singleton&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;ArgumentPrinter&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;ArgumentPrinter:&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;ArgsProvider&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
                &lt;span class="c1"&gt;// the ArgsProvider is a bean which is provided by the BeanRepository, to get&lt;/span&gt;
                &lt;span class="c1"&gt;//  the command line args&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;There is a limitation of beans that can be referenced. Currently a bean can have only 5 or less dependencies. Because no reflection is used, stuff is implemented by manually coding. In this case: create interfaces with one method with different amount of parameters. For my cases it was enough.&lt;/p&gt;

&lt;p&gt;An other point is, that cyclic references are not supported directly. It is possible, but with some extra coding. See &lt;a href="https://github.com/tinosteinort/beanrepository/tree/master/src/test/java/com/github/tinosteinort/beanrepository/example/_03_cyclicreferenceexample"&gt;this example&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;
  
  
  Other stuff
&lt;/h1&gt;

&lt;p&gt;There are other functionalities, which are not listed in this post.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;other scopes&lt;/li&gt;
&lt;li&gt;providers&lt;/li&gt;
&lt;li&gt;factories&lt;/li&gt;
&lt;li&gt;aliases&lt;/li&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  Where can I get it?
&lt;/h1&gt;

&lt;p&gt;Try it out:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;com.github.tinosteinort&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;beanrepository&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;1.7.0&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Get insights:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i3JOwpme--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/tinosteinort"&gt;
        tinosteinort
      &lt;/a&gt; / &lt;a href="https://github.com/tinosteinort/beanrepository"&gt;
        beanrepository
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A Dependency Injection / Service Locator Library
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
BeanRepository - Dependency Injection / Service Locator&lt;/h1&gt;
&lt;p&gt;This framework is the implementation of a mix of the Service Locator Pattern and a
the Dependency Injection Pattern. These patterns are described by Martin Fowler in
&lt;a href="http://martinfowler.com/articles/injection.html" rel="nofollow"&gt;this article&lt;/a&gt;. The &lt;code&gt;BeanRepository&lt;/code&gt;
does not use reflection for injecting beans. Because of that fact, it can be used in
the Java sandbox, where reflection is not allowed.&lt;/p&gt;
&lt;h2&gt;
Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;simple, self-explanatory and failsafe configuration in Java code&lt;/li&gt;
&lt;li&gt;no use of reflection or annotations&lt;/li&gt;
&lt;li&gt;constructor injection&lt;/li&gt;
&lt;li&gt;support for singletons, prototypes and instances&lt;/li&gt;
&lt;li&gt;provider&lt;/li&gt;
&lt;li&gt;factories&lt;/li&gt;
&lt;li&gt;aliases for beans&lt;/li&gt;
&lt;li&gt;fail fast on start up&lt;/li&gt;
&lt;li&gt;execute code after initialisation of the bean (post construct)&lt;/li&gt;
&lt;li&gt;configurable if singletons are lazy initialised or not&lt;/li&gt;
&lt;li&gt;detect beans of a specific type&lt;/li&gt;
&lt;li&gt;modularity possible&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Limitations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;cyclic references not supported directly. But if needed, see
&lt;a href="https://raw.githubusercontent.com/tinosteinort/beanrepository/master//src/test/java/com/github/tinosteinort/beanrepository/example/_03_cyclicreferenceexample"&gt;CyclicReferenceExampleApp&lt;/a&gt;
for a solution&lt;/li&gt;
&lt;li&gt;no request or session scope&lt;/li&gt;
&lt;li&gt;no initialisation code allowed in constructor
&lt;ul&gt;
&lt;li&gt;constructor may be called…&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/tinosteinort/beanrepository"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



</description>
      <category>showdev</category>
      <category>java</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
