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

Examples of org.eclipse.jdt.internal.compiler.ast.TypeReference$AnnotationCollector


    if (isVarArgs)
      currentModifiers |= ClassFileConstants.AccVarargs;
    if (hasDeprecatedAnnotation(methodDeclaration.annotations))
      currentModifiers |= ClassFileConstants.AccDeprecated;

    TypeReference returnType = methodDeclaration instanceof MethodDeclaration
      ? ((MethodDeclaration) methodDeclaration).returnType
      : null;
    methodInfo.isAnnotation = methodDeclaration instanceof AnnotationMethodDeclaration;
    methodInfo.declarationStart = methodDeclaration.declarationSourceStart;
    methodInfo.modifiers = currentModifiers;
    methodInfo.returnType = returnType == null ? null : CharOperation.concatWith(returnType.getParameterizedTypeName(), '.');
    methodInfo.name = methodDeclaration.selector;
    methodInfo.nameSourceStart = methodDeclaration.sourceStart;
    methodInfo.nameSourceEnd = selectorSourceEnd;
    methodInfo.parameterTypes = argumentTypes;
    methodInfo.parameterNames = argumentNames;
View Full Code Here


    if (typeArguments != null) {
      int targetType = methodBinding.isConstructor()
          ? AnnotationTargetTypeConstants.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
          : AnnotationTargetTypeConstants.METHOD_INVOCATION_TYPE_ARGUMENT;
      for (int i = 0, max = typeArguments.length; i < max; i++) {
        TypeReference typeArgument = typeArguments[i];
        if ((typeArgument.bits & ASTNode.HasTypeAnnotations) != 0) {
          addAnnotationContext(typeArgument, this.position, i, targetType);
        }
      }
    }
View Full Code Here

      int targetType =
          isConstructorReference
          ? AnnotationTargetTypeConstants.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
          : AnnotationTargetTypeConstants.METHOD_REFERENCE_TYPE_ARGUMENT;
      for (int i = 0, max = typeArguments.length; i < max; i++) {
        TypeReference typeArgument = typeArguments[i];
        if ((typeArgument.bits & ASTNode.HasTypeAnnotations) != 0) {
          addAnnotationContext(typeArgument, this.position, i, targetType);
        }
      }
    }
View Full Code Here

  private boolean resolveThrownTypes(TreeLogger logger, JAbstractMethod method,
      TypeReference[] jthrows) {
    if (jthrows != null) {
      for (int i = 0; i < jthrows.length; i++) {
        TypeReference jthrown = jthrows[i];
        if (!resolveThrownType(logger, method, jthrown)) {
          return false;
        }
      }
    }
View Full Code Here

      if (length > 0) {
        parameter.type = createTypeReference(typeParameterBounds[0], start, end);
        if (length > 1) {
          parameter.bounds = new TypeReference[length-1];
          for (int i = 1; i < length; i++) {
            TypeReference bound = createTypeReference(typeParameterBounds[i], start, end);
            bound.bits |= ASTNode.IsSuperType;
            parameter.bounds[i-1] = bound;
          }
        }
      }
View Full Code Here

  private TypeReference[] decodeTypeArguments(char[] typeName, int length, int start, int end) {
    ArrayList argumentList = new ArrayList(1);
    int count = 0;
    argumentsLoop: while (this.namePos < length) {
      TypeReference argument = decodeType(typeName, length, start, end);
      count++;
      argumentList.add(argument);
      if (this.namePos >= length) break argumentsLoop;
      if (typeName[this.namePos] == '>') {
        break argumentsLoop;
View Full Code Here

  private TypeReference[] decodeTypeArguments(String typeSignature, int length, int start, int end) {
    ArrayList argumentList = new ArrayList(1);
    int count = 0;
    argumentsLoop: while (this.namePos < length) {
      TypeReference argument = decodeType(typeSignature, length, start, end);
      count++;
      argumentList.add(argument);
      if (this.namePos >= length) break argumentsLoop;
      if (typeSignature.charAt(this.namePos) == Signature.C_GENERIC_END) {
        break argumentsLoop;
View Full Code Here

    }
  }
  return interfaceNames;
}
protected char[] getSuperclassName(TypeDeclaration typeDeclaration) {
  TypeReference superclass = typeDeclaration.superclass;
  return superclass != null ? CharOperation.concatWith(superclass.getParameterizedTypeName(), '.') : null;
}
View Full Code Here

    }
  }
  return thrownExceptionTypes;
}
protected char[][] getTypeParameterBounds(TypeParameter typeParameter) {
  TypeReference firstBound = typeParameter.type;
  TypeReference[] otherBounds = typeParameter.bounds;
  char[][] typeParameterBounds = null;
  if (firstBound != null) {
    if (otherBounds != null) {
      int otherBoundsLength = otherBounds.length;
      char[][] boundNames = new char[otherBoundsLength+1][];
      boundNames[0] = CharOperation.concatWith(firstBound.getParameterizedTypeName(), '.');
      for (int j = 0; j < otherBoundsLength; j++) {
        boundNames[j+1] =
          CharOperation.concatWith(otherBounds[j].getParameterizedTypeName(), '.');
      }
      typeParameterBounds = boundNames;
    } else {
      typeParameterBounds = new char[][] { CharOperation.concatWith(firstBound.getParameterizedTypeName(), '.')};
    }
  } else {
    typeParameterBounds = CharOperation.NO_CHAR_CHAR;
  }
View Full Code Here

      currentModifiers |= ClassFileConstants.AccVarargs;

    // remember deprecation so as to not lose it below
    boolean deprecated = (currentModifiers & ClassFileConstants.AccDeprecated) != 0 || hasDeprecatedAnnotation(methodDeclaration.annotations);

    TypeReference returnType = methodDeclaration instanceof MethodDeclaration
      ? ((MethodDeclaration) methodDeclaration).returnType
      : null;
    ISourceElementRequestor.MethodInfo methodInfo = new ISourceElementRequestor.MethodInfo();
    methodInfo.isAnnotation = methodDeclaration instanceof AnnotationMethodDeclaration;
    methodInfo.declarationStart = methodDeclaration.declarationSourceStart;
    methodInfo.modifiers = deprecated ? (currentModifiers & ExtraCompilerModifiers.AccJustFlag) | ClassFileConstants.AccDeprecated : currentModifiers & ExtraCompilerModifiers.AccJustFlag;
    methodInfo.returnType = returnType == null ? null : CharOperation.concatWith(returnType.getParameterizedTypeName(), '.');
    methodInfo.name = methodDeclaration.selector;
    methodInfo.nameSourceStart = methodDeclaration.sourceStart;
    methodInfo.nameSourceEnd = selectorSourceEnd;
    methodInfo.parameterTypes = argumentTypes;
    methodInfo.parameterNames = argumentNames;
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.ast.TypeReference$AnnotationCollector

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.