Example usage for org.eclipse.jdt.internal.compiler.ast NullAnnotationMatching analyse

List of usage examples for org.eclipse.jdt.internal.compiler.ast NullAnnotationMatching analyse

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.ast NullAnnotationMatching analyse.

Prototype

public static NullAnnotationMatching analyse(TypeBinding requiredType, TypeBinding providedType,
        int nullStatus) 

Source Link

Document

Find any mismatches between the two given types, which are caused by null type annotations.

Usage

From source file:org.eclipse.objectteams.otdt.internal.core.compiler.ast.LiftingTypeReference.java

License:Open Source License

public void updateBindingAndCheckNullness(BlockScope scope) {
    this.baseReference.resolvedType = this.resolvedType;
    TypeBinding roleType = this.roleReference.resolvedType;
    if (roleType != null && roleType.isValidBinding()
            && scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled) {
        NullAnnotationMatching status = NullAnnotationMatching.analyse(roleType, this.resolvedType, -1);
        if (status.isAnyMismatch()) {
            scope.problemReporter().nullityMismatchingTypeAnnotation(this.fakedArgument.initialization,
                    this.resolvedType, roleType, status);
        }/*from  ww  w. j a v a  2s . c o m*/
    }
}