Package org.apache.deltaspike.core.api.config.annotation

Examples of org.apache.deltaspike.core.api.config.annotation.ConfigProperty


     * @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;
    }
View Full Code Here


        {
            return Integer.parseInt(configuredValue);
        }
        catch (NumberFormatException nfe)
        {
            ConfigProperty configProperty = getAnnotation(injectionPoint, ConfigProperty.class);
            throw new RuntimeException("Error while converting Integer property '" + configProperty.name() +
                    "' value: " + configuredValue + " happening in bean " + injectionPoint.getBean() , nfe);
        }

    }
View Full Code Here

        {
            return Long.parseLong(configuredValue);
        }
        catch (NumberFormatException nfe)
        {
            ConfigProperty configProperty = getAnnotation(injectionPoint, ConfigProperty.class);
            throw new RuntimeException("Error while converting Long property '" + configProperty.name() +
                    "' value: " + configuredValue + " happening in bean " + injectionPoint.getBean() , nfe);
        }
    }
View Full Code Here

        {
            return Float.parseFloat(configuredValue);
        }
        catch (NumberFormatException nfe)
        {
            ConfigProperty configProperty = getAnnotation(injectionPoint, ConfigProperty.class);
            throw new RuntimeException("Error while converting Float property '" + configProperty.name() +
                    "' value: " + configuredValue + " happening in bean " + injectionPoint.getBean() , nfe);
        }

    }
View Full Code Here

TOP

Related Classes of org.apache.deltaspike.core.api.config.annotation.ConfigProperty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.