Examples of ToStringConverter


Examples of com.thoughtworks.xstream.converters.extended.ToStringConverter

   
     xstream.registerConverter(new CalendarConverter(), XStream.PRIORITY_VERY_HIGH);
    
     try
    {
      xstream.registerConverter(new ToStringConverter(GpsCoordinate.class), XStream.PRIORITY_VERY_HIGH);
       xstream.registerConverter(new ToStringConverter(GpsBox.class), XStream.PRIORITY_VERY_HIGH);
       xstream.registerConverter(new ToStringConverter(WhereOnEarthId.class), XStream.PRIORITY_VERY_HIGH);
       xstream.registerConverter(new ToStringConverter(PlaceId.class), XStream.PRIORITY_VERY_HIGH);
    }
     catch (NoSuchMethodException e)
    {
      throw new RuntimeException(e);
    }
View Full Code Here

Examples of com.thoughtworks.xstream.converters.extended.ToStringConverter

        xstream.alias("collections", SampleLists.class);
        xstream.alias("x", X.class);
        xstream.alias("ys", YString.class);
        xstream.useAttributeFor(OpenSourceSoftware.class, "license");
        try {
            xstream.registerConverter(new ToStringConverter(YString.class));
        } catch (NoSuchMethodException e) {
            throw new AssertionFailedError(e.getMessage());
        }
    }
View Full Code Here

Examples of ma.glasnost.orika.converter.builtin.ToStringConverter

  }
 
  @Test
  public void testToString() {
    MapperFactory factory = MappingUtil.getMapperFactory();
    factory.getConverterFactory().registerConverter(new ToStringConverter());
    MapperFacade mapper = factory.getMapperFacade();
   
    Date now = new Date();
    String string = mapper.map(now, String.class);
    Assert.assertEquals(now.toString(), string);
View Full Code Here

Examples of org.gocha.types.ToStringConverter

                    getProperty = true;
                }
            }
            if( !getProperty )continue;

            ToStringConverter conv = convertors.toStringFrom(vc.getType());
            if( conv==null )continue;

            try{
                Object objValue = vc.getValue();
                if( objValue==null )continue;

                String key = propertyPrefix==null ? propName : propertyPrefix + propName;
                String textValue = conv.convertToString(objValue);
                if( textValue==null )continue;

                setProperty(key, textValue);
            }catch(Throwable e){
                Logger.getLogger(GuiKeeper.class.getName()).log(Level.WARNING,null,e);
View Full Code Here

Examples of org.gocha.types.ToStringConverter

                    getProperty = true;
                }
            }
            if( !getProperty )continue;

            ToStringConverter conv = convertors.toStringFrom(vc.getType());
            if( conv==null )continue;

            try{
                Object objValue = vc.getValue();
                if( objValue==null )continue;

                String key = propertyPrefix==null ? propName : propertyPrefix + propName;
                String textValue = conv.convertToString(objValue);
                if( textValue==null )continue;

                setProperty(key, textValue);
            }catch(Throwable e){
                Logger.getLogger(GuiKeeper.class.getName()).log(Level.WARNING,null,e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.