Examples of convert()


Examples of org.springframework.core.serializer.support.SerializingConverter.convert()

public class SerializationConverterTests {

  @Test
  public void serializeAndDeserializeString() {
    SerializingConverter toBytes = new SerializingConverter();
    byte[] bytes = toBytes.convert("Testing");
    DeserializingConverter fromBytes = new DeserializingConverter();
    assertEquals("Testing", fromBytes.convert(bytes));
  }

  @Test
View Full Code Here

Examples of org.springframework.format.support.FormattingConversionService.convert()

  public void shouldLoadConverter() throws Exception {
    FormattingConversionServiceFactoryBean bean = this.applicationContext
        .getBean(FormattingConversionServiceFactoryBean.class);
    FormattingConversionService conversionService = bean.getObject();
    TypeDescriptor targetType = TypeDescriptor.valueOf(ClassWithConverter.class);
    assertThat(conversionService.convert(this.source, this.sourceType, targetType), is(equalTo(this.converted)));
  }
}
View Full Code Here

Examples of org.sql2o.converters.Converter.convert()

            } catch (ConverterException e) {
                throw new Sql2oException("Cannot convert column " + propertyPath + " to type " + getter.getType(), e);
            }

            try {
                return converter.convert(getter.getProperty(this.object));
            } catch (ConverterException e) {
                throw new Sql2oException("Error trying to convert column " + propertyPath + " to type " + getter.getType(), e);
            }
        }
    }
View Full Code Here

Examples of org.structr.core.converter.PropertyConverter.convert()

                  Object convertedValue = val;

                  PropertyConverter inputConverter = propertyKey.inputConverter(SecurityContext.getSuperUserInstance());
                  if (inputConverter != null) {

                    convertedValue = inputConverter.convert(val);
                  }

                  //newNode.unlockReadOnlyPropertiesOnce();
                  newNode.setProperty(propertyKey, convertedValue);
View Full Code Here

Examples of org.swixml.Converter.convert()

      Object[] args = new Object[n];
      for (int i = 0; i < n; i++) { // fill argument array
        Converter converter = cvtlib.getConverter(method.getParameterTypes()[i]);
        Attribute attrib = new Attribute(String.class.equals(converter.convertsTo()) ? "title" : "NA", st.nextToken().trim());
        if (converter != null) {
          args[i] = converter.convert(method.getParameterTypes()[i], attrib, localizer);
        } else {
          args[i] = attrib.getValue();
        }
      }
      border = (Border) method.invoke(null, args);
View Full Code Here

Examples of org.testng.internal.AnnotationDirectoryConverter.convert()

      TestNG.exitWithError("One of -d and --overwrite options is required");
    }

    File outFile= overwrite ? null : new File((String) params.get(OUT_DIR_OPT));
    AnnotationDirectoryConverter convertor= new AnnotationDirectoryConverter(new File(srcPath), outFile);
    int result= convertor.convert();

    switch(result) {
      case -1: {
        log("Generation failed. Consult messages.");
View Full Code Here

Examples of org.testng.junit.JUnitDirectoryConverter.convert()

      JUnitDirectoryConverter convertor = new JUnitDirectoryConverter(new File(srcPath),
            new File(outPath),
            (String) params.get(SOURCE_OPT),
            useAnnotations, groups);

      int result = convertor.convert();

      switch(result) {
         case -1:
            log("Generation failed. Consult messages.");
            break;
View Full Code Here

Examples of org.thymeleaf.standard.expression.IStandardConversionService.convert()

            }

            // We need type conversion, but conversion service is not a mere bridge to the Spring one,
            // so we need manual execution.
            final Object result = exp.getValue(evaluationContext, evaluationRoot);
            return conversionService.convert(configuration, processingContext, result, String.class);


        } catch (final TemplateProcessingException e) {
            throw e;
        } catch(final Exception e) {
View Full Code Here

Examples of org.uengine.processpublisher.Adapter.convert()

        Adapter adpt = getAdapter(item.getClass());
        if(adpt==null){
          continue;
        }
               
        activity actGrp_ = (activity)adpt.convert(item, context);
        seq.addactivity_Group(actGrp_);
      }   
     
      actGrp.setsequenceAsChoice(seq);
    proc.setactivity_Group(actGrp)
View Full Code Here

Examples of org.uengine.processpublisher.graph.exporter.ProcessDefinitionAdapter.convert()

      ProcessDefinitionAdapter adapter = new ProcessDefinitionAdapter();
      Hashtable keyedContext = (Hashtable) options;
      GraphActivity graph;

      try {
        graph = (GraphActivity) adapter.convert(activity, keyedContext);
        SwimLaneCoordinate coordinate = new SwimLaneCoordinate();
        graph = coordinate.traverse(graph, null, options);
       
        if (coordinate.getRoleList().size() == 0) {
          String viewOption = (String) options.get(ViewerOptions.SWIMLANE);
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.