Code example for Field

Methods: get, getModifiers

0
			SyncException { 
		final Class<? extends JsonSyncableItem> syncable = getSyncClass(provider, toSync);
 
		try { 
			final Field syncMap = syncable.getField("SYNC_MAP");
			final int modifiers = syncMap.getModifiers();
			if (!Modifier.isStatic(modifiers)) {
				throw new SyncException("sync map for " + syncable + " is not static");
			} 
			return (SyncMap) syncMap.get(null);
 
		} catch (final SecurityException e) {
			final SyncException se = new SyncException("error extracting sync map");
			se.initCause(e);
			throw se;
		} catch (final NoSuchFieldException e) {
			final SyncException se = new SyncException("SYNC_MAP static field missing from "
					+ syncable);
			se.initCause(e);
			throw se;
		} catch (final IllegalArgumentException e) {