throw new XPathException("unable to convert the Java object to an XPath value");
return new JavaObjectValue(obj);
	public final static Sequence javaObjectToXPath(Object obj) throws XPathException {		if(obj == null)			return null;		if(obj instanceof Sequence)			return (Sequence)obj;		else if(obj instanceof String)			return new StringValue((String)obj);		else if(obj instanceof Boolean)			return new BooleanValue(((Boolean)obj).booleanValue());		else if(obj instanceof Float)			return new DoubleValue(((Float)obj).doubleValue());		else if(obj instanceof Double)			return new DoubleValue(((Double)obj).doubleValue());		else if(obj instanceof Short)			return new IntegerValue(((Short)obj).longValue());		else if(obj instanceof Integer)			return new IntegerValue(((Integer)obj).longValue());		else if(obj instanceof Long)			return new IntegerValue(((Long)obj).longValue());		else if(obj instanceof List) {			boolean createNodeSequence = true;			Object next;			for(Iterator i = ((List)obj).iterator(); i.hasNext(); ) {				next = i.next();				if(!(next instanceof NodeProxy))					createNodeSequence = false;			}			Sequence seq = null;			if(createNodeSequence)				seq = new AVLTreeNodeSet();			else				seq = new ValueSequence();			for(Iterator i = ((List)obj).iterator(); i.hasNext(); ) {				seq.add((Item)javaObjectToXPath(i.next()));			}			return seq;		} else			throw new XPathException("unable to convert the Java object to an XPath value");	}