Package org.pallewela.dynaprops.DynamicProperties

Examples of org.pallewela.dynaprops.DynamicProperties.DefaultValue


    @Override
    public <T extends DynamicProperties> void load(Config<T> config, PropertiesCache cache) {
        Class<T> propsClass = config.getPropertiesClass();
        for (Method method : propsClass.getDeclaredMethods()) {
            DefaultValue defaultValueAnnotation = method.getAnnotation(DefaultValue.class);

            if (defaultValueAnnotation != null) {
                String defaultValue = defaultValueAnnotation.value();
                try {
                    cache.put(method, defaultValue);
                } catch (PropertyNotExistException ex) {
                    LOGGER.log(Level.SEVERE, "Error in PropertiesCache.java", ex);
                    throw new RuntimeException("Error in PropertiesCache.java", ex);
View Full Code Here

TOP

Related Classes of org.pallewela.dynaprops.DynamicProperties.DefaultValue

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.