Examples of IBeanConstructorArgument


Examples of org.springframework.ide.eclipse.beans.core.model.IBeanConstructorArgument

      // Retrieve this bean's constructor arguments
      constructorArguments = new LinkedHashSet<IBeanConstructorArgument>();
      ConstructorArgumentValues cargValues = definition.getConstructorArgumentValues();
      for (Object cargValue : cargValues.getGenericArgumentValues()) {
        IBeanConstructorArgument carg = new BeanConstructorArgument(this, (ValueHolder) cargValue);
        constructorArguments.add(carg);
      }
      Map<?, ?> indexedCargValues = cargValues.getIndexedArgumentValues();
      for (Object key : indexedCargValues.keySet()) {
        ValueHolder vHolder = (ValueHolder) indexedCargValues.get(key);
        IBeanConstructorArgument carg = new BeanConstructorArgument(this, ((Integer) key).intValue(), vHolder);
        constructorArguments.add(carg);
      }
 
      // Retrieve this bean's properties
      properties = new LinkedHashMap<String, IBeanProperty>();
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.model.IBeanConstructorArgument

  public ConstructorArgument[] getConstructorArguments() {
    ArrayList<ConstructorArgument> list = new ArrayList<ConstructorArgument>();
    Iterator cargs = bean.getConstructorArguments().iterator();
    while (cargs.hasNext()) {
      IBeanConstructorArgument carg = (IBeanConstructorArgument) cargs.next();
      list.add(new ConstructorArgument(this, carg));
    }
    cargs = extendedConstructorArgs.iterator();
    while (cargs.hasNext()) {
      IBeanConstructorArgument carg = (IBeanConstructorArgument) cargs.next();
      list.add(new ConstructorArgument(this, carg));
    }
    return list.toArray(new ConstructorArgument[list.size()]);
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.model.IBeanConstructorArgument

   * Returns the first constructor argument defined for given bean.
   * @param bean the bean to lookup the first constructor argument
   * @return the first constructor argument or <code>null</code> if no constructor argument is defined
   */
  public static IBeanConstructorArgument getFirstConstructorArgument(IBean bean) {
    IBeanConstructorArgument firstCarg = null;
    int firstCargStartLine = Integer.MAX_VALUE;
    for (IBeanConstructorArgument carg : bean.getConstructorArguments()) {
      if (carg.getElementStartLine() < firstCargStartLine) {
        firstCarg = carg;
        firstCargStartLine = carg.getElementStartLine();
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.model.IBeanConstructorArgument

      }
    }
    else if (element instanceof IBeanConstructorArgument) {

      // Add referenced beans from constructor arguments element
      IBeanConstructorArgument carg = (IBeanConstructorArgument) element;
      addBeanReferencesForValue(carg, carg.getValue(), context, references, referencedBeans, recursive);
    }
    else if (element instanceof IBeanProperty) {

      // Add referenced beans from property element
      IBeanProperty property = (IBeanProperty) element;
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.model.IBeanConstructorArgument

                  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()) {
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.