for (ICommonMethodMetadata<?, ?, ?> postConstructMethodMetadata : postConstructMethods) {
Method postConstructMethod = null;
try {
postConstructMethod = clazz.getDeclaredMethod(postConstructMethodMetadata.getJMethod().getName());
} catch (NoSuchMethodException e) {
throw new ArchiveInjectionException("Cannot invoke postconstruct method", e);
}
boolean accessible = postConstructMethod.isAccessible();
try {
postConstructMethod.setAccessible(true);
postConstructMethod.invoke(instance);
} catch (IllegalAccessException e) {
throw new ArchiveInjectionException("Cannot invoke postconstruct method", e);
} catch (InvocationTargetException e) {
throw new ArchiveInjectionException("Cannot invoke postconstruct method", e);
} finally {
postConstructMethod.setAccessible(accessible);
}
}