Package org.eclipse.jdt.internal.compiler.ast

Examples of org.eclipse.jdt.internal.compiler.ast.Argument


    Argument[] args = method.arguments;
    if (args != null) {
      int length = args.length;
      String[] signatures = new String[length];
      for (int i = 0; i < args.length; i++) {
        Argument arg = args[i];
        signatures[i] = typeSignature(arg.type);
      }
      return signatures;
    }
    return CharOperation.NO_STRINGS;
View Full Code Here


private LocalVariable[] acceptMethodParameters(Argument[] arguments, JavaElement methodHandle, MethodInfo methodInfo) {
  if (arguments == null) return null;
  LocalVariable[] result = new LocalVariable[arguments.length];
  Annotation[][] paramAnnotations = new Annotation[arguments.length][];
  for(int i = 0; i < arguments.length; i++) {
    Argument argument = arguments[i];
    AnnotatableInfo localVarInfo = new AnnotatableInfo();
    localVarInfo.setSourceRangeStart(argument.declarationSourceStart);
    localVarInfo.setSourceRangeEnd(argument.declarationSourceStart);
    localVarInfo.setNameSourceStart(argument.sourceStart);
    localVarInfo.setNameSourceEnd(argument.sourceEnd);
View Full Code Here

    String syntheticFnHeader = "function(";
    boolean first = true;
    if (methodDeclaration.arguments != null) {
      for (int i = 0, c = methodDeclaration.arguments.length; i < c; ++i) {
        Argument arg = methodDeclaration.arguments[i];
        if (first) {
          first = false;
        } else {
          syntheticFnHeader += ',';
        }
View Full Code Here

  private boolean resolveParameters(TreeLogger logger, JAbstractMethod method,
      Argument[] jparams) {
    if (jparams != null) {
      for (int i = 0; i < jparams.length; i++) {
        Argument jparam = jparams[i];
        if (!resolveParameter(logger, method, jparam)) {
          return false;
        }
      }
    }
View Full Code Here

  private boolean resolveParameters(TreeLogger logger, JAbstractMethod method,
      Argument[] jparams) {
    if (jparams != null) {
      for (int i = 0; i < jparams.length; i++) {
        Argument jparam = jparams[i];
        if (!resolveParameter(logger, method, jparam)) {
          return false;
        }
      }
    }
View Full Code Here

          tryBlock = normalizeTryWithResources(info, x, tryBlock, scope);
        }
        List<JTryStatement.CatchClause> catchClauses = Lists.newArrayList();
        if (x.catchBlocks != null) {
          for (int i = 0; i < x.catchArguments.length; i++) {
            Argument argument = x.catchArguments[i];
            JLocal local = (JLocal) curMethod.locals.get(argument.binding);

            List<JType> catchTypes = Lists.newArrayList();
            if (argument.type instanceof UnionTypeReference) {
              // This is a multiexception
View Full Code Here

    String syntheticFnHeader = "function(";
    boolean first = true;
    if (methodDeclaration.arguments != null) {
      for (int i = 0, c = methodDeclaration.arguments.length; i < c; ++i) {
        Argument arg = methodDeclaration.arguments[i];
        if (first) {
          first = false;
        } else {
          syntheticFnHeader += ',';
        }
View Full Code Here

    String selector = manager.intern(new String(lambdaExpression.descriptor.selector));
    String key = new String(lambdaExpression.descriptor.computeUniqueKey());
    LambdaMethod lambdaMethod = createLambdaMethod(parent, selector, key, lambdaExpression.sourceStart, lambdaExpression.sourceEnd, lambdaExpression.arrowPosition, parameterTypes, parameterNames, returnType);
    ILocalVariable [] parameters = new ILocalVariable[length = lambdaExpression.arguments.length];
    for (int i = 0; i < length; i++) {
      Argument argument = lambdaExpression.arguments[i];
      String signature = manager.intern(new String(lambdaExpression.descriptor.parameters[i].signature()));
      parameters[i] = new LocalVariable(
          lambdaMethod,
          new String(argument.name),
          argument.declarationSourceStart,
View Full Code Here

        startLineIndexes);
  }

  private void completeArgumentAnnotationInfo(Argument[] arguments, List allAnnotationContexts) {
    for (int i = 0, max = arguments.length; i < max; i++) {
      Argument argument = arguments[i];
      if ((argument.bits & ASTNode.HasTypeAnnotations) != 0) {
        argument.getAllAnnotationContexts(AnnotationTargetTypeConstants.METHOD_FORMAL_PARAMETER, i, allAnnotationContexts);
      }
    }
  }
View Full Code Here

        if (methodDecl == null) return;
        TypeBinding [] parameterTypes = currentMethod.parameters;
        Argument[] arguments = methodDecl.arguments;
        for (int j = 0, size = currentMethod.parameters.length; j < size; j++) {
          TypeBinding parameterType = parameterTypes[j];
          Argument arg = arguments[j];
          if (parameterType.leafComponentType().isRawType()
            && compilerOptions.getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore
                && (arg.type.bits & ASTNode.IgnoreRawTypeCheck) == 0) {
            methodDecl.scope.problemReporter().rawTypeReference(arg.type, parameterType);
            }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.ast.Argument

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.