config-caf/src/main/java/com/hpe/caf/api/CafConfigurationSource.java
@Override
    public final <T> T getConfiguration(final Class<T> configClass)
        throws ConfigurationException
    {
        Objects.requireNonNull(configClass);
        incrementRequests();
        T config = getCompleteConfig(configClass);
        Set<ConstraintViolation<T>> violations = getValidator().validate(config);
        if (violations.isEmpty()) {
            return config;
        } else {
            incrementErrors();
            LOG.error("Configuration constraint violations found for {}: {}", configClass.getSimpleName(), violations);
            throw new ConfigurationException("Configuration validation failed for " + configClass.getSimpleName());
        }
    }
@Override
    public final <T> T getConfiguration(final Class<T> configClass)
        throws ConfigurationException
    {
        Objects.requireNonNull(configClass);
        incrementRequests();
        T config = getCompleteConfig(configClass);
        Set<ConstraintViolation<T>> violations = getValidator().validate(config);
        if (violations.isEmpty()) {
            return config;
        } else {
            incrementErrors();
            LOG.error("Configuration constraint violations found for {}: {}", configClass.getSimpleName(), violations);
            throw new ConfigurationException("Configuration validation failed for " + configClass.getSimpleName());
        }
    }
@ Override public final < T > T getConfiguration ( final Class < T > configClass ) throws ConfigurationException { Objects . requireNonNull ( configClass ) ; incrementRequests ( ) ; T config = getCompleteConfig ( configClass ) ; Set < ConstraintViolation < T > > violations = getValidator ( ) . validate ( config ) ; if ( violations . isEmpty ( ) ) { return config ; } else { incrementErrors ( ) ; LOG . error ( "Configuration constraint violations found for {}: {}" , configClass . getSimpleName ( ) , violations ) ; throw new ConfigurationException ( "Configuration validation failed for " + configClass . getSimpleName ( ) ) ; } }
Acquire a configuration class from the provider. The requested class will be a simple Java object that when returned, and can be
interacted with using getters and other standard mechanisms. Configuration classes may themselves contain other configuration
objects, which will be recursively acquired if marked @Configuration. Any fields marked @Encrypted will be decrypted, any fields
marked and any validation annotations will be processed.

@param configClass the class that represents your configuration
@param <T> the class that represents your configuration
@return the configuration class requested, if it can be deserialised
@throws ConfigurationException if the configuration class cannot be acquired or deserialised
Acquire a configuration class from the provider . The requested class will be a simple Java object that when returned and can be interacted with using getters and other standard mechanisms . Configuration classes may themselves contain other configuration objects which will be recursively acquired if marked @Configuration . Any fields marked @Encrypted will be decrypted any fields marked and any validation annotations will be processed .