Package org.springframework.ide.eclipse.beans.core.internal.model

Examples of org.springframework.ide.eclipse.beans.core.internal.model.BeanProperty


            try {
              IJavaElement source = ((AutowireBeanReference) ref).getSource();
              if (source instanceof IField) {
                String propertyName = source.getElementName();
                if (!autowiredProperties.contains(propertyName)) {
                  IBeanProperty newProperty = new BeanProperty(entry.getKey(), new PropertyValue(
                      propertyName, new RuntimeBeanReference(ref.getBeanName())));
                  bean.addBeanProperty(newProperty);
                  autowiredProperties.add(propertyName);
                }

              }
              else if (source instanceof IMethod && ((IMethod) source).isConstructor()) {
                IBeanConstructorArgument newConstructorArg = new BeanConstructorArgument(
                    entry.getKey(), ((AutowireBeanReference) ref).getParameterIndex(),
                    new ValueHolder(new RuntimeBeanReference(ref.getBeanName())));
                bean.addBeanConstructorArgument(newConstructorArg);
              }
              else if (source instanceof IMethod && !((IMethod) source).isConstructor()) {
                String propertyName = source.getElementName();
                if (propertyName.startsWith("set")) {
                  propertyName = Introspector.decapitalize(propertyName.substring(3));
                }
                if (!autowiredProperties.contains(propertyName)) {
                  IBeanProperty newProperty = new BeanProperty(entry.getKey(), new PropertyValue(
                      propertyName, new RuntimeBeanReference(ref.getBeanName())));
                  bean.addBeanProperty(newProperty);
                  autowiredProperties.add(propertyName);
                }
              }
View Full Code Here


      RuntimeBeanReference rbr = new RuntimeBeanReference(
          ((SerializableRuntimeBeanReference) property.getValue()).getBeanName());
      rbr.setSource(((SerializableRuntimeBeanReference) property.getValue()).getSource());
      PropertyValue pv = new PropertyValue(property.getName(), rbr);
      pv.setSource(((SerializableRuntimeBeanReference) property.getValue()).getSource());
      BeanProperty beanProperty = new BeanProperty(bean, pv);
      properties.add(beanProperty);
    }
    return properties;
  }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.beans.core.internal.model.BeanProperty

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.