Package com.sun.mirror.declaration

Examples of com.sun.mirror.declaration.ParameterDeclaration


  private void writeParameters(Collection<ParameterDeclaration> parameters, Writer output, boolean inlineComments)
          throws IOException {
    boolean first = true;
    Iterator<ParameterDeclaration> paramIter = parameters.iterator();
    while (paramIter.hasNext()) {
      ParameterDeclaration parameter = paramIter.next();
      output.write(parameter.getSimpleName());
      if (paramIter.hasNext())
        output.write(", ");
      if (inlineComments) {
        output.write("\n### converted to a Java " + parameter.getType().toString() + "\n");
      }
      first = false;
    }
  }
View Full Code Here


        if (paramMap.containsKey(paramNameQualifiers[0]) == false) {
            throw new ControlException(buildMessage(parameterName, method.getSimpleName()));
        }

        ParameterDeclaration tpd = paramMap.get(paramNameQualifiers[0]);
        TypeMirror type = tpd.getType();

        MethodDeclaration getterMethod = null;
        FieldDeclaration field = null;

        for (int i = 1; i < paramNameQualifiers.length; i++) {
View Full Code Here

        if (paramMap.containsKey(paramNameQualifiers[0]) == false) {
            throw new ControlException(buildMessage(parameterName, method.getSimpleName()));
        }

        ParameterDeclaration tpd = paramMap.get(paramNameQualifiers[0]);
        TypeMirror type = tpd.getType();

        MethodDeclaration getterMethod = null;
        FieldDeclaration field = null;

        for (int i = 1; i < paramNameQualifiers.length; i++) {
View Full Code Here

        if (paramMap.containsKey(paramNameQualifiers[0]) == false) {
            throw new ControlException(buildMessage(parameterName, method.getSimpleName()));
        }

        ParameterDeclaration tpd = paramMap.get(paramNameQualifiers[0]);
        TypeMirror type = tpd.getType();

        MethodDeclaration getterMethod = null;
        FieldDeclaration field = null;

        for (int i = 1; i < paramNameQualifiers.length; i++) {
View Full Code Here

    Collection<ParameterDeclaration> params = getParameters();
    if (params.size() != 1) {
      throw new IllegalArgumentException(getPosition() + ": a local element declaration must have only one parameter.");
    }
    ParameterDeclaration param = params.iterator().next();
    if (!(param.getType() instanceof DeclaredType)) {
      throw new IllegalArgumentException(getPosition() + ": parameter type must be a declared type.");
    }
    elementTypeDeclaration = ((DeclaredType) param.getType()).getDeclaration();
    this.facets.addAll(Facet.gatherFacets(registry));
    this.facets.addAll(Facet.gatherFacets(delegate));
  }
View Full Code Here

    else {
      resource = new SubResource(Context.getCurrentEnvironment().getTypeDeclaration(Object.class.getName()), getPath(), this);
    }
    this.resource = resource;

    ParameterDeclaration entityParameter = null;
    List<ResourceParameter> resourceParameters = new ArrayList<ResourceParameter>();
    for (ParameterDeclaration parameterDeclaration : delegate.getParameters()) {
      if (ResourceParameter.isResourceParameter(parameterDeclaration)) {
        resourceParameters.add(new ResourceParameter(parameterDeclaration));
      }
View Full Code Here

      if ( methodDeclaration.getParameters().size() != 1 ) {
        throw new IllegalArgumentException( "Expected one parameter. But was <" + methodDeclaration.getParameters() + ">" );
      }

      ParameterDeclaration parameterDeclaration = methodDeclaration.getParameters().iterator().next();
      if ( !isAssignable( type, parameterDeclaration.getType() ) ) {
        throw new IllegalArgumentException( "Invalid parameter type for <" + expectedName + ">. Was <" + parameterDeclaration.getType() + "> but expected <" + type + ">" );
      }

      return methodDeclaration;
    }
View Full Code Here

      if ( methodDeclaration.getParameters().size() != 1 ) {
        throw new IllegalArgumentException( "Expected one parameter. But was <" + methodDeclaration.getParameters() + ">" );
      }

      ParameterDeclaration parameterDeclaration = methodDeclaration.getParameters().iterator().next();
      if ( !isAssignable( type, parameterDeclaration.getType() ) ) {
        throw new IllegalArgumentException( "Invalid parameter type for <" + expectedName + ">. Was <" + parameterDeclaration.getType() + "> but expected <" + type + ">" );
      }

      return methodDeclaration;
    }
View Full Code Here

      if ( methodDeclaration.getParameters().size() != 1 ) {
        throw new IllegalArgumentException( "Expected one parameter. But was <" + methodDeclaration.getParameters() + ">" );
      }

      ParameterDeclaration parameterDeclaration = methodDeclaration.getParameters().iterator().next();
      if ( !isAssignable( type, parameterDeclaration.getType() ) ) {
        throw new IllegalArgumentException( "Invalid parameter type for <" + expectedName + ">. Was <" + parameterDeclaration.getType() + "> but expected <" + type + ">" );
      }

      return methodDeclaration;
    }
View Full Code Here

      if ( methodDeclaration.getParameters().size() != 1 ) {
        throw new IllegalArgumentException( "Expected one parameter. But was <" + methodDeclaration.getParameters() + ">" );
      }

      ParameterDeclaration parameterDeclaration = methodDeclaration.getParameters().iterator().next();
      if ( !isAssignable( type, parameterDeclaration.getType() ) ) {
        throw new IllegalArgumentException( "Invalid parameter type for <" + expectedName + ">. Was <" + parameterDeclaration.getType() + "> but expected <" + type + ">" );
      }

      return methodDeclaration;
    }
View Full Code Here

TOP

Related Classes of com.sun.mirror.declaration.ParameterDeclaration

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.