public static Mapping getMapping(KeyInformation information) { Object value = ParameterType.MAPPING.findParameter(information.getParameters(),null); if (value==null) return DEFAULT; else { Preconditions.checkArgument((value instanceof Mapping || value instanceof String),"Invalid mapping specified: %s",value); if (value instanceof String) { value = Mapping.valueOf(value.toString().toUpperCase()); } return (Mapping)value; } }
public static Mapping getMapping(KeyInformation information) { Object value = ParameterType.MAPPING.findParameter(information.getParameters(),null); if (value==null) return DEFAULT; else { Preconditions.checkArgument((value instanceof Mapping || value instanceof String),"Invalid mapping specified: %s",value); if (value instanceof String) { value = Mapping.valueOf(value.toString().toUpperCase()); } return (Mapping)value; } }
public static Mapping getMapping(KeyInformation information) { Object value = ParameterType.MAPPING.findParameter(information.getParameters(),null); if (value==null) return DEFAULT; else { Preconditions.checkArgument((value instanceof Mapping || value instanceof String),"Invalid mapping specified: %s",value); if (value instanceof String) { value = Mapping.valueOf(value.toString().toUpperCase()); } return (Mapping)value; } }