Package br.com.caelum.vraptor.proxy

Examples of br.com.caelum.vraptor.proxy.Proxifier


    ValidatorFactory validatorFactory = javax.validation.Validation.buildDefaultValidatorFactory();
    javax.validation.Validator bvalidator = validatorFactory.getValidator();
    MessageInterpolator interpolator = validatorFactory.getMessageInterpolator();

    Proxifier proxifier = new JavassistProxifier();
    Messages messages = new Messages();

    validator = new DefaultValidator(result, new DefaultValidationViewsFactory(result, proxifier), outjector, proxifier,
        bundle, bvalidator, interpolator, Locale.ENGLISH, messages);
    when(result.use(LogicResult.class)).thenReturn(logicResult);
View Full Code Here


      Evaluation eval = ctx.getCurrentEvaluation();
      Evaluation previous = eval.getPrevious();
      String fieldName = previous.getNode().toString();
      Object origin = previous.getSource();
     
      Proxifier proxifier = (Proxifier) ctx.get("proxifier");
      Method getter = new ReflectionBasedNullHandler(proxifier).findGetter(origin, StringUtils.capitalize(fieldName));
     
      genericType = getter.getGenericReturnType();
    } else {
      genericType = (Type) ctx.get("rootType");
View Full Code Here

              ctx.setRoot(newArray);
            } else {
              String fieldName = ctx.getCurrentEvaluation().getPrevious().getNode().toString();
              Object origin = ctx.getCurrentEvaluation().getPrevious().getSource();
             
              Proxifier proxifier = (Proxifier) context.get("proxifier");
              Method setter = new ReflectionBasedNullHandler(proxifier).findMethod(origin.getClass(),
                      "set" + StringUtils.capitalize(fieldName), origin.getClass(), null);
             
              EmptyElementsRemoval removal = (EmptyElementsRemoval) context.get("removal");
              removal.add(newArray, setter, origin);
View Full Code Here

  Type getListType(Object target, Evaluation evaluation, OgnlContext ctx) {
    // creating instance
    Object listHolder = evaluation.getSource();
    String listPropertyName = evaluation.getNode().toString();
   
    Proxifier proxifier = (Proxifier) ctx.get("proxifier");
    Method listSetter = new ReflectionBasedNullHandler(proxifier).findSetter(listHolder, StringUtils.capitalize(listPropertyName),
            target.getClass());
   
    Type[] types = listSetter.getGenericParameterTypes();
    Type type = types[0];
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.proxy.Proxifier

Copyright © 2018 www.massapicom. 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.