/** * Returns true if the get method returns an array. This method is used for greater compatability * with generated descriptors. * * @param clazz the Class to find an accessor in * @param fieldName the field for which an accessor is sought * @param type the returning type of the accessor * @return if get method returns an array. **/ public boolean returnsArray(final Class clazz, final String fieldName, final Class type) { try { Class array = null; if (type.isArray()) { array = type; } else { array = Array.newInstance(type, 0).getClass(); } // -- getMethod String method = _javaNaming.getGetMethodNameForField(fieldName); boolean isGet = true; if (AbstractMappingLoader.findAccessor(clazz, method, array, isGet) != null) { return true; } } catch (Exception ex) { // nothing to do } return false; }
/** * Returns true if the get method returns an array. * This method is used for greater compatability with * generated descriptors. * @param clazz the Class to find an accessor in * @param fieldName the field for which an accessor is sought * @param type the returning type of the accessor * @return if get method returns an array. **/ public boolean returnsArray(final Class clazz, final String fieldName, final Class type) { try { Class array = null; if (type.isArray()) { array = type; } else { array = Array.newInstance(type, 0).getClass(); } //-- getMethod String method = _javaNaming.getGetMethodNameForField(fieldName); boolean isGet = true; if (AbstractMappingLoader.findAccessor(clazz, method, array, isGet) != null) { return true; } } catch (Exception ex) { // nothing to do } return false; }
methodName = _javaNaming.getGetMethodNameForField(fieldName); boolean isGet = true; if (AbstractMappingLoader.findAccessor(clazz, methodName, type, isGet) != null) {
methodName = _javaNaming.getGetMethodNameForField(fieldName); boolean isGet = true; if (AbstractMappingLoader.findAccessor(clazz, methodName, type, isGet) != null) {