public void doSomethingWithImpl() { org.apache.commons.lang.builder.ToStringBuilder stringBuilder; try { Class.forName("org.apache.commons.io.FileUtils"); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } new Impl().implMethod(); }