@Override protected Object getDefaultValue(final Field field) { final ConfigProperty configProperty = field.getAnnotation(ConfigProperty.class); if (configProperty != null && this.configPropertyName.equals(configProperty.name())) { return configProperty.defaultValue(); } return super.getDefaultValue(field); }
protected void processEndpointClass(final RoundEnvironment roundEnv, final Element element, StringBuilder buffer, boolean first) { final ConfigProperty property = element.getAnnotation(ConfigProperty.class); if (property != null) { String defaultValue = property.defaultValue(); if ("org.apache.deltaspike.NullValueMarker".equals(defaultValue)) { defaultValue = null;
/** * <p>Inspects the given InjectionPoint and search for a {@link ConfigProperty} * annotation or an Annotation with a {@link ConfigProperty} meta-Annotation. * The name and defaultValue information will be used to resolve the * configured value.</p> * * @param injectionPoint current injection point * @return the configured value for the given InjectionPoint */ protected String getStringPropertyValue(InjectionPoint injectionPoint) { ConfigProperty configProperty = getAnnotation(injectionPoint, ConfigProperty.class); if (configProperty == null) { throw new IllegalStateException("producer method called without @ConfigProperty being present!"); } String configuredValue; String defaultValue = configProperty.defaultValue(); configuredValue = getPropertyValue(configProperty.name(), defaultValue); return configuredValue; }
protected <T> T getUntypedPropertyValue(InjectionPoint injectionPoint, Type ipCls) { ConfigProperty configProperty = getAnnotation(injectionPoint, ConfigProperty.class); if (configProperty == null) { throw new IllegalStateException("producer method called without @ConfigProperty being present!"); } return readEntry(configProperty.name(), configProperty.defaultValue(), ipCls, configProperty.converter(), configProperty.parameterizedBy(), configProperty.projectStageAware(), configProperty.evaluateVariables()); }
protected <T> T getUntypedPropertyValue(InjectionPoint injectionPoint, Type ipCls) { ConfigProperty configProperty = getAnnotation(injectionPoint, ConfigProperty.class); if (configProperty == null) { throw new IllegalStateException("producer method called without @ConfigProperty being present!"); } return readEntry(configProperty.name(), configProperty.defaultValue(), ipCls, configProperty.converter(), configProperty.parameterizedBy(), configProperty.projectStageAware(), configProperty.evaluateVariables()); }
final String defaultValue = annotation.defaultValue(); ConfigResolver.TypedResolver<?> typedResolver = delegate.asResolver( prefix + annotation.name(), list || set ? ConfigProperty.NULL : defaultValue,