List of usage examples for org.eclipse.jdt.internal.compiler.parser RecoveredType add
public void add(TypeParameter[] parameters, int startPos)
From source file:org.eclipse.jdt.internal.compiler.parser.Parser.java
License:Open Source License
protected void consumeTypeParameters() { int startPos = this.intStack[this.intPtr--]; if (this.currentElement != null) { if (this.currentElement instanceof RecoveredType) { RecoveredType recoveredType = (RecoveredType) this.currentElement; int length = this.genericsLengthStack[this.genericsLengthPtr]; TypeParameter[] typeParameters = new TypeParameter[length]; System.arraycopy(this.genericsStack, this.genericsPtr - length + 1, typeParameters, 0, length); recoveredType.add(typeParameters, startPos); }//from w w w. j a v a 2 s. co m } if (!this.statementRecoveryActivated && this.options.sourceLevel < ClassFileConstants.JDK1_5 && this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) { int length = this.genericsLengthStack[this.genericsLengthPtr]; problemReporter().invalidUsageOfTypeParameters( (TypeParameter) this.genericsStack[this.genericsPtr - length + 1], (TypeParameter) this.genericsStack[this.genericsPtr]); } }