<s> package org . eclipse . jdt . internal . compiler . ast ; import org . eclipse . jdt . internal . compiler . ASTVisitor ; import org . eclipse . jdt . internal . compiler . impl . CompilerOptions ; import org . eclipse . jdt . internal . compiler . lookup . * ; import org . eclipse . jdt . internal . compiler . problem . ProblemSeverities ; public class SingleTypeReference extends TypeReference { public char [ ] token ; public SingleTypeReference ( char [ ] source , long pos ) { this . token = source ; this . sourceStart = ( int ) ( pos >>> 32 ) ; this . sourceEnd = ( int ) ( pos & 0x00000000FFFFFFFFL ) ; } public TypeReference copyDims ( int dim ) { return new ArrayTypeReference ( this . token , dim , ( ( ( long ) this . sourceStart ) << 32 ) + this . sourceEnd ) ; } public char [ ] getLastToken ( ) { return this . token ; } protected TypeBinding getTypeBinding ( Scope scope ) { if ( this . resolvedType != null ) return this . resolvedType ; this . resolvedType = scope . getType ( this . token ) ; if ( scope . kind == Scope . CLASS_SCOPE && this . resolvedType . isValidBinding ( ) ) if ( ( ( ClassScope ) scope ) . detectHierarchyCycle ( this . resolvedType , this ) ) return null ; return this . resolvedType ; } public char [ ] [ ] getTypeName ( ) { return new char [ ] [ ] { this . token } ; } public StringBuffer printExpression ( int indent , StringBuffer output ) { return output . append ( this . token ) ; } public TypeBinding resolveTypeEnclosing ( BlockScope scope , ReferenceBinding enclosingType ) { TypeBinding memberType = this . resolvedType = scope . getMemberType ( this . token , enclosingType ) ; boolean hasError = false ; if ( ! memberType . isValidBinding ( ) ) { hasError = true ; scope . problemReporter ( ) . invalidEnclosingType ( this , memberType , enclosingType ) ; memberType = ( ( ReferenceBinding ) memberType ) . closestMatch ( ) ; if ( memberType == null ) { return null ; } } if ( isTypeUseDeprecated ( memberType , scope ) ) reportDeprecatedType ( memberType , scope ) ; memberType = scope . environment ( ) . convertToRawType ( memberType , false ) ; if ( memberType . isRawType ( ) && ( this . bits & IgnoreRawTypeCheck ) == 0 && scope . compilerOptions ( ) . getSeverity ( CompilerOptions . RawTypeReference ) != ProblemSeverities . Ignore ) { scope . problemReporter ( ) . rawTypeReference ( this , memberType ) ; } if ( hasError ) { return memberType ; } return this . resolvedType = memberType ; } 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>