System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, 0, length); ref = new CodeSnippetQualifiedNameReference(tokens, positions, (int) (this.identifierPositionStack[this.identifierPtr + 1] >> 32), // sourceStart
/** * Check and/or redirect the field access to the delegate receiver if any */ public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) { FieldBinding lastFieldBinding = this.otherBindings == null ? (FieldBinding) this.binding : this.otherBindings[this.otherBindings.length-1]; if (lastFieldBinding.canBeSeenBy(getFinalReceiverType(), this, currentScope)) { super.generateAssignment(currentScope, codeStream, assignment, valueRequired); return; } lastFieldBinding = generateReadSequence(currentScope, codeStream); codeStream.generateEmulationForField(lastFieldBinding); codeStream.swap(); assignment.expression.generateCode(currentScope, codeStream, true); if (valueRequired) { switch (lastFieldBinding.type.id) { case TypeIds.T_long : case TypeIds.T_double : codeStream.dup2_x2(); break; default : codeStream.dup_x2(); break; } } codeStream.generateEmulatedWriteAccessForField(lastFieldBinding); if (valueRequired) { codeStream.generateImplicitConversion(assignment.implicitConversion); } }
if (lastFieldBinding.canBeSeenBy(getFinalReceiverType(), this, currentScope)) { super.generateCode(currentScope, codeStream, valueRequired); return; lastFieldBinding = generateReadSequence(currentScope, codeStream); if (lastFieldBinding != null) { boolean isStatic = lastFieldBinding.isStatic(); && (this.indexOfFirstFieldBinding == 1 || TypeBinding.equalsEquals(lastFieldBinding.declaringClass, currentScope.enclosingReceiverType())) && this.otherBindings == null; // could be dup: next.next.next TypeBinding requiredGenericCast = getGenericCast(this.otherBindings == null ? 0 : this.otherBindings.length); if (valueRequired || (!isFirst && currentScope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_4) switch (isUnboxing ? postConversionType(currentScope).id : lastFieldBinding.type.id) { case T_long : case T_double :
this.binding = localScope.getFieldForCodeSnippet(this.delegateThis.type, this.tokens[0], this); if (this.binding.isValidBinding()) { return checkFieldAccess(scope); } else { return super.reportError(scope); return checkFieldAccess(scope); this.bits &= ~RestrictiveFlagMASK; // clear bits this.bits |= Binding.FIELD; result = getOtherFieldBindings(scope); } else { return super.reportError(scope);
codeStream.generateOuterAccess(emulationPath, this, targetType, currentScope); } else { generateReceiver(codeStream); generateReceiver(codeStream); checkEffectiveFinality(localBinding, currentScope);
/** * Check and/or redirect the field access to the delegate receiver if any */ public TypeBinding checkFieldAccess(BlockScope scope) { FieldBinding fieldBinding = (FieldBinding) this.binding; MethodScope methodScope = scope.methodScope(); TypeBinding declaringClass = fieldBinding.original().declaringClass; // check for forward references if ((this.indexOfFirstFieldBinding == 1 || declaringClass.isEnum()) && methodScope.enclosingSourceType() == declaringClass && methodScope.lastVisibleFieldID >= 0 && fieldBinding.id >= methodScope.lastVisibleFieldID && (!fieldBinding.isStatic() || methodScope.isStatic)) { scope.problemReporter().forwardReference(this, this.indexOfFirstFieldBinding-1, fieldBinding); } this.bits &= ~ASTNode.RestrictiveFlagMASK; // clear bits this.bits |= Binding.FIELD; return getOtherFieldBindings(scope); }
if (isFieldUseDeprecated((FieldBinding) this.binding, scope, this.indexOfFirstFieldBinding == length ? this.bits : 0)) { scope.problemReporter().deprecatedField((FieldBinding) this.binding, this); if (isFieldUseDeprecated(field, scope, index+1 == length ? this.bits : 0)) { scope.problemReporter().deprecatedField(field, this);
codeStream.generateOuterAccess(emulationPath, this, targetType, currentScope); } else { generateReceiver(codeStream); generateReceiver(codeStream);
if (lastFieldBinding.canBeSeenBy(getFinalReceiverType(), this, currentScope)) { super.generateCode(currentScope, codeStream, valueRequired); return; lastFieldBinding = generateReadSequence(currentScope, codeStream); if (lastFieldBinding != null) { boolean isStatic = lastFieldBinding.isStatic(); && (this.indexOfFirstFieldBinding == 1 || TypeBinding.equalsEquals(lastFieldBinding.declaringClass, currentScope.enclosingReceiverType())) && this.otherBindings == null; // could be dup: next.next.next TypeBinding requiredGenericCast = getGenericCast(this.otherBindings == null ? 0 : this.otherBindings.length); if (valueRequired || (!isFirst && currentScope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_4) switch (isUnboxing ? postConversionType(currentScope).id : lastFieldBinding.type.id) { case T_long : case T_double :
this.binding = localScope.getFieldForCodeSnippet(this.delegateThis.type, this.tokens[0], this); if (this.binding.isValidBinding()) { return checkFieldAccess(scope); } else { return super.reportError(scope); return checkFieldAccess(scope); this.bits &= ~RestrictiveFlagMASK; // clear bits this.bits |= Binding.FIELD; result = getOtherFieldBindings(scope); } else { return super.reportError(scope);
codeStream.generateOuterAccess(emulationPath, this, targetType, currentScope); } else { generateReceiver(codeStream); generateReceiver(codeStream); checkEffectiveFinality(localBinding, currentScope);
/** * Check and/or redirect the field access to the delegate receiver if any */ public TypeBinding checkFieldAccess(BlockScope scope) { FieldBinding fieldBinding = (FieldBinding) this.binding; MethodScope methodScope = scope.methodScope(); TypeBinding declaringClass = fieldBinding.original().declaringClass; // check for forward references if ((this.indexOfFirstFieldBinding == 1 || declaringClass.isEnum()) && TypeBinding.equalsEquals(methodScope.enclosingSourceType(), declaringClass) && methodScope.lastVisibleFieldID >= 0 && fieldBinding.id >= methodScope.lastVisibleFieldID && (!fieldBinding.isStatic() || methodScope.isStatic)) { scope.problemReporter().forwardReference(this, this.indexOfFirstFieldBinding-1, fieldBinding); } this.bits &= ~ASTNode.RestrictiveFlagMASK; // clear bits this.bits |= Binding.FIELD; return getOtherFieldBindings(scope); }
if (isFieldUseDeprecated((FieldBinding) this.binding, scope, this.indexOfFirstFieldBinding == length ? this.bits : 0)) { scope.problemReporter().deprecatedField((FieldBinding) this.binding, this); if (isFieldUseDeprecated(field, scope, index+1 == length ? this.bits : 0)) { scope.problemReporter().deprecatedField(field, this);
if (lastFieldBinding.canBeSeenBy(getFinalReceiverType(), this, currentScope)) { super.generateCode(currentScope, codeStream, valueRequired); return; lastFieldBinding = generateReadSequence(currentScope, codeStream); if (lastFieldBinding != null) { boolean isStatic = lastFieldBinding.isStatic(); && (this.indexOfFirstFieldBinding == 1 || lastFieldBinding.declaringClass == currentScope.enclosingReceiverType()) && this.otherBindings == null; // could be dup: next.next.next TypeBinding requiredGenericCast = getGenericCast(this.otherBindings == null ? 0 : this.otherBindings.length); if (valueRequired || (!isFirst && currentScope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_4) switch (isUnboxing ? postConversionType(currentScope).id : lastFieldBinding.type.id) { case T_long : case T_double :
public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) { FieldBinding lastFieldBinding = this.otherBindings == null ? (FieldBinding) this.binding : this.otherBindings[this.otherBindings.length-1]; if (lastFieldBinding.canBeSeenBy(getFinalReceiverType(), this, currentScope)) { super.generateAssignment(currentScope, codeStream, assignment, valueRequired); return; lastFieldBinding = generateReadSequence(currentScope, codeStream); codeStream.generateEmulationForField(lastFieldBinding); codeStream.swap();
this.binding = localScope.getFieldForCodeSnippet(this.delegateThis.type, this.tokens[0], this); if (this.binding.isValidBinding()) { return checkFieldAccess(scope); } else { return super.reportError(scope); return checkFieldAccess(scope); this.bits &= ~RestrictiveFlagMASK; // clear bits this.bits |= Binding.FIELD; result = getOtherFieldBindings(scope); } else { return super.reportError(scope);
codeStream.generateOuterAccess(emulationPath, this, targetType, currentScope); } else { generateReceiver(codeStream); generateReceiver(codeStream); checkEffectiveFinality(localBinding, currentScope);
long[] positions = new long[length]; System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, 0, length); ref = new CodeSnippetQualifiedNameReference( tokens, positions,
/** * Check and/or redirect the field access to the delegate receiver if any */ public TypeBinding checkFieldAccess(BlockScope scope) { FieldBinding fieldBinding = (FieldBinding) this.binding; MethodScope methodScope = scope.methodScope(); TypeBinding declaringClass = fieldBinding.original().declaringClass; // check for forward references if ((this.indexOfFirstFieldBinding == 1 || declaringClass.isEnum()) && TypeBinding.equalsEquals(methodScope.enclosingSourceType(), declaringClass) && methodScope.lastVisibleFieldID >= 0 && fieldBinding.id >= methodScope.lastVisibleFieldID && (!fieldBinding.isStatic() || methodScope.isStatic)) { scope.problemReporter().forwardReference(this, this.indexOfFirstFieldBinding-1, fieldBinding); } this.bits &= ~ASTNode.RestrictiveFlagMASK; // clear bits this.bits |= Binding.FIELD; return getOtherFieldBindings(scope); }
if (isFieldUseDeprecated((FieldBinding) this.binding, scope, this.indexOfFirstFieldBinding == length ? this.bits : 0)) { scope.problemReporter().deprecatedField((FieldBinding) this.binding, this); if (isFieldUseDeprecated(field, scope, index+1 == length ? this.bits : 0)) { scope.problemReporter().deprecatedField(field, this);