001
014
015 package com.liferay.portal.lar.xstream;
016
017 import com.liferay.portal.kernel.lar.xstream.XStreamConverter;
018 import com.liferay.portal.kernel.lar.xstream.XStreamUnmarshallingContext;
019
020 import com.thoughtworks.xstream.converters.UnmarshallingContext;
021
022
025 public class XStreamUnmarshallingContextAdapter
026 implements XStreamUnmarshallingContext {
027
028 public XStreamUnmarshallingContextAdapter(
029 UnmarshallingContext unmarshallingContext) {
030
031 _unmarshallingContext = unmarshallingContext;
032 }
033
034 @Override
035 public void addCompletionCallback(Runnable work, int priority) {
036 _unmarshallingContext.addCompletionCallback(work, priority);
037 }
038
039 @Override
040 public Object convertAnother(Object object, Class<?> clazz) {
041 return _unmarshallingContext.convertAnother(object, clazz);
042 }
043
044 @Override
045 public Object convertAnother(
046 Object object, Class<?> clazz, XStreamConverter xStreamConverter) {
047
048 return _unmarshallingContext.convertAnother(
049 object, clazz, new ConverterAdapter(xStreamConverter));
050 }
051
052 @Override
053 public Object currentObject() {
054 return _unmarshallingContext.currentObject();
055 }
056
057 @Override
058 public Object getRequiredType() {
059 return _unmarshallingContext.getRequiredType();
060 }
061
062 private final UnmarshallingContext _unmarshallingContext;
063
064 }