void reportOnlyUselesslyReadPrivateField(BlockScope currentScope, FieldBinding fieldBinding, boolean valueRequired) { if (valueRequired) { // access is relevant, turn compound use into real use: fieldBinding.compoundUseFlag = 0; fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; } else { if (fieldBinding.isUsedOnlyInCompound()) { fieldBinding.compoundUseFlag--; // consume one if (fieldBinding.compoundUseFlag == 0 // report only the last usage && fieldBinding.isOrEnclosedByPrivateType() && (this.implicitConversion & TypeIds.UNBOXING) == 0) // don't report if unboxing is involved (might cause NPE) { // compoundAssignment/postIncrement is the only usage of this field currentScope.problemReporter().unusedPrivateField(fieldBinding.sourceField()); } } } } /* report a local/arg that is only read from a 'special operator',
void reportOnlyUselesslyReadPrivateField(BlockScope currentScope, FieldBinding fieldBinding, boolean valueRequired) { if (valueRequired) { // access is relevant, turn compound use into real use: fieldBinding.compoundUseFlag = 0; fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; } else { if (fieldBinding.isUsedOnlyInCompound()) { fieldBinding.compoundUseFlag--; // consume one if (fieldBinding.compoundUseFlag == 0 // report only the last usage && fieldBinding.isOrEnclosedByPrivateType() && (this.implicitConversion & TypeIds.UNBOXING) == 0) // don't report if unboxing is involved (might cause NPE) { // compoundAssignment/postIncrement is the only usage of this field currentScope.problemReporter().unusedPrivateField(fieldBinding.sourceField()); } } } } /* report a local/arg that is only read from a 'special operator',
void reportOnlyUselesslyReadPrivateField(BlockScope currentScope, FieldBinding fieldBinding, boolean valueRequired) { if (valueRequired) { // access is relevant, turn compound use into real use: fieldBinding.compoundUseFlag = 0; fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; } else { if (fieldBinding.isUsedOnlyInCompound()) { fieldBinding.compoundUseFlag--; // consume one if (fieldBinding.compoundUseFlag == 0 // report only the last usage && fieldBinding.isOrEnclosedByPrivateType() && (this.implicitConversion & TypeIds.UNBOXING) == 0) // don't report if unboxing is involved (might cause NPE) { // compoundAssignment/postIncrement is the only usage of this field currentScope.problemReporter().unusedPrivateField(fieldBinding.sourceField()); } } } } /* report a local/arg that is only read from a 'special operator',
void reportOnlyUselesslyReadPrivateField(BlockScope currentScope, FieldBinding fieldBinding, boolean valueRequired) { if (valueRequired) { // access is relevant, turn compound use into real use: fieldBinding.compoundUseFlag = 0; fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; } else { if (fieldBinding.isUsedOnlyInCompound()) { fieldBinding.compoundUseFlag--; // consume one if (fieldBinding.compoundUseFlag == 0 // report only the last usage && fieldBinding.isOrEnclosedByPrivateType() && (this.implicitConversion & TypeIds.UNBOXING) == 0) // don't report if unboxing is involved (might cause NPE) { // compoundAssignment/postIncrement is the only usage of this field currentScope.problemReporter().unusedPrivateField(fieldBinding.sourceField()); } } } } /* report a local/arg that is only read from a 'special operator',
void reportOnlyUselesslyReadPrivateField(BlockScope currentScope, FieldBinding fieldBinding, boolean valueRequired) { if (valueRequired) { // access is relevant, turn compound use into real use: fieldBinding.compoundUseFlag = 0; fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; } else { if (fieldBinding.isUsedOnlyInCompound()) { fieldBinding.compoundUseFlag--; // consume one if (fieldBinding.compoundUseFlag == 0 // report only the last usage && fieldBinding.isOrEnclosedByPrivateType() && (this.implicitConversion & TypeIds.UNBOXING) == 0) // don't report if unboxing is involved (might cause NPE) { // compoundAssignment/postIncrement is the only usage of this field currentScope.problemReporter().unusedPrivateField(fieldBinding.sourceField()); fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; // don't report again } } } } /* report a local/arg that is only read from a 'special operator',
void reportOnlyUselesslyReadPrivateField(BlockScope currentScope, FieldBinding fieldBinding, boolean valueRequired) { if (valueRequired) { // access is relevant, turn compound use into real use: fieldBinding.compoundUseFlag = 0; fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; } else { if (fieldBinding.isUsedOnlyInCompound()) { fieldBinding.compoundUseFlag--; // consume one if (fieldBinding.compoundUseFlag == 0 // report only the last usage && fieldBinding.isOrEnclosedByPrivateType() && (this.implicitConversion & TypeIds.UNBOXING) == 0) // don't report if unboxing is involved (might cause NPE) { // compoundAssignment/postIncrement is the only usage of this field currentScope.problemReporter().unusedPrivateField(fieldBinding.sourceField()); fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; // don't report again } } } } /* report a local/arg that is only read from a 'special operator',
void reportOnlyUselesslyReadPrivateField(BlockScope currentScope, FieldBinding fieldBinding, boolean valueRequired) { if (valueRequired) { // access is relevant, turn compound use into real use: fieldBinding.compoundUseFlag = 0; fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; } else { if (fieldBinding.isUsedOnlyInCompound()) { fieldBinding.compoundUseFlag--; // consume one if (fieldBinding.compoundUseFlag == 0 // report only the last usage && fieldBinding.isOrEnclosedByPrivateType() && (this.implicitConversion & TypeIds.UNBOXING) == 0) // don't report if unboxing is involved (might cause NPE) { // compoundAssignment/postIncrement is the only usage of this field currentScope.problemReporter().unusedPrivateField(fieldBinding.sourceField()); } } } } /* report a local/arg that is only read from a 'special operator',
void reportOnlyUselesslyReadPrivateField(BlockScope currentScope, FieldBinding fieldBinding, boolean valueRequired) { if (valueRequired) { // access is relevant, turn compound use into real use: fieldBinding.compoundUseFlag = 0; fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; } else { if (fieldBinding.isUsedOnlyInCompound()) { fieldBinding.compoundUseFlag--; // consume one if (fieldBinding.compoundUseFlag == 0 // report only the last usage && fieldBinding.isOrEnclosedByPrivateType() && (this.implicitConversion & TypeIds.UNBOXING) == 0) // don't report if unboxing is involved (might cause NPE) { // compoundAssignment/postIncrement is the only usage of this field currentScope.problemReporter().unusedPrivateField(fieldBinding.sourceField()); fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; // don't report again } } } } /* report a local/arg that is only read from a 'special operator',
void reportOnlyUselesslyReadPrivateField(BlockScope currentScope, FieldBinding fieldBinding, boolean valueRequired) { if (valueRequired) { // access is relevant, turn compound use into real use: fieldBinding.compoundUseFlag = 0; fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; } else { if (fieldBinding.isUsedOnlyInCompound()) { fieldBinding.compoundUseFlag--; // consume one if (fieldBinding.compoundUseFlag == 0 // report only the last usage && fieldBinding.isOrEnclosedByPrivateType() && (this.implicitConversion & TypeIds.UNBOXING) == 0) // don't report if unboxing is involved (might cause NPE) { // compoundAssignment/postIncrement is the only usage of this field currentScope.problemReporter().unusedPrivateField(fieldBinding.sourceField()); fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; // don't report again } } } } /* report a local/arg that is only read from a 'special operator',
void reportOnlyUselesslyReadPrivateField(BlockScope currentScope, FieldBinding fieldBinding, boolean valueRequired) { if (valueRequired) { // access is relevant, turn compound use into real use: fieldBinding.compoundUseFlag = 0; fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; } else { if (fieldBinding.isUsedOnlyInCompound()) { fieldBinding.compoundUseFlag--; // consume one if (fieldBinding.compoundUseFlag == 0 // report only the last usage && fieldBinding.isOrEnclosedByPrivateType() && (this.implicitConversion & TypeIds.UNBOXING) == 0) // don't report if unboxing is involved (might cause NPE) { // compoundAssignment/postIncrement is the only usage of this field currentScope.problemReporter().unusedPrivateField(fieldBinding.sourceField()); fieldBinding.modifiers |= ExtraCompilerModifiers.AccLocallyUsed; // don't report again } } } } /* report a local/arg that is only read from a 'special operator',