Package br.com.caelum.vraptor.proxy

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


      logger.debug("we can provide instance for ConstraintValidator {}", key);
      return container.instanceFor(key);
    }

    // GH583 - we need to use reflection to instantiate constraints
    return new ReflectionInstanceCreator().instanceFor(key);
  }
View Full Code Here


import br.com.caelum.vraptor.proxy.ReflectionInstanceCreator;

public final class AbstractOgnlTestSupport {

  public static void configOgnl(Converters converters) throws OgnlException {
    Proxifier proxifier = new JavassistProxifier(new ReflectionInstanceCreator());
    OgnlRuntime.setNullHandler(Object.class, new ReflectionBasedNullHandler(proxifier));

    OgnlRuntime.setPropertyAccessor(List.class, new ListAccessor(converters));

    OgnlRuntime.setPropertyAccessor(Object[].class, new ArrayAccessor());
View Full Code Here

  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

  public void setup() throws Exception {
    MockitoAnnotations.initMocks(this);

    AbstractOgnlTestSupport.configOgnl(converters);

  this.proxifier = new JavassistProxifier(new ReflectionInstanceCreator());
    this.context = (OgnlContext) Ognl.createDefaultContext(null);
    context.setTraceEvaluations(true);
    context.put("removal", removal);
    context.put("nullHandler", new GenericNullHandler(removal));
    context.put("proxifier", proxifier);
View Full Code Here

   
    client = new Client();
    handler = new ListNullHandler(removal);
   
  context = (OgnlContext) Ognl.createDefaultContext(null);
  context.put("proxifier", new JavassistProxifier(new ReflectionInstanceCreator()));
  }
View Full Code Here

public class OgnlParametersProviderTest extends ParametersProviderTest {

  @Override
  protected ParametersProvider getProvider() {
    EmptyElementsRemoval removal = new EmptyElementsRemoval();
  Proxifier proxifier = new JavassistProxifier(new ReflectionInstanceCreator());
    return new OgnlParametersProvider(nameProvider, request, container, new OgnlFacade(converters, removal, proxifier));
  }
View Full Code Here

    @Override
      public void removeExtraElements() {
    // does nothing
    }
  };
  final Proxifier proxifier = new JavassistProxifier(new ReflectionInstanceCreator());
  accessor = new ArrayAccessor();
 
    when(context.get("removal")).thenReturn(removal);
    when(context.get("proxifier")).thenReturn(proxifier);
    when(context.getCurrentEvaluation()).thenReturn(evaluation);
View Full Code Here

  context.put("nullHandler", new GenericNullHandler(removal));
  // OgnlRuntime.setPropertyAccessor(Set.class, new SetAccessor());
  // OgnlRuntime.setPropertyAccessor(Map.class, new MapAccessor());
  Ognl.setTypeConverter(context, new VRaptorConvertersAdapter(converters, bundle));
 
  context.put("proxifier", new JavassistProxifier(new ReflectionInstanceCreator()));
  }
View Full Code Here

TOP

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

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.