if ((typeParameter.binding.modifiers & ExtraCompilerModifiers.AccLocallyUsed) == 0) {
this.scope.problemReporter().unusedTypeParameter(typeParameter);
}
}
}
ExceptionHandlingFlowContext methodContext =
new ExceptionHandlingFlowContext(
flowContext,
this,
this.binding.thrownExceptions,
null,
this.scope,
FlowInfo.DEAD_END);
// nullity and mark as assigned
analyseArguments(flowInfo);
if (this.binding.declaringClass instanceof MemberTypeBinding && !this.binding.declaringClass.isStatic()) {
// method of a non-static member type can't be static.
this.bits &= ~ASTNode.CanBeStatic;
}
// propagate to statements
if (this.statements != null) {
boolean enableSyntacticNullAnalysisForFields = this.scope.compilerOptions().enableSyntacticNullAnalysisForFields;
int complaintLevel = (flowInfo.reachMode() & FlowInfo.UNREACHABLE) == 0 ? Statement.NOT_COMPLAINED : Statement.COMPLAINED_FAKE_REACHABLE;
for (int i = 0, count = this.statements.length; i < count; i++) {
Statement stat = this.statements[i];
if ((complaintLevel = stat.complainIfUnreachable(flowInfo, this.scope, complaintLevel, true)) < Statement.COMPLAINED_UNREACHABLE) {
flowInfo = stat.analyseCode(this.scope, methodContext, flowInfo);
}
if (enableSyntacticNullAnalysisForFields) {
methodContext.expireNullCheckedFieldInfo();
}
}
} else {
// method with empty body should not be flagged as static.
this.bits &= ~ASTNode.CanBeStatic;
}
// check for missing returning path
TypeBinding returnTypeBinding = this.binding.returnType;
if ((returnTypeBinding == TypeBinding.VOID) || isAbstract()) {
if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0) {
this.bits |= ASTNode.NeedFreeReturn;
}
} else {
if (flowInfo != FlowInfo.DEAD_END) {
this.scope.problemReporter().shouldReturn(returnTypeBinding, this);
}
}
// check unreachable catch blocks
methodContext.complainIfUnusedExceptionHandlers(this);
// check unused parameters
this.scope.checkUnusedParameters(this.binding);
// check if the method could have been static
if (!this.binding.isStatic() && (this.bits & ASTNode.CanBeStatic) != 0) {
if(!this.binding.isOverriding() && !this.binding.isImplementing()) {