org.eclipse.edje/src/main/java/org/eclipse/edje/DefaultPeripheralRegistry.java
private P findNext() {
			while (true) {
				if (currentRecord == null) {
					// find next record
					Class<P> c;
					try {
						c = classes[++classPtr];
					} catch (ArrayIndexOutOfBoundsException e) {
						return null;
					}

					@SuppressWarnings("unchecked")
					ClassRecord<P> cr = (ClassRecord<P>) peripheralClassRecords.get(c);
					if (cr != null) { // may have been removed since the
										// snapshot has been taken
						currentRecord = cr;
						peripheralPtr = -1;
					} else {
						continue; // find next record
					}
				}

				// here, currentRecord != null
				ArrayList<PeripheralEntry<P>> peripherals = currentRecord.peripherals;
				try {
					P p = peripherals.get(++peripheralPtr).peripheral;
					try {
						checkRead(classes[classPtr], p);
					} catch (SecurityException ex) {
						// we skip this if you can't read it
						continue;
					}
					return p;
				} catch (IndexOutOfBoundsException e) {
					currentRecord = null;
					continue; // find next record
				}
			}
		}
/**
		 * Retrieves next peripheral.
		 *
		 * @return next peripheral
		 */
Retrieves next peripheral.
@return next peripheral
Retrieves next peripheral . @return next peripheral
private P findNext() {
			while (true) {
				if (currentRecord == null) {
					Class<P> c;
					try {
						c = classes[++classPtr];
					} catch (ArrayIndexOutOfBoundsException e) {
						return null;
					}
					@SuppressWarnings("unchecked")
					ClassRecord<P> cr = (ClassRecord<P>) peripheralClassRecords.get(c);
					if (cr != null) { 
						currentRecord = cr;
						peripheralPtr = -1;
					} else {
						continue; 
					}
				}
				ArrayList<PeripheralEntry<P>> peripherals = currentRecord.peripherals;
				try {
					P p = peripherals.get(++peripheralPtr).peripheral;
					try {
						checkRead(classes[classPtr], p);
					} catch (SecurityException ex) {
						continue;
					}
					return p;
				} catch (IndexOutOfBoundsException e) {
					currentRecord = null;
					continue; 
				}
			}
		}
private P findNext ( ) { while ( true ) { if ( currentRecord == null ) { Class < P > c ; try { c = classes [ ++ classPtr ] ; } catch ( ArrayIndexOutOfBoundsException e ) { return null ; } @ SuppressWarnings ( "unchecked" ) ClassRecord < P > cr = ( ClassRecord < P > ) peripheralClassRecords . get ( c ) ; if ( cr != null ) { currentRecord = cr ; peripheralPtr = - 1 ; } else { continue ; } } ArrayList < PeripheralEntry < P > > peripherals = currentRecord . peripherals ; try { P p = peripherals . get ( ++ peripheralPtr ) . peripheral ; try { checkRead ( classes [ classPtr ] , p ) ; } catch ( SecurityException ex ) { continue ; } return p ; } catch ( IndexOutOfBoundsException e ) { currentRecord = null ; continue ; } } }
Retrieves next peripheral.
Retrieves next peripheral .
// find next record // may have been removed since the // snapshot has been taken // find next record // here, currentRecord != null // we skip this if you can't read it // find next record