Refine search
@XStreamAlias("item") public static class Item { @XStreamAlias("PicMd5Sum") @XStreamConverter(value=XStreamCDataConverter.class) private String picMd5Sum; public String getPicMd5Sum() { return picMd5Sum; } public void setPicMd5Sum(String picMd5Sum) { this.picMd5Sum = picMd5Sum; } } }
final Object[] args; final List<Object> parameter = new ArrayList<Object>(); if (targetType != null && annotation.useImplicitType()) { parameter.add(targetType); arrays.add(annotation.booleans()); arrays.add(annotation.bytes()); arrays.add(annotation.chars()); arrays.add(annotation.doubles()); arrays.add(annotation.floats()); arrays.add(annotation.ints()); arrays.add(annotation.longs()); arrays.add(annotation.shorts()); arrays.add(annotation.strings()); arrays.add(annotation.types()); for(Object array : arrays) { if (array != null) { for (final Class<?> type : annotation.nulls()) { final TypedNull nullType = new TypedNull(type); parameter.add(nullType); final Class<? extends ConverterMatcher> converterType = annotation.value(); Map<List<Object>, Converter> converterMapping = converterCache.get(converterType); if (converterMapping != null) {
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()); } } } } }
public static class TestHardSoftLongScoreWrapper extends TestScoreWrapper<HardSoftLongScore> { @XStreamConverter(HardSoftLongScoreXStreamConverter.class) private HardSoftLongScore score; public TestHardSoftLongScoreWrapper(HardSoftLongScore score) { this.score = score; } @Override public HardSoftLongScore getScore() { return score; } }
protected void marshallField(final MarshallingContext context, Object newObj, Field field) { XStreamConverter annotation = annotationProvider.getAnnotation( field, XStreamConverter.class); if (annotation != null) { Class<? extends ConverterMatcher> type = annotation.value(); ensureCache(type); context.convertAnother(newObj, cachedConverters.get(type)); } else { context.convertAnother(newObj); } }
public static class TestSimpleDoubleScoreWrapper extends TestScoreWrapper<SimpleDoubleScore> { @XStreamConverter(SimpleDoubleScoreXStreamConverter.class) private SimpleDoubleScore score; public TestSimpleDoubleScoreWrapper(SimpleDoubleScore score) { this.score = score; } @Override public SimpleDoubleScore getScore() { return score; } }
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()); } } } } }
protected Object unmarshallField( final UnmarshallingContext context, final Object result, Class type, Field field) { XStreamConverter annotation = annotationProvider.getAnnotation( field, XStreamConverter.class); if (annotation != null) { Class<? extends Converter> converterType = (Class<? extends Converter>)annotation.value(); ensureCache(converterType); return context.convertAnother(result, type, cachedConverters.get(converterType)); } else { return context.convertAnother(result, type); } }
@XStreamAlias("TransInfo") public static class TransInfo { @XStreamAlias("KfAccount") @XStreamConverter(value=XStreamCDataConverter.class) private String kfAccount; public String getKfAccount() { return kfAccount; } public void setKfAccount(String kfAccount) { this.kfAccount = kfAccount; } } }
final Object[] args; final List<Object> parameter = new ArrayList<Object>(); if (targetType != null && annotation.useImplicitType()) { parameter.add(targetType); arrays.add(annotation.booleans()); arrays.add(annotation.bytes()); arrays.add(annotation.chars()); arrays.add(annotation.doubles()); arrays.add(annotation.floats()); arrays.add(annotation.ints()); arrays.add(annotation.longs()); arrays.add(annotation.shorts()); arrays.add(annotation.strings()); arrays.add(annotation.types()); for(Object array : arrays) { if (array != null) { for (final Class<?> type : annotation.nulls()) { final TypedNull nullType = new TypedNull(type); parameter.add(nullType); final Class<? extends ConverterMatcher> converterType = annotation.value(); Map<List<Object>, Converter> converterMapping = converterCache.get(converterType); if (converterMapping != null) {
public static class TestSimpleScoreWrapper extends TestScoreWrapper<SimpleScore> { @XStreamConverter(SimpleScoreXStreamConverter.class) private SimpleScore score; public TestSimpleScoreWrapper(SimpleScore score) { this.score = score; } @Override public SimpleScore getScore() { return score; } }
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 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); } } }
@XStreamAlias("item") public static class Item { @XStreamAlias("PicMd5Sum") @XStreamConverter(value=XStreamCDataConverter.class) private String PicMd5Sum; public String getPicMd5Sum() { return PicMd5Sum; } public void setPicMd5Sum(String picMd5Sum) { PicMd5Sum = picMd5Sum; } } }
final Object[] args; final List<Object> parameter = new ArrayList<>(); if (targetType != null && annotation.useImplicitType()) { parameter.add(targetType); arrays.add(annotation.booleans()); arrays.add(annotation.bytes()); arrays.add(annotation.chars()); arrays.add(annotation.doubles()); arrays.add(annotation.floats()); arrays.add(annotation.ints()); arrays.add(annotation.longs()); arrays.add(annotation.shorts()); arrays.add(annotation.strings()); arrays.add(annotation.types()); for (final Object array : arrays) { if (array != null) { for (final Class<?> type : annotation.nulls()) { final TypedNull<?> nullType = new TypedNull<>(type); parameter.add(nullType); final Class<? extends ConverterMatcher> converterType = annotation.value(); Map<List<Object>, Converter> converterMapping = converterCache.get(converterType); if (converterMapping != null) {
public static class TestBendableLongScoreWrapper extends TestScoreWrapper<BendableLongScore> { @XStreamConverter(BendableLongScoreXStreamConverter.class) private BendableLongScore score; public TestBendableLongScoreWrapper(BendableLongScore score) { this.score = score; } @Override public BendableLongScore getScore() { return score; } }
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 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); } } }
@XStreamAlias("xml") public class WxCpXmlOutTextMessage extends WxCpXmlOutMessage { @XStreamAlias("Content") @XStreamConverter(value=XStreamCDataConverter.class) private String content; public WxCpXmlOutTextMessage() { this.msgType = WxConsts.XML_MSG_TEXT; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } }
arrays.add(annotation.booleans()); arrays.add(annotation.bytes()); arrays.add(annotation.chars()); arrays.add(annotation.doubles()); arrays.add(annotation.floats()); arrays.add(annotation.ints()); arrays.add(annotation.longs()); arrays.add(annotation.shorts()); arrays.add(annotation.strings()); arrays.add(annotation.types()); for(Object array : arrays) { if (array != null) { final Class<? extends ConverterMatcher> converterType = annotation.value(); Map<List<Object>, Converter> converterMapping = converterCache.get(converterType); if (converterMapping != null) {