if (StaticComponentConfigProvider.class.isAssignableFrom(theIfc)) {
staticConfigProv = (StaticComponentConfigProvider) builder.getProviderClass().newInstance();
}
}
} catch (InstantiationException ie) {
throw new InvalidDefinitionException("Cannot instantiate " + builder.getProviderClass().getName(), location);
} catch (IllegalAccessException iae) {
throw new InvalidDefinitionException("Constructor is inaccessible for "
+ builder.getProviderClass().getName(), location);
} catch (RuntimeException e) {
throw new InvalidDefinitionException("Failed to instantiate " + builder.getProviderClass().getName(),
location, e);
}
}
this.configProvider = configProv;
this.descriptorProvider = descriptorProv;
this.staticConfigProvider = staticConfigProv;
// FIXME!!! W-1191791
if (configProvider == null && descriptorProvider == null) {
throw new InvalidDefinitionException("@Provider must have a provider interface.", location);
}
}