return new FromObjectArray(allocate(itemClass, config));
final JPConverter aConverter = JPConverter.allocate (aArg.getClass (), null, m_aConfiguration);
final JPConverter aConverter = JPConverter.allocate (aArg.getClass (), null, m_aConfiguration);
@Override public Sequence<?> call(XPathContext context, Sequence[] arguments) throws XPathException { Configuration config = context.getConfiguration(); Object value = resolver.resolveVariable(name.toJaxpQName()); if (value == null) { return EmptySequence.getInstance(); } JPConverter converter = JPConverter.allocate(value.getClass(), null, config); return converter.convert(value, context); }
@Override public Sequence<?> call(XPathContext context, Sequence[] arguments) throws XPathException { Configuration config = context.getConfiguration(); Object value = resolver.resolveVariable(name.toJaxpQName()); if (value == null) { return EmptySequence.getInstance(); } JPConverter converter = JPConverter.allocate(value.getClass(), null, config); return converter.convert(value, context); }
return new FromObjectArray(allocate(itemClass, null, config));
return new FromObjectArray(allocate(itemClass, null, config));
return EmptySequence.getInstance(); JPConverter converter = JPConverter.allocate(result.getClass(), null, config); return converter.convert(result, context); } catch (XPathFunctionException e) {
return EmptySequence.getInstance(); JPConverter converter = JPConverter.allocate(result.getClass(), null, config); return converter.convert(result, context); } catch (XPathFunctionException e) {
JPConverter converter = JPConverter.allocate(node.getClass(), null, config); NodeInfo nodeInfo = (NodeInfo) converter.convert(node, new EarlyEvaluationContext(config)); return XdmItem.wrapItem(nodeInfo);
JPConverter converter = JPConverter.allocate(node.getClass(), null, config); NodeInfo nodeInfo = (NodeInfo) converter.convert(node, new EarlyEvaluationContext(config)); return (XdmNode) XdmItem.wrapItem(nodeInfo);
resultConverter = JPConverter.allocate(theClass, config); } else if (theMethod instanceof Method) { Class resultClass = ((Method)theMethod).getReturnType(); resultConverter = JPConverter.allocate(resultClass, config); } else if (theMethod instanceof Field) { Class resultClass = ((Field)theMethod).getType(); resultConverter = JPConverter.allocate(resultClass, config); } else { throw new AssertionError("Unknown component type");
JPConverter converter = JPConverter.allocate(obj.getClass(), context.getConfiguration()); ValueRepresentation val = converter.convert(obj, context);
public static AtomicValue convertToAtomicValue(Object value) throws TransformerException { if (value instanceof java.util.Date) { //special handling for time types java.util.Date d = (java.util.Date)value; DateTimeValue tdv = DateTimeValue.fromJavaDate(d); if (value instanceof Date) { value = new DateValue(tdv.getYear(), tdv.getMonth(), tdv.getDay(), tdv.getTimezoneInMinutes(), true); } else if (value instanceof Time) { value = new TimeValue(tdv.getHour(), tdv.getMinute(), tdv.getSecond(), tdv.getMicrosecond(), tdv.getTimezoneInMinutes()); } else if (value instanceof Timestamp) { Timestamp ts = (Timestamp)value; value = tdv.add(DayTimeDurationValue.fromMicroseconds(ts.getNanos() / 1000)); } return (AtomicValue)value; } JPConverter converter = JPConverter.allocate(value.getClass(), null, null); return (AtomicValue)converter.convert(value, null); }
public static AtomicValue convertToAtomicValue(Object value) throws TransformerException { if (value instanceof java.util.Date) { //special handling for time types java.util.Date d = (java.util.Date)value; DateTimeValue tdv = DateTimeValue.fromJavaDate(d); if (value instanceof Date) { value = new DateValue(tdv.getYear(), tdv.getMonth(), tdv.getDay(), tdv.getTimezoneInMinutes(), true); } else if (value instanceof Time) { value = new TimeValue(tdv.getHour(), tdv.getMinute(), tdv.getSecond(), tdv.getMicrosecond(), tdv.getTimezoneInMinutes()); } else if (value instanceof Timestamp) { Timestamp ts = (Timestamp)value; value = tdv.add(DayTimeDurationValue.fromMicroseconds(ts.getNanos() / 1000)); } return (AtomicValue)value; } JPConverter converter = JPConverter.allocate(value.getClass(), null); return (AtomicValue)converter.convert(value, null); }
public static AtomicValue convertToAtomicValue(Object value) throws TransformerException { if (value instanceof java.util.Date) { //special handling for time types java.util.Date d = (java.util.Date)value; DateTimeValue tdv = DateTimeValue.fromJavaDate(d); if (value instanceof Date) { value = new DateValue(tdv.getYear(), tdv.getMonth(), tdv.getDay(), tdv.getTimezoneInMinutes(), true); } else if (value instanceof Time) { value = new TimeValue(tdv.getHour(), tdv.getMinute(), tdv.getSecond(), tdv.getMicrosecond(), tdv.getTimezoneInMinutes()); } else if (value instanceof Timestamp) { Timestamp ts = (Timestamp)value; value = tdv.add(DayTimeDurationValue.fromMicroseconds(ts.getNanos() / 1000)); } return (AtomicValue)value; } JPConverter converter = JPConverter.allocate(value.getClass(), null, null); return (AtomicValue)converter.convert(value, null); }
converted = new ObjectValue<>(value); } else { JPConverter converter = JPConverter.allocate(value.getClass(), null, config); XPathContext context = getUnderlyingController().newXPathContext(); converted = converter.convert(value, context);
converted = new ObjectValue<>(value); } else { JPConverter converter = JPConverter.allocate(value.getClass(), null, config); XPathContext context = getUnderlyingController().newXPathContext(); converted = converter.convert(value, context);
contextItem = (Item) node; } else { JPConverter converter = JPConverter.allocate(node.getClass(), null, config); Sequence<?> val; try {
contextItem = (Item) node; } else { JPConverter converter = JPConverter.allocate(node.getClass(), null, config); Sequence<?> val; try {