Examples of BeanProperty


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
TOP
Copyright © 2018 www.massapi.com. 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.