<s> package org . eclipse . jdt . internal . compiler . ast ; import org . eclipse . jdt . internal . compiler . ASTVisitor ; import org . eclipse . jdt . internal . compiler . impl . Constant ; import org . eclipse . jdt . internal . compiler . lookup . Binding ; import org . eclipse . jdt . internal . compiler . lookup . BlockScope ; import org . eclipse . jdt . internal . compiler . lookup . ClassScope ; import org . eclipse . jdt . internal . compiler . lookup . PackageBinding ; import org . eclipse . jdt . internal . compiler . lookup . ProblemReasons ; import org . eclipse . jdt . internal . compiler . lookup . Scope ; import org . eclipse . jdt . internal . compiler . lookup . TypeBinding ; public class JavadocSingleTypeReference extends SingleTypeReference { public int tagSourceStart , tagSourceEnd ; public PackageBinding packageBinding ; public JavadocSingleTypeReference ( char [ ] source , long pos , int tagStart , int tagEnd ) { super ( source , pos ) ; this . tagSourceStart = tagStart ; this . tagSourceEnd = tagEnd ; this . bits |= ASTNode . InsideJavadoc ; } protected TypeBinding internalResolveType ( Scope scope ) { this . constant = Constant . NotAConstant ; if ( this . resolvedType != null ) { if ( this . resolvedType . isValidBinding ( ) ) { return this . resolvedType ; } else { switch ( this . resolvedType . problemId ( ) ) { case ProblemReasons . NotFound : case ProblemReasons . NotVisible : case ProblemReasons . InheritedNameHidesEnclosingName : TypeBinding type = this . resolvedType . closestMatch ( ) ; return type ; default : return null ; } } } this . resolvedType = getTypeBinding ( scope ) ; if ( this . resolvedType == null ) return null ; if ( ! this . resolvedType . isValidBinding ( ) ) { char [ ] [ ] tokens = { this . token } ; Binding binding = scope . getTypeOrPackage ( tokens ) ; if ( binding instanceof PackageBinding ) { this . packageBinding = ( PackageBinding ) binding ; } else { if ( this . resolvedType . problemId ( ) == ProblemReasons . NonStaticReferenceInStaticContext ) { TypeBinding closestMatch = this . resolvedType . closestMatch ( ) ; if ( closestMatch != null && closestMatch . isTypeVariable ( ) ) { this . resolvedType = closestMatch ; return this . resolvedType ; } } reportInvalidType ( scope ) ; } return null ; } if ( isTypeUseDeprecated ( this . resolvedType , scope ) ) reportDeprecatedType ( this . resolvedType , scope ) ; if ( this . resolvedType . isGenericType ( ) || this . resolvedType . isParameterizedType ( ) ) { this . resolvedType = scope . environment ( ) . convertToRawType ( this . resolvedType , true ) ; } return this . resolvedType ; } protected void reportDeprecatedType ( TypeBinding type , Scope scope ) { scope . problemReporter ( ) . javadocDeprecatedType ( type , this , scope . getDeclarationModifiers ( ) ) ; } protected void reportInvalidType ( Scope scope ) { scope . problemReporter ( ) . javadocInvalidType ( this , this . resolvedType , scope . getDeclarationModifiers ( ) ) ; } public void traverse ( ASTVisitor visitor , BlockScope scope ) { visitor . visit ( this , scope ) ; visitor . endVisit ( this , scope ) ; } public void traverse ( ASTVisitor visitor , ClassScope scope ) { visitor . visit ( this , scope ) ; visitor . endVisit ( this , scope ) ; } } </s>