Package br.com.caelum.vraptor.proxy

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


      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

      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

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

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

  private Long id;
  }

  @Before
  public void setup() {
  Proxifier proxifier = new JavassistProxifier(new ObjenesisInstanceCreator());
  validator = new DefaultValidator(result, viewsFactory, outjector, proxifier, null, localization);
  when(localization.getBundle()).thenReturn(new EmptyBundle());
  }
View Full Code Here

  private @Mock MyComponent instance;
  private DefaultValidator validator;

  @Before
  public void setup() {
    Proxifier proxifier = new JavassistProxifier(new ObjenesisInstanceCreator());
    this.validator = new DefaultValidator(result, new DefaultValidationViewsFactory(result, proxifier), outjector, proxifier, beanValidator, localization);
    when(result.use(LogicResult.class)).thenReturn(logicResult);
    when(result.use(PageResult.class)).thenReturn(pageResult);
    when(logicResult.forwardTo(MyComponent.class)).thenReturn(instance);
    when(pageResult.of(MyComponent.class)).thenReturn(instance);
View Full Code Here

  private ExceptionMapper mapper;

  @Before
  public void setUp() {
  MockitoAnnotations.initMocks(this);
  Proxifier proxifier = new JavassistProxifier(new ObjenesisInstanceCreator());
  mapper = new DefaultExceptionMapper(proxifier);
  }
View Full Code Here

  private ExceptionMapper mapper;

  @Before
  public void setUp() {
    MockitoAnnotations.initMocks(this);
    Proxifier proxifier = new JavassistProxifier();
    mapper = new DefaultExceptionMapper(proxifier);
  }
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.