Examples of StringConverter


Examples of br.com.caelum.iogi.conversion.StringConverter

    ParameterNamesProvider parameterNamesProvider =
      new VRaptorParameterNamesProvider();

    List<Instantiator<?>> instantiatorList = ImmutableList.of(
      new VRaptorTypeConverter(),
      FallbackConverter.fallbackToNull(new StringConverter()),
      new ArrayInstantiator(this),
      new NullDecorator(new ListInstantiator(this)), //NOTE: NullDecorator is here to preserve existing behaviour. Don't know if it is the ideal one, though.
      new ObjectInstantiator(this, dependencyProvider, parameterNamesProvider));
    multiInstantiator = new MultiInstantiator(instantiatorList);
  }
View Full Code Here

Examples of br.com.caelum.iogi.conversion.StringConverter

    ParameterNamesProvider parameterNamesProvider =
      new VRaptorParameterNamesProvider();

    List<Instantiator<?>> instantiatorList = ImmutableList.of(
      new VRaptorTypeConverter(),
      FallbackConverter.fallbackToNull(new StringConverter()),
      new ArrayInstantiator(this),
      new NullDecorator(new ListInstantiator(this)), //NOTE: NullDecorator is here to preserve existing behaviour. Don't know if it is the ideal one, though.
      new ObjectInstantiator(this, dependencyProvider, parameterNamesProvider));
    multiInstantiator = new MultiInstantiator(instantiatorList);
  }
View Full Code Here

Examples of br.com.caelum.iogi.conversion.StringConverter

    ObjectInstantiator objectInstantiator = new ObjectInstantiator(this, provider, parameterNameProvider);
    List<Instantiator<?>> instantiatorList = ImmutableList.of(
      new RequestAttributeInstantiator(request),
      new VRaptorTypeConverter(converters),
      FallbackConverter.fallbackToNull(new StringConverter()),
      new ArrayAdapter(new ArrayInstantiator(this)),
      new NullDecorator(new ListInstantiator(this)), //NOTE: NullDecorator is here to preserve existing behaviour. Don't know if it is the ideal one, though.
      new NullDecorator(new SetInstantiator(this)),
      new DependencyInstantiator(objectInstantiator),
      objectInstantiator);
View Full Code Here

Examples of br.com.caelum.iogi.conversion.StringConverter

    ParameterNamesProvider parameterNamesProvider =
      new VRaptorParameterNamesProvider();

    List<Instantiator<?>> instantiatorList = ImmutableList.of(
      new VRaptorTypeConverter(),
      FallbackConverter.fallbackToNull(new StringConverter()),
      new ArrayInstantiator(this),
      new NullDecorator(new ListInstantiator(this)), //NOTE: NullDecorator is here to preserve existing behaviour. Don't know if it is the ideal one, though.
      new ObjectInstantiator(this, dependencyProvider, parameterNamesProvider));
    multiInstantiator = new MultiInstantiator(instantiatorList);
  }
View Full Code Here

Examples of br.com.caelum.vraptor.converter.StringConverter

  context.put("nullHandler", new GenericNullHandler(removal));
  // OgnlRuntime.setPropertyAccessor(Set.class, new SetAccessor());
  // OgnlRuntime.setPropertyAccessor(Map.class, new MapAccessor());
  this.bundle = ResourceBundle.getBundle("messages");
  Ognl.setTypeConverter(context, new VRaptorConvertersAdapter(converters, bundle));
  when(converters.to(String.class)).thenReturn(new StringConverter());
    when(converters.to(Long.class)).thenReturn(new LongConverter());
   
    context.put("proxifier", new JavassistProxifier(new ReflectionInstanceCreator()));
  }
View Full Code Here

Examples of br.com.caelum.vraptor.converter.StringConverter

    context.put("removal", removal);
    context.put("nullHandler", new GenericNullHandler(removal));
    context.put("proxifier", proxifier);
   
    when(container.instanceFor(Converters.class)).thenReturn(converters);
    when(converters.to(String.class)).thenReturn(new StringConverter());
    when(converters.to(Long.class)).thenReturn(new LongConverter());
  }
View Full Code Here

Examples of br.com.caelum.vraptor.converter.StringConverter

  when(converters.existsFor(Long.class)).thenReturn(true);
  when(converters.existsFor(long.class)).thenReturn(true);
  when(converters.existsFor(String.class)).thenReturn(true);
  when(converters.to(Long.class)).thenReturn(new LongConverter());
  when(converters.to(long.class)).thenReturn(new PrimitiveLongConverter());
  when(converters.to(String.class)).thenReturn(new StringConverter());

  when(nameProvider.parameterNamesFor(any(AccessibleObject.class))).thenReturn(new String[0]);

  buyA     = method("buyA", House.class);
  kick     = method("kick", AngryCat.class);
View Full Code Here

Examples of br.com.caelum.vraptor.converter.StringConverter

    MockitoAnnotations.initMocks(this);
  this.instance = new ArrayList<String>();
  when(context.getRoot()).thenReturn(instance);

  when(context.get("rootType")).thenReturn(Types.listOf(String.class));
  when(converters.to(String.class)).thenReturn((Converter) new StringConverter());
  this.accessor = new ListAccessor(converters);
  }
View Full Code Here

Examples of br.com.caelum.vraptor.converter.StringConverter

  removal = new EmptyElementsRemoval();
  bundle = ResourceBundle.getBundle("messages");
 
  when(container.instanceFor(Converters.class)).thenReturn(converters);
  when(converters.to(Long.class)).thenReturn(new LongConverter());
  when(converters.to(String.class)).thenReturn(new StringConverter());
  when(container.instanceFor(EmptyElementsRemoval.class)).thenReturn(removal);
 
  this.myCat = new Cat();
  this.context = (OgnlContext) Ognl.createDefaultContext(myCat);
  context.setTraceEvaluations(true);
View Full Code Here

Examples of cn.org.rapid_framework.beanutils.converter.StringConverter

public class ConvertRegisterHelper {

  private ConvertRegisterHelper(){}
 
  public static void registerConverters() {
    ConvertUtils.register(new StringConverter(), String.class);
    //date
    ConvertUtils.register(new DateConverter(null),java.util.Date.class);
        ConvertUtils.register(new SqlDateConverter(null),java.sql.Date.class);
    ConvertUtils.register(new SqlTimeConverter(null),Time.class);
    ConvertUtils.register(new SqlTimestampConverter(null),Timestamp.class);
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.