Package org.springframework.beans

Examples of org.springframework.beans.DirectFieldAccessor


    return (ErrorHandler) new DirectFieldAccessor(container).getPropertyValue("errorHandler");
  }

  private BackOff getBackOff(String containerBeanName) {
    DefaultMessageListenerContainer container = this.context.getBean(containerBeanName, DefaultMessageListenerContainer.class);
    return (BackOff) new DirectFieldAccessor(container).getPropertyValue("backOff");
  }
View Full Code Here


        "returnValueHandlers");
    int i = 0;
    for (HandlerMethodReturnValueHandler handler : returnHandlers) {
      handler = (HandlerMethodReturnValueHandler) unwrapFacesResponseCompleteReturnValueHandler(handler);
      if (handler instanceof AbstractMessageConverterMethodProcessor) {
        assertThat(new DirectFieldAccessor(handler).getPropertyValue("messageConverters"),
            is(equalTo((Object) messageConverters)));
        i++;
      }
    }
    assertThat(i, is(2));
View Full Code Here

    return this.resolver.resolve(this.facesContext, this.context);
  }

  @SuppressWarnings("unchecked")
  private <T> List<T> fieldValueAsList(Object object, String field) {
    return (List<T>) new DirectFieldAccessor(object).getPropertyValue(field);
  }
View Full Code Here

    return (List<T>) new DirectFieldAccessor(object).getPropertyValue(field);
  }

  @SuppressWarnings("unchecked")
  private <T> Set<T> fieldValueAsSet(Object object, String field) {
    return (Set<T>) new DirectFieldAccessor(object).getPropertyValue(field);
  }
View Full Code Here

    assertThat(classes.size(), is(0));
  }

  private static Object unwrapFacesResponseCompleteReturnValueHandler(Object handler) {
    if (handler instanceof FacesResponseCompleteReturnValueHandler) {
      return new DirectFieldAccessor(handler).getPropertyValue("handler");
    }
    return handler;
  }
View Full Code Here

    statsResult.setMax(value.getMax());
    statsResult.setMin(value.getMin());
    statsResult.setCount(value.getCount());
    statsResult.setMissing(value.getMissing());
    statsResult.setStddev(value.getStddev());
    statsResult.setSumOfSquares((Double) new DirectFieldAccessor(value).getPropertyValue("sumOfSquares"));

    Object mean = value.getMean();
    if (mean instanceof Double) {
      statsResult.setMean((Double) mean);
    }
View Full Code Here

  @Override
  public DataFrame deserialize(InputStream inputStream) throws IOException {
    if (this.streamChecked == null) {
      this.nio = inputStream.getClass().getName().endsWith("TcpNioConnection$ChannelInputStream");
      this.streamAccessor = new DirectFieldAccessor(inputStream);
      this.streamChecked = Boolean.TRUE;
    }
    DataFrame frame = null;
    BasicState state = this.getState(inputStream);
    if (state != null) {
View Full Code Here

  private final String path;

  private final String queryString;

  public WebSocketEvent(TcpConnectionSupport connection, WebSocketEventType type, String path, String queryString) {
    super(connection, type, (String) new DirectFieldAccessor(connection).getPropertyValue("connectionFactoryName"));
    this.path = path;
    this.queryString = queryString;
  }
View Full Code Here

   * @param defaultTupleConversionService
   * @param tupleToJsonStringConverter
   */
  private void setConversionService(DefaultTuple tuple, DefaultTupleConversionService defaultTupleConversionService,
      TupleToJsonStringConverter tupleToJsonStringConverter) {
    DirectFieldAccessor dfa = new DirectFieldAccessor(tuple);
    dfa.setPropertyValue("formattingConversionService", defaultTupleConversionService);
    dfa.setPropertyValue("tupleToStringConverter", tupleToJsonStringConverter);
  }
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  private List<Binding> getMessageBusBindings() {
    MessageBus bus = testMessageBus != null ? testMessageBus.getMessageBus() : integrationSupport.messageBus();
    DirectFieldAccessor accessor = new DirectFieldAccessor(bus);
    return ((List<Binding>) accessor.getPropertyValue("bindings"));
  }
View Full Code Here

TOP

Related Classes of org.springframework.beans.DirectFieldAccessor

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.