Package br.net.woodstock.rockframework.reflection

Examples of br.net.woodstock.rockframework.reflection.PropertyDescriptor


    BeanDescriptor beanDescriptorFrom = new BeanDescriptorBuilder(from.getClass()).getBeanDescriptor();
    BeanDescriptor beanDescriptorTo = new BeanDescriptorBuilder(to.getClass()).getBeanDescriptor();

    outer: for (PropertyDescriptor propertyDescriptor : beanDescriptorFrom.getProperties()) {
      if (beanDescriptorTo.hasProperty(propertyDescriptor.getName())) {
        PropertyDescriptor propertyDescriptorTo = beanDescriptorTo.getProperty(propertyDescriptor.getName());
        if (ignoredAttributes != null) {
          for (String s : ignoredAttributes) {
            if (s.equals(propertyDescriptor.getName())) {
              continue outer;
            }
          }
        }
        if (!propertyDescriptorTo.getType().isAssignableFrom(propertyDescriptor.getType())) {
          continue;
        }
        Object tmp = propertyDescriptor.getValue(from);
        propertyDescriptorTo.setValue(to, tmp);
      }
    }
  }
View Full Code Here

TOP

Related Classes of br.net.woodstock.rockframework.reflection.PropertyDescriptor

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.