Code example for Cache

Methods: get

0
 
		final Class<?> modelClass = model.getClass();
		QWidget view = null;
 
		try { 
			final Optional<Method> viewGetter = ViewDiscovery.views.get(model.getClass(),
																		new Callable<Optional<Method>>() {
																			@Override 
																			public Optional<Method> call() {
																				return getView(modelClass);
																			} 
																		}); 
			if (viewGetter.isPresent()) {
				final Method viewGetterMethod = viewGetter.get();
				try { 
					final Object foundView = viewGetterMethod.invoke(model);
 
					if (foundView instanceof QWidget) { 
						view = (QWidget) foundView;
					} else { 
Experience pair programming with AI  Get Codota for Java