@Override public ITypeAnnotationWalker toTypeArgument(int rank) { if (rank == 0) { int start = CharOperation.indexOf('<', this.source, this.pos) + 1; this.prevTypeArgStart = start; return new MethodAnnotationWalker(this.source, start, this.environment); } int next = this.prevTypeArgStart; switch (this.source[next]) { case '*': next = skipNullAnnotation(next+1); break; case '-': case '+': next = skipNullAnnotation(next+1); //$FALL-THROUGH$ default: next = wrapperWithStart(next).computeEnd(); next++; } this.prevTypeArgStart = next; return new MethodAnnotationWalker(this.source, next, this.environment); }
@Override public ITypeAnnotationWalker toTypeArgument(int rank) { if (rank == 0) { int start = CharOperation.indexOf('<', this.source, this.pos) + 1; this.prevTypeArgStart = start; return new MethodAnnotationWalker(this.source, start, this.environment); } int next = this.prevTypeArgStart; switch (this.source[next]) { case '*': next = skipNullAnnotation(next+1); break; case '-': case '+': next = skipNullAnnotation(next+1); //$FALL-THROUGH$ default: next = wrapperWithStart(next).computeEnd(); next++; } this.prevTypeArgStart = next; return new MethodAnnotationWalker(this.source, next, this.environment); }
@Override public ITypeAnnotationWalker toNextArrayDimension() { if (this.source[this.pos] == '[') { int newPos = skipNullAnnotation(this.pos+1); return new MethodAnnotationWalker(this.source, newPos, this.environment); } return ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER; }
@Override public ITypeAnnotationWalker toWildcardBound() { switch (this.source[this.pos]) { case '-': case '+': int newPos = skipNullAnnotation(this.pos+1); return new MethodAnnotationWalker(this.source, newPos, this.environment); default: // includes unbounded '*' return ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER; } }
@Override public ITypeAnnotationWalker toNextArrayDimension() { if (this.source[this.pos] == '[') { int newPos = skipNullAnnotation(this.pos+1); return new MethodAnnotationWalker(this.source, newPos, this.environment); } return ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER; }
@Override public ITypeAnnotationWalker toWildcardBound() { switch (this.source[this.pos]) { case '-': case '+': int newPos = skipNullAnnotation(this.pos+1); return new MethodAnnotationWalker(this.source, newPos, this.environment); default: // includes unbounded '*' return ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER; } }