@Test public void injectListenersTest() { AbstractIndividualFactory<Individual> factory = getFactory(); init(factory); Assert.assertTrue(factory.individualStateListeners.contains(listener)); }
@Inject protected void injectListeners(Set<IndividualStateListener> listeners) { individualStateListeners.addAll(listeners); }
AbstractIndividualFactory implements IndividualFactory { @Inject protected void injectListeners(Set<IndividualStateListener> listeners) { individualStateListeners.addAll(listeners); } }
AbstractIndividualFactory implements IndividualFactory { @Inject protected void injectListeners(Set<IndividualStateListener> listeners) { individualStateListeners.addAll(listeners); } AbstractIndividualFactory(Provider<I> individualProvider, Creator<Genotype> creator); }
AbstractIndividualFactory implements IndividualFactory { @Inject protected void injectListeners(Set<IndividualStateListener> listeners) { individualStateListeners.addAll(listeners); } AbstractIndividualFactory(Provider<I> individualProvider, Creator<Genotype> creator); @Override void addIndividualStateListener(IndividualStateListener listener); @Override Individual create(); @Override Individual create(Genotype genotype); @Override void removeIndividualStateListener(IndividualStateListener listener); }
AbstractIndividualFactory implements IndividualFactory { @Inject protected void injectListeners(Set<IndividualStateListener> listeners) { individualStateListeners.addAll(listeners); } AbstractIndividualFactory(Provider<I> individualProvider, Creator<Genotype> creator); @Override void addIndividualStateListener(IndividualStateListener listener); @Override Individual create(); @Override Individual create(Genotype genotype); @Override void removeIndividualStateListener(IndividualStateListener listener);  }