/** * Get an array of boolean primitives associated with the given * configuration key. If the key doesn't map to an existing object * an empty array is returned. * * @param key The configuration key. * @return The associated boolean array if the key is found. * * @throws ConversionException is thrown if the key maps to an * object that is not a list of booleans. */ public boolean[] getBooleanArray(final String key) { return (boolean[]) getArray(Boolean.TYPE, key); }
@Override public Object getValue(String prefix, String key, Field field, Configuration configuration) throws DemoiselleConfigurationValueExtractorException { try{ return new DataConfiguration(configuration).getArray(field.getType().getComponentType(), prefix + key); } catch(Exception e){ throw new DemoiselleConfigurationValueExtractorException(e.getMessage(), e); } }