public T create()

in impl/src/main/java/org/apache/geronimo/config/cdi/ConfigInjectionBean.java [108:124]


    public T create(CreationalContext<T> context) {
        final InjectionPoint ip = (InjectionPoint)bm.getInjectableReference(new ConfigInjectionPoint(this),context);
        if (ip == null) {
            throw new IllegalStateException("Could not retrieve InjectionPoint");
        }
        final Annotated annotated = ip.getAnnotated();
        final ConfigProperty configProperty = annotated.getAnnotation(ConfigProperty.class);
        final String key = getConfigKey(ip, configProperty);
        final String defaultValue = configProperty.defaultValue();
        final boolean canBeNull = ConfigProperty.UNCONFIGURED_VALUE.equals(defaultValue);
        return toInstance(
                annotated.getBaseType(),
                key,
                canBeNull || ConfigExtension.isDefaultUnset(defaultValue) ? null : defaultValue,
                true,
                canBeNull);
    }