Examples of ConstructorParameter


Examples of org.exoplatform.services.rest.ConstructorParameter

               }
            }

            encoded = encoded || resourceClass.getAnnotation(Encoded.class) != null;

            ConstructorParameter cp =
               new ConstructorParameterImpl(annotation, annotations[i], paramTypes[i], getParamTypes[i], defaultValue,
                  encoded);

            params.add(cp);
         }
View Full Code Here

Examples of org.exoplatform.services.rest.ConstructorParameter

               }
            }

            encoded = encoded || resourceClass.getAnnotation(Encoded.class) != null;

            ConstructorParameter cp =
               new ConstructorParameterImpl(annotation, annotations[i], paramTypes[i], getParamTypes[i], defaultValue,
                  encoded);

            params.add(cp);
         }
View Full Code Here

Examples of org.exoplatform.services.rest.ConstructorParameter

               }
            }

            encoded = encoded || resourceClass.getAnnotation(Encoded.class) != null;

            ConstructorParameter cp =
               new ConstructorParameterImpl(annotation, annotations[i], paramTypes[i], getParamTypes[i], defaultValue,
                  encoded);

            params.add(cp);
         }
View Full Code Here

Examples of org.exoplatform.services.rest.ConstructorParameter

               }
            }

            encoded = encoded || resourceClass.getAnnotation(Encoded.class) != null;

            ConstructorParameter cp =
               new ConstructorParameterImpl(annotation, annotations[i], paramTypes[i], getParamTypes[i], defaultValue,
                  encoded);

            params.add(cp);
         }
View Full Code Here

Examples of org.exoplatform.services.rest.ConstructorParameter

               }
            }

            encoded = encoded || resourceClass.getAnnotation(Encoded.class) != null;

            ConstructorParameter cp =
               new ConstructorParameterImpl(annotation, annotations[i], paramTypes[i], getParamTypes[i], defaultValue,
                  encoded);

            params.add(cp);
         }
View Full Code Here

Examples of rocket.generator.rebind.constructorparameter.ConstructorParameter

    buf.append(constructor);
    buf.append('(');

    final Iterator parameters = this.getParameters().iterator();
    while (parameters.hasNext()) {
      final ConstructorParameter parameter = (ConstructorParameter) parameters.next();
      final Type parameterType = parameter.getType();
      buf.append(parameterType.getName());

      if (parameters.hasNext()) {
        buf.append(',');
      }
View Full Code Here

Examples of rocket.generator.rebind.constructorparameter.ConstructorParameter

    builder.append('(');

    final Iterator<ConstructorParameter> parameters = this.getParameters().iterator();
    while (parameters.hasNext()) {
      final ConstructorParameter parameter = parameters.next();
      builder.append(parameter.getType());

      if (parameters.hasNext()) {
        builder.append(", ");
      }
    }
View Full Code Here

Examples of rocket.generator.rebind.constructorparameter.ConstructorParameter

   *            A new constructor being built.
   */
  protected void copy0(final NewConstructor constructor) {
    final Iterator parameters = this.getParameters().iterator();
    while (parameters.hasNext()) {
      final ConstructorParameter parameter = (ConstructorParameter) parameters.next();
      constructor.addParameter(parameter.copy());
    }

    final Iterator thrownTypes = this.getThrownTypes().iterator();
    while (thrownTypes.hasNext()) {
      constructor.addThrownType((Type) thrownTypes.next());
View Full Code Here

Examples of rocket.generator.rebind.constructorparameter.ConstructorParameter

            match = true;
            final Iterator<Value> valuesIterator = arguments.iterator();
            final Iterator<ConstructorParameter> parametersIterator = constructorParameters.iterator();

            while (valuesIterator.hasNext()) {
              final ConstructorParameter parameter = parametersIterator.next();
              final Value value0 = valuesIterator.next();
              if (false == value0.isCompatibleWith(parameter.getType())) {
                match = false;
              }
            }
          }
        }

        if (match) {
          matchingConstructors.add(constructor);
          context.debug("" + constructor);
        }
        return false;
      }
    };

    final Type beanType = bean.getType();
    visitor.start(beanType);

    if (matchingConstructors.size() == 0) {
      this.throwUnableToFindConstructor(bean);
    }
    if (matchingConstructors.size() > 1) {
      this.throwTooManyConstructors(bean, matchingConstructors);
    }
    context.unbranch();

    final Constructor constructor = (Constructor) matchingConstructors.get(0);
    body.setBean(constructor);

    final Iterator<ConstructorParameter> constructorParameters = constructor.getParameters().iterator();
    final Iterator<Value> valuesIterator = arguments.iterator();
    while (constructorParameters.hasNext()) {
      final ConstructorParameter constructorParameter = constructorParameters.next();
      final Value value = valuesIterator.next();
      value.setPropertyType(constructorParameter.getType());

      this.prepareValue(value);
    }

    if (context.isDebugEnabled()) {
View Full Code Here

Examples of rocket.generator.rebind.constructorparameter.ConstructorParameter

      final Iterator<ConstructorParameter> constructorParametersIterator = constructorParameters.iterator();
      final Iterator<Type> parameterTypesIterator = parameterTypes.iterator();

      while (parameterTypesIterator.hasNext()) {
        final ConstructorParameter constructorParameter = constructorParametersIterator.next();
        final Type parameterType = parameterTypesIterator.next();
        if (false == constructorParameter.getType().equals(parameterType)) {
          found = null;
        }
      }

      if (null != found) {
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.