private void replaceParentClassesForAtomics ( ClassOrInterfaceDeclaration n ) { for ( ClassOrInterfaceType parent : n . getExtendedTypes ( ) ) { if ( "ConcurrentCircularArrayQueue" . equals ( parent . getNameAsString ( ) ) ) { parent . setName ( "AtomicReferenceArrayQueue" ) ; } else if ( "ConcurrentSequencedCircularArrayQueue" . equals ( parent . getNameAsString ( ) ) ) { parent . setName ( "SequencedAtomicReferenceArrayQueue" ) ; } else { // Padded super classes are to be renamed and thus so does the // class we must extend. parent . setName ( translateQueueName ( parent . getNameAsString ( ) ) ) ; } } }
Searches all extended or implemented super classes or interfaces for special classes that differ with the atomics version and replaces them with the appropriate class .