private IType cacheType ( String name , Pair < IType , ITypeLoader > pair ) { if ( pair != null ) { IType type = pair . getFirst ( ) ; // We have to make sure we aren't replacing an existing type so we obey the return from the put. IType oldType = _typesByName . get ( name ) ; if ( oldType != null && oldType != CACHE_MISS ) { return oldType ; } _typesByName . add ( name , type ) ; ITypeLoader typeLoader = pair . getSecond ( ) ; if ( typeLoader != null && ! typeLoader . isCaseSensitive ( ) ) { _typesByCaseInsensitiveName . put ( name , type ) ; } } return pair != null ? pair . getFirst ( ) : null ; }
Adds the type to the cache .