/** * Should be called prior to installing; typically called immediately after instantiation. * * <p> * Note: an alternative design would be to have a 1-arg constructor, but the convention for * installers is to make them no-arg. */ public void addFixturesAnnotatedOn(Class<?> javaClass) throws InstantiationException, IllegalAccessException { final Fixtures fixturesAnnotation = javaClass.getAnnotation(Fixtures.class); if (fixturesAnnotation != null) { final Fixture[] fixtureAnnotations = fixturesAnnotation.value(); for (final Fixture fixtureAnnotation : fixtureAnnotations) { addFixtureRepresentedBy(fixtureAnnotation, fixtures); } } final Fixture fixtureAnnotation = javaClass.getAnnotation(Fixture.class); if (fixtureAnnotation != null) { addFixtureRepresentedBy(fixtureAnnotation, fixtures); } }
/** * Should be called prior to installing; typically called immediately after instantiation. * * <p> * Note: an alternative design would be to have a 1-arg constructor, but the convention for * installers is to make them no-arg. */ public void addFixturesAnnotatedOn(Class<?> javaClass) throws InstantiationException, IllegalAccessException { final Fixtures fixturesAnnotation = javaClass.getAnnotation(Fixtures.class); if (fixturesAnnotation != null) { final Fixture[] fixtureAnnotations = fixturesAnnotation.value(); for (final Fixture fixtureAnnotation : fixtureAnnotations) { addFixtureRepresentedBy(fixtureAnnotation, fixtures); } } final Fixture fixtureAnnotation = javaClass.getAnnotation(Fixture.class); if (fixtureAnnotation != null) { addFixtureRepresentedBy(fixtureAnnotation, fixtures); } }