@Override public boolean remapsToProperty() { return !remapsToCapability(); }
@Override public boolean remapsToCapability() { return !remapsToProperty(); }
public static boolean remapsToCapability(String propertyName) { return !remapsToProperty(propertyName); }
static <T extends DroneConfiguration<T>> Field injectField(T configuration, List<Field> maps, Map<String, Field> fields, String fieldName, String value) { try { Field f = fields.get(fieldName); if (f.getAnnotation(Deprecated.class) != null) { log.log(Level.WARNING, "The property \"{0}\" used in Arquillian \"{1}\" configuration is deprecated.", new Object[] {f.getName(), configuration.getConfigurationName()}); } // remap the property into capability if this is a legacy one // or remap the property into different property field if (LegacyConfigurationMapper.isLegacy(fieldName)) { String newKey = LegacyConfigurationMapper.remapKey(fieldName); String newValue = LegacyConfigurationMapper.remapValue(fieldName, value); if (LegacyConfigurationMapper.remapsToCapability(fieldName)) { injectMapProperty(configuration, maps, fields, newKey, newValue); } else { injectField(configuration, maps, fields, newKey, newValue); } } f.set(configuration, convert(f.getType(), value)); return f; } catch (Exception e) { throw new RuntimeException( "Could not map Drone configuration(" + configuration.getConfigurationName() + ") for " + configuration.getClass().getName() + " from Arquillian Descriptor", e); } }
public static String remapValue(String propertyKey, String propertyValue) { if (isLegacy(propertyValue)) { return LEGACY_MAP.get(propertyKey).remapValue(propertyValue); } // return original value return propertyValue; }
@Override public String remapValue(String value) { log.log(Level.WARNING, loggingMessage); return super.remapValue(value); } }
private static boolean remapsToProperty(String propertyName) { LegacyMapping mapping = LEGACY_MAP.get(propertyName); if (mapping == null) { throw new IllegalStateException("Legacy mapping for property name " + propertyName + " is not defined."); } return mapping.remapsToProperty(); }
else if (fields.containsKey(reversedName) && !LegacyConfigurationMapper.isLegacy(reversedName)) {
static <T extends DroneConfiguration<T>> Field injectField(T configuration, List<Field> maps, Map<String, Field> fields, String fieldName, String value) { try { Field f = fields.get(fieldName); if (f.getAnnotation(Deprecated.class) != null) { log.log(Level.WARNING, "The property \"{0}\" used in Arquillian \"{1}\" configuration is deprecated.", new Object[] {f.getName(), configuration.getConfigurationName()}); } // remap the property into capability if this is a legacy one // or remap the property into different property field if (LegacyConfigurationMapper.isLegacy(fieldName)) { String newKey = LegacyConfigurationMapper.remapKey(fieldName); String newValue = LegacyConfigurationMapper.remapValue(fieldName, value); if (LegacyConfigurationMapper.remapsToCapability(fieldName)) { injectMapProperty(configuration, maps, fields, newKey, newValue); } else { injectField(configuration, maps, fields, newKey, newValue); } } f.set(configuration, convert(f.getType(), value)); return f; } catch (Exception e) { throw new RuntimeException( "Could not map Drone configuration(" + configuration.getConfigurationName() + ") for " + configuration.getClass().getName() + " from Arquillian Descriptor", e); } }
public static String remapValue(String propertyKey, String propertyValue) { if (isLegacy(propertyValue)) { return LEGACY_MAP.get(propertyKey).remapValue(propertyValue); } // return original value return propertyValue; }
@Override public boolean remapsToProperty() { return !remapsToCapability(); }
@Override public boolean remapsToCapability() { return !remapsToProperty(); }
public static boolean remapsToCapability(String propertyName) { return !remapsToProperty(propertyName); }
@Override public String remapValue(String value) { log.log(Level.WARNING, loggingMessage); return super.remapValue(value); } }
private static boolean remapsToProperty(String propertyName) { LegacyMapping mapping = LEGACY_MAP.get(propertyName); if (mapping == null) { throw new IllegalStateException("Legacy mapping for property name " + propertyName + " is not defined."); } return mapping.remapsToProperty(); }
else if (fields.containsKey(reversedName) && !LegacyConfigurationMapper.isLegacy(reversedName)) {