Class ArrayQualifiedTypeReference

All Implemented Interfaces:
TypeConstants, TypeIds
Direct Known Subclasses:
JavadocArrayQualifiedTypeReference, ParameterizedQualifiedTypeReference

public class ArrayQualifiedTypeReference extends QualifiedTypeReference
  • Field Details

    • extendedDimensions

      public int extendedDimensions
  • Constructor Details

    • ArrayQualifiedTypeReference

      public ArrayQualifiedTypeReference(char[][] sources, int dim, long[] poss)
    • ArrayQualifiedTypeReference

      public ArrayQualifiedTypeReference(char[][] sources, int dim, Annotation[][] annotationsOnDimensions, long[] poss)
  • Method Details

    • dimensions

      public int dimensions()
      Overrides:
      dimensions in class TypeReference
    • extraDimensions

      public int extraDimensions()
      Description copied from class: TypeReference
      This method is used to return the array dimension declared after the name of a local or a field declaration. For example: int i, j[] = null, k[][] = {{}}; It should return 0 for i, 1 for j and 2 for k.
      Overrides:
      extraDimensions in class TypeReference
      Returns:
      int the extra dimension found
    • getAnnotationsOnDimensions

      public Annotation[][] getAnnotationsOnDimensions(boolean useSourceOrder)
      Overrides:
      getAnnotationsOnDimensions in class TypeReference
      Parameters:
      useSourceOrder - if true annotations on dimensions are returned in source order, otherwise they are returned per how they ought to be interpreted by a type system, or external persistence view. For example, given the following: int @Nullable [] f @NonNull [] ==> f is really a @NonNull array of @Nullable arrays of ints. This is the type system view since extended dimensions bind more readily than type components that precede the identifier. This is how it ought to be encoded in bindings and how it ought to be persisted in class files. However for DOM/AST construction, we need the dimensions in source order, so we provide a way for the clients to ask what they want.
      See Also:
      • invalid reference
        org.eclipse.jdt.internal.compiler.ast.TypeReference#getAnnotationsOnDimensions(boolean)
    • setAnnotationsOnDimensions

      public void setAnnotationsOnDimensions(Annotation[][] annotationsOnDimensions)
      Overrides:
      setAnnotationsOnDimensions in class TypeReference
    • getTopAnnotations

      public Annotation[] getTopAnnotations()
      Overrides:
      getTopAnnotations in class TypeReference
    • getParameterizedTypeName

      public char[][] getParameterizedTypeName()
      Overrides:
      getParameterizedTypeName in class TypeReference
      Returns:
      char[][]
    • getTypeBinding

      protected TypeBinding getTypeBinding(Scope scope)
      Overrides:
      getTypeBinding in class QualifiedTypeReference
    • internalResolveType

      protected TypeBinding internalResolveType(Scope scope, int location)
      Overrides:
      internalResolveType in class TypeReference
    • printExpression

      public StringBuilder printExpression(int indent, StringBuilder output)
      Overrides:
      printExpression in class QualifiedTypeReference
    • traverse

      public void traverse(ASTVisitor visitor, BlockScope scope)
      Description copied from class: Expression
      Traverse an expression in the context of a blockScope
      Overrides:
      traverse in class QualifiedTypeReference
    • traverse

      public void traverse(ASTVisitor visitor, ClassScope scope)
      Description copied from class: Expression
      Traverse an expression in the context of a classScope
      Overrides:
      traverse in class QualifiedTypeReference