@Test public void testOrderOfPostConstructInvocationsIsParentsFirst() throws Exception { withMetadataFor(TestModelWithLifecycleCallbacks.class); createModelInstance(); postProcessAfterInitialization(); assertThat(this.modelInstance).hasFieldOrPropertyWithValue("parentPostConstructInvocation", 0); assertThat(this.modelInstance).hasFieldOrPropertyWithValue("localPostConstructInvocation", 1); }
void postProcessAfterInitialization(@Nonnull T instance) throws IllegalAccessException, InvocationTargetException { for (Method m : this.postConstructMethods) { m.invoke(instance); } }
ModelInstantiator { void postProcessAfterInitialization(@Nonnull T instance) throws IllegalAccessException, InvocationTargetException { for (Method m : this.postConstructMethods) { m.invoke(instance); } } }
ModelInstantiator { void postProcessAfterInitialization(@Nonnull T instance) throws IllegalAccessException, InvocationTargetException { for (Method m : this.postConstructMethods) { m.invoke(instance); } } ModelInstantiator(@Nonnull Class<? extends T> modelType); }
ModelInstantiator { void postProcessAfterInitialization(@Nonnull T instance) throws IllegalAccessException, InvocationTargetException { for (Method m : this.postConstructMethods) { m.invoke(instance); } } ModelInstantiator(@Nonnull Class<? extends T> modelType);  }
ModelInstantiator { void postProcessAfterInitialization(@Nonnull T instance) throws IllegalAccessException, InvocationTargetException { for (Method m : this.postConstructMethods) { m.invoke(instance); } } ModelInstantiator(@Nonnull Class<? extends T> modelType);   }