Bug 127861 [DataBinding] Mark API provisional
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/beans/JavaBeanTree.java
if (parentElement==null) 
			throw new BindingException ("Changing root element/s is not supported"); 
		
		Method[] setters = getWriteMethods(parentElement);
		
		if (setters==null || setters.length!=1)
			throw new BindingException("Can not determine children set method for: "+parentElement.getClass().getName()); 
		
		Method setter = setters[0];
		Class[] parameters = setter.getParameterTypes();
		Object arg;
		if (parameters[0].isArray())
			arg = children;
		else
			arg = Arrays.asList(children);		
		try {
			setter.invoke(parentElement, new Object[] { arg } );
		} catch (IllegalArgumentException e) {
			throw new BindingException(e.getLocalizedMessage());		
		} catch (IllegalAccessException e) {
			throw new BindingException(e.getLocalizedMessage());	
		} catch (InvocationTargetException e) {
			throw new BindingException(e.getLocalizedMessage());	
		}
		hookup(parentElement, children);		
		if (changeSupport!=null)
		   changeSupport.fireTreeChange(ChangeEvent.REPLACE, null, children, parentElement, -1);
	}
	public boolean hasChildren(Object element) {
		Object[] children = getChildren(element);