private void processLocalConverterAnnotation(final Field field) { final XStreamConverter annotation = field.getAnnotation(XStreamConverter.class); if (annotation != null) { final Converter converter = cacheConverter(annotation, field.getType()); if (converter != null) { if (localConversionMapper == null) { throw new InitializationException("No " + LocalConversionMapper.class.getName() + " available"); } localConversionMapper.registerLocalConverter( field.getDeclaringClass(), field.getName(), converter); } } }
private void processConverterAnnotations(final Class<?> type) { if (converterRegistry != null) { final XStreamConverters convertersAnnotation = type .getAnnotation(XStreamConverters.class); final XStreamConverter converterAnnotation = type .getAnnotation(XStreamConverter.class); final List<XStreamConverter> annotations = convertersAnnotation != null ? new ArrayList<XStreamConverter>(Arrays.asList(convertersAnnotation.value())) : new ArrayList<XStreamConverter>(); if (converterAnnotation != null) { annotations.add(converterAnnotation); } for (final XStreamConverter annotation : annotations) { final Converter converter = cacheConverter( annotation, converterAnnotation != null ? type : null); if (converter != null) { if (converterAnnotation != null || converter.canConvert(type)) { converterRegistry.registerConverter(converter, annotation.priority()); } else { throw new InitializationException("Converter " + annotation.value().getName() + " cannot handle annotated class " + type.getName()); } } } } }
private void processLocalConverterAnnotation(final Field field) { final XStreamConverter annotation = field.getAnnotation(XStreamConverter.class); if (annotation != null) { final Converter converter = cacheConverter(annotation, field.getType()); if (converter != null) { if (localConversionMapper == null) { throw new InitializationException("No " + LocalConversionMapper.class.getName() + " available"); } localConversionMapper.registerLocalConverter(field.getDeclaringClass(), field.getName(), converter); } } }
private void processLocalConverterAnnotation(final Field field) { final XStreamConverter annotation = field.getAnnotation(XStreamConverter.class); if (annotation != null) { final Converter converter = cacheConverter(annotation, field.getType()); if (converter != null) { if (localConversionMapper == null) { throw new InitializationException("No " + LocalConversionMapper.class.getName() + " available"); } localConversionMapper.registerLocalConverter( field.getDeclaringClass(), field.getName(), converter); } } }
private void processLocalConverterAnnotation(final Field field) { final XStreamConverter annotation = field.getAnnotation(XStreamConverter.class); if (annotation != null) { final Converter converter = cacheConverter(annotation, field.getType()); if (converter != null) { if (localConversionMapper == null) { throw new InitializationException("No " + LocalConversionMapper.class.getName() + " available"); } localConversionMapper.registerLocalConverter( field.getDeclaringClass(), field.getName(), converter); } } }
private void processLocalConverterAnnotation(final Field field) { final XStreamConverter annotation = field.getAnnotation(XStreamConverter.class); if (annotation != null) { final Converter converter = cacheConverter(annotation, field.getType()); if (converter != null) { if (localConversionMapper == null) { throw new InitializationException("No " + LocalConversionMapper.class.getName() + " available"); } localConversionMapper.registerLocalConverter( field.getDeclaringClass(), field.getName(), converter); } } }
private void processLocalConverterAnnotation(final Field field) { final XStreamConverter annotation = field.getAnnotation(XStreamConverter.class); if (annotation != null) { final Converter converter = cacheConverter(annotation, field.getType()); if (converter != null) { if (localConversionMapper == null) { throw new InitializationException("No " + LocalConversionMapper.class.getName() + " available"); } localConversionMapper.registerLocalConverter( field.getDeclaringClass(), field.getName(), converter); } } }
private void processLocalConverterAnnotation(final Field field) { final XStreamConverter annotation = field.getAnnotation(XStreamConverter.class); if (annotation != null) { final Converter converter = cacheConverter(annotation, field.getType()); if (converter != null) { if (localConversionMapper == null) { throw new InitializationException("No " + LocalConversionMapper.class.getName() + " available"); } localConversionMapper.registerLocalConverter( field.getDeclaringClass(), field.getName(), converter); } } }
private void processLocalConverterAnnotation(final Field field) { final XStreamConverter annotation = field.getAnnotation(XStreamConverter.class); if (annotation != null) { final Class<? extends ConverterMatcher> converterType = annotation.value(); final Converter converter = cacheConverter(converterType); if (converter != null) { if (localConversionMapper == null) { throw new InitializationException("No " + LocalConversionMapper.class.getName() + " available"); } localConversionMapper.registerLocalConverter(field.getDeclaringClass(), field .getName(), converter); } } }
private void processLocalConverterAnnotation(final Field field) { final XStreamConverter annotation = field.getAnnotation(XStreamConverter.class); if (annotation != null) { final Class<? extends ConverterMatcher> converterType = annotation.value(); final Converter converter = cacheConverter(converterType); if (converter != null) { if (localConversionMapper == null) { throw new InitializationException("No " + LocalConversionMapper.class.getName() + " available"); } localConversionMapper.registerLocalConverter(field.getDeclaringClass(), field .getName(), converter); } } }
private void processConverterAnnotations(final Class<?> type) { if (converterRegistry != null) { final XStreamConverters convertersAnnotation = type .getAnnotation(XStreamConverters.class); final XStreamConverter converterAnnotation = type .getAnnotation(XStreamConverter.class); final List<XStreamConverter> annotations = convertersAnnotation != null ? new ArrayList<XStreamConverter>(Arrays.asList(convertersAnnotation.value())) : new ArrayList<XStreamConverter>(); if (converterAnnotation != null) { annotations.add(converterAnnotation); } for (final XStreamConverter annotation : annotations) { final Class<? extends ConverterMatcher> converterType = annotation.value(); final Converter converter = cacheConverter(converterType); if (converter != null) { if (converterAnnotation != null || converter.canConvert(type)) { converterRegistry.registerConverter(converter, XStream.PRIORITY_NORMAL); } else { throw new InitializationException("Converter " + converterType.getName() + " cannot handle annotated class " + type.getName()); } } } } }
private void processConverterAnnotations(final Class<?> type) { if (converterRegistry != null) { final XStreamConverters convertersAnnotation = type.getAnnotation(XStreamConverters.class); final XStreamConverter converterAnnotation = type.getAnnotation(XStreamConverter.class); final List<XStreamConverter> annotations = convertersAnnotation != null ? new ArrayList<XStreamConverter>(Arrays.asList(convertersAnnotation.value())) : new ArrayList<XStreamConverter>(); if (converterAnnotation != null) { annotations.add(converterAnnotation); } for (final XStreamConverter annotation : annotations) { final Converter converter = cacheConverter(annotation, converterAnnotation != null ? type : null); if (converter != null) { if (converterAnnotation != null || converter.canConvert(type)) { converterRegistry.registerConverter(converter, annotation.priority()); } else { throw new InitializationException("Converter " + annotation.value().getName() + " cannot handle annotated class " + type.getName()); } } } } }
private void processConverterAnnotations(final Class<?> type) { if (converterRegistry != null) { final XStreamConverters convertersAnnotation = type .getAnnotation(XStreamConverters.class); final XStreamConverter converterAnnotation = type .getAnnotation(XStreamConverter.class); final List<XStreamConverter> annotations = convertersAnnotation != null ? new ArrayList<XStreamConverter>(Arrays.asList(convertersAnnotation.value())) : new ArrayList<XStreamConverter>(); if (converterAnnotation != null) { annotations.add(converterAnnotation); } for (final XStreamConverter annotation : annotations) { final Class<? extends ConverterMatcher> converterType = annotation.value(); final Converter converter = cacheConverter(converterType); if (converter != null) { if (converterAnnotation != null || converter.canConvert(type)) { converterRegistry.registerConverter(converter, XStream.PRIORITY_NORMAL); } else { throw new InitializationException("Converter " + converterType.getName() + " cannot handle annotated class " + type.getName()); } } } } }
private void processConverterAnnotations(final Class<?> type) { if (converterRegistry != null) { final XStreamConverters convertersAnnotation = type .getAnnotation(XStreamConverters.class); final XStreamConverter converterAnnotation = type .getAnnotation(XStreamConverter.class); final List<XStreamConverter> annotations = convertersAnnotation != null ? new ArrayList<XStreamConverter>(Arrays.asList(convertersAnnotation.value())) : new ArrayList<XStreamConverter>(); if (converterAnnotation != null) { annotations.add(converterAnnotation); } for (final XStreamConverter annotation : annotations) { final Converter converter = cacheConverter( annotation, converterAnnotation != null ? type : null); if (converter != null) { if (converterAnnotation != null || converter.canConvert(type)) { converterRegistry.registerConverter(converter, annotation.priority()); } else { throw new InitializationException("Converter " + annotation.value().getName() + " cannot handle annotated class " + type.getName()); } } } } }
private void processConverterAnnotations(final Class<?> type) { if (converterRegistry != null) { final XStreamConverters convertersAnnotation = type .getAnnotation(XStreamConverters.class); final XStreamConverter converterAnnotation = type .getAnnotation(XStreamConverter.class); final List<XStreamConverter> annotations = convertersAnnotation != null ? new ArrayList<XStreamConverter>(Arrays.asList(convertersAnnotation.value())) : new ArrayList<XStreamConverter>(); if (converterAnnotation != null) { annotations.add(converterAnnotation); } for (final XStreamConverter annotation : annotations) { final Converter converter = cacheConverter( annotation, converterAnnotation != null ? type : null); if (converter != null) { if (converterAnnotation != null || converter.canConvert(type)) { converterRegistry.registerConverter(converter, annotation.priority()); } else { throw new InitializationException("Converter " + annotation.value().getName() + " cannot handle annotated class " + type.getName()); } } } } }
private void processConverterAnnotations(final Class<?> type) { if (converterRegistry != null) { final XStreamConverters convertersAnnotation = type .getAnnotation(XStreamConverters.class); final XStreamConverter converterAnnotation = type .getAnnotation(XStreamConverter.class); final List<XStreamConverter> annotations = convertersAnnotation != null ? new ArrayList<XStreamConverter>(Arrays.asList(convertersAnnotation.value())) : new ArrayList<XStreamConverter>(); if (converterAnnotation != null) { annotations.add(converterAnnotation); } for (final XStreamConverter annotation : annotations) { final Converter converter = cacheConverter( annotation, converterAnnotation != null ? type : null); if (converter != null) { if (converterAnnotation != null || converter.canConvert(type)) { converterRegistry.registerConverter(converter, annotation.priority()); } else { throw new InitializationException("Converter " + annotation.value().getName() + " cannot handle annotated class " + type.getName()); } } } } }
private void processConverterAnnotations(final Class<?> type) { if (converterRegistry != null) { final XStreamConverters convertersAnnotation = type .getAnnotation(XStreamConverters.class); final XStreamConverter converterAnnotation = type .getAnnotation(XStreamConverter.class); final List<XStreamConverter> annotations = convertersAnnotation != null ? new ArrayList<XStreamConverter>(Arrays.asList(convertersAnnotation.value())) : new ArrayList<XStreamConverter>(); if (converterAnnotation != null) { annotations.add(converterAnnotation); } for (final XStreamConverter annotation : annotations) { final Converter converter = cacheConverter( annotation, converterAnnotation != null ? type : null); if (converter != null) { if (converterAnnotation != null || converter.canConvert(type)) { converterRegistry.registerConverter(converter, annotation.priority()); } else { throw new InitializationException("Converter " + annotation.value().getName() + " cannot handle annotated class " + type.getName()); } } } } }
private void processConverterAnnotations(final Class<?> type) { if (converterRegistry != null) { final XStreamConverters convertersAnnotation = type .getAnnotation(XStreamConverters.class); final XStreamConverter converterAnnotation = type .getAnnotation(XStreamConverter.class); final List<XStreamConverter> annotations = convertersAnnotation != null ? new ArrayList<XStreamConverter>(Arrays.asList(convertersAnnotation.value())) : new ArrayList<XStreamConverter>(); if (converterAnnotation != null) { annotations.add(converterAnnotation); } for (final XStreamConverter annotation : annotations) { final Converter converter = cacheConverter( annotation, converterAnnotation != null ? type : null); if (converter != null) { if (converterAnnotation != null || converter.canConvert(type)) { converterRegistry.registerConverter(converter, annotation.priority()); } else { throw new InitializationException("Converter " + annotation.value().getName() + " cannot handle annotated class " + type.getName()); } } } } }