protected void consumeMethodInvocationSuper() { // MethodInvocation ::= 'super' '.' 'Identifier' '(' ArgumentListopt ')' MessageSend m = newMessageSend(); m.sourceStart = this.intStack[this.intPtr--]; m.sourceEnd = this.rParenPos; m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]; m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition); pushOnExpressionStack(m); } protected void consumeMethodInvocationSuperWithTypeArguments() {
@Override protected void consumeMethodInvocationSuper() { // MethodInvocation ::= 'super' '.' 'Identifier' '(' ArgumentListopt ')' MessageSend m = newMessageSend(); m.sourceStart = this.intStack[this.intPtr--]; m.sourceEnd = this.rParenPos; m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]; m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition); pushOnExpressionStack(m); } @Override
protected void consumeMethodInvocationSuper() { // MethodInvocation ::= 'super' '.' 'Identifier' '(' ArgumentListopt ')' MessageSend m = newMessageSend(); m.sourceStart = this.intStack[this.intPtr--]; m.sourceEnd = this.rParenPos; m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]; m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition); pushOnExpressionStack(m); } protected void consumeMethodInvocationSuperWithTypeArguments() {
protected void consumeMethodInvocationSuperWithTypeArguments() { // MethodInvocation ::= 'super' '.' TypeArguments 'Identifier' '(' ArgumentListopt ')' MessageSend m = newMessageSendWithTypeArguments(); this.intPtr--; // start position of the typeArguments m.sourceEnd = this.rParenPos; m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]; m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; // handle type arguments int length = this.genericsLengthStack[this.genericsLengthPtr--]; this.genericsPtr -= length; System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length); m.sourceStart = this.intStack[this.intPtr--]; // start position of the super keyword m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition); pushOnExpressionStack(m); } protected void consumePrimaryNoNewArrayThis() {
protected void consumeMethodInvocationSuper() { // MethodInvocation ::= 'super' '.' 'Identifier' '(' ArgumentListopt ')' MessageSend m = newMessageSend(); m.sourceStart = this.intStack[this.intPtr--]; m.sourceEnd = this.rParenPos; m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]; m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition); pushOnExpressionStack(m); } protected void consumeMethodInvocationSuperWithTypeArguments() {
protected void consumeMethodInvocationSuper() { // MethodInvocation ::= 'super' '.' 'Identifier' '(' ArgumentListopt ')' MessageSend m = newMessageSend(); m.sourceStart = this.intStack[this.intPtr--]; m.sourceEnd = this.rParenPos; m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]; m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition); pushOnExpressionStack(m); } protected void consumeMethodInvocationSuperWithTypeArguments() {
protected void consumeMethodInvocationSuperWithTypeArguments() { // MethodInvocation ::= 'super' '.' TypeArguments 'Identifier' '(' ArgumentListopt ')' MessageSend m = newMessageSendWithTypeArguments(); this.intPtr--; // start position of the typeArguments m.sourceEnd = this.rParenPos; m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]; m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; // handle type arguments int length = this.genericsLengthStack[this.genericsLengthPtr--]; this.genericsPtr -= length; System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length); m.sourceStart = this.intStack[this.intPtr--]; // start position of the super keyword m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition); pushOnExpressionStack(m); } protected void consumePrimaryNoNewArrayThis() {
protected void consumeMethodInvocationSuperWithTypeArguments() { // MethodInvocation ::= 'super' '.' TypeArguments 'Identifier' '(' ArgumentListopt ')' MessageSend m = newMessageSendWithTypeArguments(); this.intPtr--; // start position of the typeArguments m.sourceEnd = this.rParenPos; m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]; m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; // handle type arguments int length = this.genericsLengthStack[this.genericsLengthPtr--]; this.genericsPtr -= length; System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length); m.sourceStart = this.intStack[this.intPtr--]; // start position of the super keyword m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition); pushOnExpressionStack(m); } protected void consumePrimaryNoNewArrayThis() {
protected void consumeMethodInvocationSuper() { // MethodInvocation ::= 'super' '.' 'Identifier' '(' ArgumentListopt ')' MessageSend m = newMessageSend(); m.sourceStart = this.intStack[this.intPtr--]; m.sourceEnd = this.rParenPos; m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]; m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition); pushOnExpressionStack(m); } protected void consumeMethodInvocationSuperWithTypeArguments() {
@Override protected void consumeMethodInvocationSuperWithTypeArguments() { // MethodInvocation ::= 'super' '.' TypeArguments 'Identifier' '(' ArgumentListopt ')' MessageSend m = newMessageSendWithTypeArguments(); this.intPtr--; // start position of the typeArguments m.sourceEnd = this.rParenPos; m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]; m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; // handle type arguments int length = this.genericsLengthStack[this.genericsLengthPtr--]; this.genericsPtr -= length; System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length); m.sourceStart = this.intStack[this.intPtr--]; // start position of the super keyword m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition); pushOnExpressionStack(m); } @Override
protected void consumeMethodInvocationSuperWithTypeArguments() { // MethodInvocation ::= 'super' '.' TypeArguments 'Identifier' '(' ArgumentListopt ')' MessageSend m = newMessageSendWithTypeArguments(); this.intPtr--; // start position of the typeArguments m.sourceEnd = this.rParenPos; m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]; m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; // handle type arguments int length = this.genericsLengthStack[this.genericsLengthPtr--]; this.genericsPtr -= length; System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length); m.sourceStart = this.intStack[this.intPtr--]; // start position of the super keyword m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition); pushOnExpressionStack(m); } protected void consumePrimaryNoNewArrayThis() {
protected void consumeMethodInvocationSuperWithTypeArguments() { // MethodInvocation ::= 'super' '.' TypeArguments 'Identifier' '(' ArgumentListopt ')' MessageSend m = newMessageSendWithTypeArguments(); this.intPtr--; // start position of the typeArguments m.sourceEnd = this.rParenPos; m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]; m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; // handle type arguments int length = this.genericsLengthStack[this.genericsLengthPtr--]; this.genericsPtr -= length; System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length); m.sourceStart = this.intStack[this.intPtr--]; // start position of the super keyword m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition); pushOnExpressionStack(m); } protected void consumePrimaryNoNewArrayThis() {
protected void consumePrimaryNoNewArrayThis() { // PrimaryNoNewArray ::= 'this' if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { pushOnExpressionStack( new CodeSnippetThisReference(this.intStack[this.intPtr--], this.endPosition, this.evaluationContext, false)); } else { super.consumePrimaryNoNewArrayThis(); } } protected void consumeStatementBreak() {
@Override protected void consumePrimaryNoNewArrayThis() { // PrimaryNoNewArray ::= 'this' if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { pushOnExpressionStack( new CodeSnippetThisReference(this.intStack[this.intPtr--], this.endPosition, this.evaluationContext, false)); } else { super.consumePrimaryNoNewArrayThis(); } } @Override
protected void consumePrimaryNoNewArrayThis() { // PrimaryNoNewArray ::= 'this' if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { pushOnExpressionStack( new CodeSnippetThisReference(this.intStack[this.intPtr--], this.endPosition, this.evaluationContext, false)); } else { super.consumePrimaryNoNewArrayThis(); } } protected void consumeStatementBreak() {
protected void consumePrimaryNoNewArrayThis() { // PrimaryNoNewArray ::= 'this' if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { pushOnExpressionStack( new CodeSnippetThisReference(this.intStack[this.intPtr--], this.endPosition, this.evaluationContext, false)); } else { super.consumePrimaryNoNewArrayThis(); } } protected void consumeStatementBreak() {
protected void consumePrimaryNoNewArrayThis() { // PrimaryNoNewArray ::= 'this' if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { pushOnExpressionStack( new CodeSnippetThisReference(this.intStack[this.intPtr--], this.endPosition, this.evaluationContext, false)); } else { super.consumePrimaryNoNewArrayThis(); } } protected void consumeStatementBreak() {
protected void consumePrimaryNoNewArrayThis() { // PrimaryNoNewArray ::= 'this' if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { pushOnExpressionStack( new CodeSnippetThisReference(this.intStack[this.intPtr--], this.endPosition, this.evaluationContext, false)); } else { super.consumePrimaryNoNewArrayThis(); } } protected void consumeStatementBreak() {
protected void consumeMethodInvocationNameWithTypeArguments() { // MethodInvocation ::= Name '.' TypeArguments 'Identifier' '(' ArgumentListopt ')' // when the name is only an identifier...we have a message send to "this" (implicit) if (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838 && isTopLevelType()) { MessageSend m = newMessageSendWithTypeArguments(); m.sourceEnd = this.rParenPos; m.sourceStart = (int) ((m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]) >>> 32); m.selector = this.identifierStack[this.identifierPtr--]; this.identifierLengthPtr--; // handle type arguments int length = this.genericsLengthStack[this.genericsLengthPtr--]; this.genericsPtr -= length; System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length); this.intPtr--; m.receiver = getUnspecifiedReference(); m.sourceStart = m.receiver.sourceStart; pushOnExpressionStack(m); } else { super.consumeMethodInvocationNameWithTypeArguments(); } } protected void consumeMethodInvocationSuper() {
protected void consumeFieldAccess(boolean isSuperAccess) { // FieldAccess ::= Primary '.' 'Identifier' // FieldAccess ::= 'super' '.' 'Identifier' FieldReference fr = new CodeSnippetFieldReference( this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr--], this.evaluationContext); this.identifierLengthPtr--; if (isSuperAccess) { //considerates the fieldReference beginning at the 'super' .... fr.sourceStart = this.intStack[this.intPtr--]; problemReporter().codeSnippetMissingClass(null,0, 0); fr.receiver = new CodeSnippetSuperReference(fr.sourceStart, this.endPosition); pushOnExpressionStack(fr); } else { //optimize push/pop if ((fr.receiver = this.expressionStack[this.expressionPtr]).isThis()) { //fieldreference begins at the this fr.sourceStart = fr.receiver.sourceStart; } this.expressionStack[this.expressionPtr] = fr; } } protected void consumeInternalCompilationUnit() {