private GeneralParameterValue[] buildFootprintBandParams( FootprintBehavior footprintBehavior, int[] bands) { final List<ParameterValue<?>> parameters = new ArrayList<ParameterValue<?>>(); parameters.add( new DefaultParameterDescriptor<>( AbstractGridFormat.FOOTPRINT_BEHAVIOR.getName().toString(), AbstractGridFormat.FOOTPRINT_BEHAVIOR.getValueClass(), null, footprintBehavior.name()) .createValue()); parameters.add( new DefaultParameterDescriptor<>( AbstractGridFormat.BANDS.getName().toString(), AbstractGridFormat.BANDS.getValueClass(), null, bands) .createValue()); return (GeneralParameterValue[]) parameters.toArray(new GeneralParameterValue[parameters.size()]); }
Class valueClass = descriptor.getValueClass(); if (descriptor.getValueClass().isEnum()) { List<? extends Serializable> values = Arrays.stream(descriptor.getValueClass().getEnumConstants()) .map(v -> ((Enum) v).name()) .collect(Collectors.toList()); if (Serializable.class.isAssignableFrom(descriptor.getValueClass()) && validValues != null && !validValues.isEmpty()) {