public Enumeration getElements(Object target) { try { return (Enumeration) sel.invoke( target ); } catch( Exception e ) { throw new RuntimeException("NSFoundationElementsAccessor being used with a non-foundation class: " + target.getClass().getName()); } }
/** * Returns the value for the given record. * If {@link #useMethod()} is given, the method is called and no further * action is taken if that fails. * Otherwise we use {@link NSKeyValueCoding} which also considers instance * variables. */ public Object valueForRecord(DRRecord rec) { Object aval = null; if (_useMethod) { try{ aval = _selKey.invoke(rec.rawRecord()); } catch(IllegalAccessException e) { } catch(IllegalArgumentException e) { } catch(java.lang.reflect.InvocationTargetException e) { } catch(NoSuchMethodException e) { } } else { aval = rec.rawRecord().valueForKeyPath(_key); } return aval; }
public void prepareSelectExpressionWithAttributes(NSArray<EOAttribute> attributes, boolean lock, EOFetchSpecification fetchSpec) { try { _fetchRange = _fetchRangeSelector.invoke(fetchSpec);
protected void _removeFromEntityArraySelector(NSArray oldArray, NSSelector sel) { if (oldArray.indexOfObject(this) != -1) { NSMutableArray newArray = new NSMutableArray(oldArray); newArray.removeIdenticalObject(this); try { sel.invoke(entity(), newArray); } catch (IllegalAccessException e) { throw NSForwardException._runtimeExceptionForThrowable(e); } catch (IllegalArgumentException e) { throw NSForwardException._runtimeExceptionForThrowable(e); } catch (InvocationTargetException e) { throw NSForwardException._runtimeExceptionForThrowable(e); } catch (NoSuchMethodException e) { throw NSForwardException._runtimeExceptionForThrowable(e); } } }
value1 = _valueFactoryMethod.invoke(valueFactoryClass()==null?_valueClass:valueFactoryClass(), value); } catch (IllegalAccessException e) { throw NSForwardException._runtimeExceptionForThrowable(e); value1 = _valueFactoryMethod.invoke(valueFactoryClass()==null?_valueClass:valueFactoryClass(), new Object[] { bytes, _NSUtilities.IntegerForInt(length) }); } catch (IllegalAccessException e) { throw NSForwardException._runtimeExceptionForThrowable(e);
value = _valueFactoryMethod.invoke(valueFactoryClass()==null?_valueClass:valueFactoryClass(), str); } catch (IllegalAccessException e) { throw NSForwardException._runtimeExceptionForThrowable(e); value = _valueFactoryMethod.invoke(valueFactoryClass()==null?_valueClass:valueFactoryClass(), _NSStringUtilities.bytesForString(str, CharEncoding.UTF_8)); if (!NSLog.debugLoggingAllowedForLevelAndGroups(NSLog.DebugLevelInformational, NSLog.DebugGroupDatabaseAccess)) break; value = _valueFactoryMethod.invoke(valueFactoryClass()==null?_valueClass:valueFactoryClass(), new NSData(str, CharEncoding.UTF_8)); if (!NSLog.debugLoggingAllowedForLevelAndGroups(NSLog.DebugLevelInformational, NSLog.DebugGroupDatabaseAccess)) break;
value = _valueFactoryMethod.invoke(valueFactoryClass()==null?_valueClass:valueFactoryClass(), data); } catch (IllegalAccessException e) { throw NSForwardException._runtimeExceptionForThrowable(e); value = _valueFactoryMethod.invoke(valueFactoryClass()==null?_valueClass:valueFactoryClass(), bytes); } catch (IllegalAccessException e) { throw NSForwardException._runtimeExceptionForThrowable(e); value = _valueFactoryMethod.invoke(valueFactoryClass()==null?_valueClass:valueFactoryClass(), _NSStringUtilities.stringForBytes(bytes, CharEncoding.UTF_8)); if (!NSLog.debugLoggingAllowedForLevelAndGroups(NSLog.DebugLevelInformational, NSLog.DebugGroupDatabaseAccess)) break;