title: Package equivalent visibility modifier in Kotlin
body: <p>I'm writing a program in which I'm using the factory pattern. I have an interface called <strong>AssetFundCalculator</strong> and a class named <strong>AssetFundCalculatorImpl</strong> which implements the interface.</p>
  
  <p>The <strong>AssetFundValidator</strong> class validates some inputs, and is able to instantiate a valid <strong>AssetFundCalculatorImpl</strong>.</p>
  
  <p>I'd like if the rest of the program would only know about the interface, and not about the <strong>AssetFundCalculatorImpl</strong>, so that only the <strong>AssetFundValidator</strong> could instantiate it.</p>
  
  <p>My package structure is looking like this:</p>
  
  <p><a href="https://i.stack.imgur.com/DUyAT.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/DUyAT.jpg" alt="enter image description here"></a></p>
  
  <p>In Java, I would give package visibility modifier to the <strong>AssetFundCalculatorImpl</strong> class, or it's constructor, and it would solve the issue, but in Kotlin, there is no package visibility modifier.</p>
  
  <p>Is there a solution to this? 
  I don't want to put this code to a separately compiled module, so the <strong>internal</strong> modifier is not going to work.</p>