/** * Makes sure the item type is not null. * * {@inheritDoc} */ @Override protected void validate() { super.validate(); if (itemType == null) { throw new IllegalStateException("An item type should be set."); } }
/** * Makes sure the item type is not null. * * {@inheritDoc} */ @Override protected void validate() { super.validate(); if (itemType == null) { throw new IllegalStateException("An item type should be set."); } }
@Override protected void validate() throws IllegalStateException { super.validate(); if (value == null) { throw new IllegalStateException("The value of yt:aspectRatio may not be null."); } } }
@Override protected void validate() throws IllegalStateException { super.validate(); if (value == null) { throw new IllegalStateException("The value of yt:aspectRatio may not be null."); } } }
public void generate(XmlWriter w, ExtensionProfile p) throws IOException { // validate if (namespace == null) { String name = this.getClass().getName(); throw new IllegalStateException( "No @ExtensionDescription.Default annotation found on subclass " + name.substring(name.lastIndexOf('.') + 1)); } validate(); // generate attributes AttributeGenerator generator = new AttributeGenerator(); putAttributes(generator); List<XmlWriter.Attribute> attrs = new ArrayList<XmlWriter.Attribute>(); generateAttributes(attrs, generator); // generate XML generate(w, p, namespace, localName, attrs, generator); }
public void generate(XmlWriter w, ExtensionProfile p) throws IOException { // validate if (namespace == null) { String name = this.getClass().getName(); throw new IllegalStateException( "No @ExtensionDescription.Default annotation found on subclass " + name.substring(name.lastIndexOf('.') + 1)); } if (isStrictValidation()) { validate(); } // generate attributes AttributeGenerator generator = new AttributeGenerator(); putAttributes(generator); List<XmlWriter.Attribute> attrs = new ArrayList<XmlWriter.Attribute>(); generateAttributes(attrs, generator); // generate XML generate(w, p, namespace, localName, attrs, generator); }
public void generate(XmlWriter w, ExtensionProfile p) throws IOException { // validate if (namespace == null) { String name = this.getClass().getName(); throw new IllegalStateException( "No @ExtensionDescription.Default annotation found on subclass " + name.substring(name.lastIndexOf('.') + 1)); } if (isStrictValidation()) { validate(); } // generate attributes AttributeGenerator generator = new AttributeGenerator(); putAttributes(generator); List<XmlWriter.Attribute> attrs = new ArrayList<XmlWriter.Attribute>(); generateAttributes(attrs, generator); // generate XML generate(w, p, namespace, localName, attrs, generator); }
@Override public void processEndElement() throws ParseException { /* don't call super.processEndElement() because it doesn't allow text() data */ // consume attributes if (helper != null) { helper.setContent(value); consumeAttributes(helper); helper.assertAllConsumed(); } // validate try { validate(); } catch (IllegalStateException e) { throw new ParseException(e.getMessage(), e); } } }
@Override public void processEndElement() throws ParseException { /* don't call super.processEndElement() because it doesn't allow text() data */ // consume attributes if (helper != null) { helper.setContent(value); consumeAttributes(helper); } if (isStrictValidation()) { // validate try { validate(); } catch (IllegalStateException e) { throw new ParseException(e.getMessage(), e); } } } }
@Override public void processEndElement() throws ParseException { /* don't call super.processEndElement() because it doesn't allow text() data */ // consume attributes if (helper != null) { helper.setContent(value); consumeAttributes(helper); } if (isStrictValidation()) { // validate try { validate(); } catch (IllegalStateException e) { throw new ParseException(e.getMessage(), e); } } } }