protected < U > U lookup ( Lookup < U > lookup , int start , int depth ) { int size ; synchronized ( indexes ) { size = indexes . size ( ) ; for ( int i = start ; i < depth && i < size ; i ++ ) { U result = lookup . lookup ( indexes . get ( i ) ) ; if ( result != null ) return result ; } } if ( currentClass == null ) return null ; synchronized ( indexes ) { ClassReflectionIndex cri = index . getClassIndex ( currentClass ) ; indexes . add ( cri ) ; currentClass = currentClass . getSuperclass ( ) ; } return lookup ( lookup , size , depth ) ; }
Do lazy lookup .