/** * Returns a new instance. */ public static XmlWriter of(BufferedSink source) { return new XmlWriter(source); }
/** * Returns a new parameterized type, applying {@code typeArguments} to {@code rawType}. */ public static ParameterizedType newParameterizedType(Type rawType, Type... typeArguments) { return new ParameterizedTypeImpl(null, rawType, typeArguments); }
/** * Returns true if the current xml element has another a body which contains either a value or * other child xml elements ( objects ) */ public boolean hasTextContent() throws IOException { int p = peeked; if (p == PEEKED_NONE) { p = doPeek(); } return p == PEEKED_ELEMENT_TEXT_CONTENT || p == PEEKED_CDATA; }
@Override public void fromXml(XmlReader reader, TikXmlConfig config, Company value) throws IOException { try { value.founded = config.getTypeConverter(Date.class).read(reader.nextTextContent()); } catch (Exception e) { throw new IOException(e); } } });
/** * Skip the entire attribute (attribute name and attribute value) * * @throws IOException */ public void skipAttribute() throws IOException { nextAttributeName(); skipAttributeValue(); }
@Override public void fromXml(XmlReader reader, TikXmlConfig config, Company value) throws IOException { value.otherText = reader.nextTextContent(); } });
@Override public void fromXml(XmlReader reader, TikXmlConfig config, Company value) throws IOException { value.name = reader.nextAttributeValue(); } });
@Override public void fromXml(XmlReader reader, TikXmlConfig config, Company value) throws IOException { value.id = reader.nextAttributeValueAsInt(); } });
/** * Returns a type that represents an unknown type that extends {@code bound}. For example, if * {@code bound} is {@code CharSequence.class}, this returns {@code ? extends CharSequence}. If * {@code bound} is {@code Object.class}, this returns {@code ?}, which is shorthand for {@code * ? extends Object}. */ public static WildcardType subtypeOf(Type bound) { return new WildcardTypeImpl(new Type[] { bound }, EMPTY_TYPE_ARRAY); }
/** * Returns a XPath to the current location in the XML value. */ public String getPath() { return XmlScope.getPath(stackSize, stack, pathNames, pathIndices); }
@Override public void fromXml(XmlReader reader, TikXmlConfig config, Company value) throws IOException { try { value.founded = config.getTypeConverter(Date.class).read(reader.nextTextContent()); } catch (Exception e) { throw new IOException(e); } } });
@Override public void fromXml(XmlReader reader, TikXmlConfig config, Company value) throws IOException { value.otherText = reader.nextTextContent(); } });
@Override public void fromXml(XmlReader reader, TikXmlConfig config, Company value) throws IOException { value.name = reader.nextAttributeValue(); } });
@Override public void fromXml(XmlReader reader, TikXmlConfig config, Company value) throws IOException { value.id = reader.nextAttributeValueAsInt(); } });
/** * Returns a type that represents an unknown supertype of {@code bound}. For example, if {@code * bound} is {@code String.class}, this returns {@code ? super String}. */ public static WildcardType supertypeOf(Type bound) { return new WildcardTypeImpl(new Type[] { Object.class }, new Type[] { bound }); }
@Override public void fromXml(XmlReader reader, TikXmlConfig config, Company value) throws IOException { value.otherText = reader.nextTextContent(); } });
@Override public void fromXml(XmlReader reader, TikXmlConfig config, Company value) throws IOException { value.name = reader.nextAttributeValue(); } });
@Override public void fromXml(XmlReader reader, TikXmlConfig config, Company value) throws IOException { value.id = reader.nextAttributeValueAsInt(); } });
@Override public void fromXml(XmlReader reader, TikXmlConfig config, Company value) throws IOException { value.legalForm = reader.nextTextContent(); } });
@Override public void fromXml(XmlReader reader, TikXmlConfig config, Company value) throws IOException { value.name = reader.nextAttributeValue(); } });