public void makeFirst ( NonDelayedClassInfo classInfo ) { String methodName = "makeFirst" ; boolean doLog = tc . isDebugEnabled ( ) ; String useHashText = ( doLog ? getHashText ( ) : null ) ; String useClassHashText = ( doLog ? classInfo . getHashText ( ) : null ) ; if ( doLog ) { logLinks ( methodName , classInfo ) ; } if ( classInfo == firstClassInfo ) { if ( doLog ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] Already first [ {1} ]" , new Object [ ] { useHashText , useClassHashText } ) ) ; } return ; } else if ( classInfo == lastClassInfo ) { if ( doLog ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] Moving from last [ {1} ]" , new Object [ ] { useHashText , useClassHashText } ) ) ; Tr . debug ( tc , MessageFormat . format ( "[ {0} ] Old first [ {1} ]" , new Object [ ] { useHashText , firstClassInfo . getHashText ( ) } ) ) ; } lastClassInfo = classInfo . getPriorClassInfo ( ) ; lastClassInfo . setNextClassInfo ( null ) ; if ( doLog ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] New last [ {1} ]" , new Object [ ] { useHashText , lastClassInfo . getHashText ( ) } ) ) ; } firstClassInfo . setPriorClassInfo ( classInfo ) ; classInfo . setPriorClassInfo ( null ) ; classInfo . setNextClassInfo ( firstClassInfo ) ; firstClassInfo = classInfo ; } else { if ( doLog ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] Moving from middle [ {1} ]" , new Object [ ] { useHashText , useClassHashText } ) ) ; Tr . debug ( tc , MessageFormat . format ( "[ {0} ] Old first [ {1} ]" , new Object [ ] { useHashText , firstClassInfo . getHashText ( ) } ) ) ; } NonDelayedClassInfo currentPrior = classInfo . getPriorClassInfo ( ) ; NonDelayedClassInfo currentNext = classInfo . getNextClassInfo ( ) ; currentPrior . setNextClassInfo ( currentNext ) ; currentNext . setPriorClassInfo ( currentPrior ) ; firstClassInfo . setPriorClassInfo ( classInfo ) ; classInfo . setNextClassInfo ( firstClassInfo ) ; classInfo . setPriorClassInfo ( null ) ; firstClassInfo = classInfo ; } }
The class info is last or the class info is somewhere in the middle .