/** * Returns the currently collected comments. * @return the comments. */ public String[] getComments() { return getCommentHandler().getComments(); }
/** * Creates a new ParseException with the given root exception * and the locator. * * @param e the exception * @param locator the locator of the parser */ public ParseException(final Exception e, final Locator locator) { super(e); fillLocation(locator); }
/** * Returns the configuration property with the specified key. * * @param key the property key. * @return the property value. */ public String getConfigProperty(final String key) { return getConfigProperty(key, null); }
throws SAXException { try { peekFactory().endElement(qName); throw new ParseException(e, getLocator()); getCommentHandler().clearComments();
throws SAXException { try { peekFactory().startElement(qName, attributes); throw new ParseException(e, getLocator()); getCommentHandler().clearComments();
/** * Receive notification of character data inside an element. * * <p>By default, do nothing. Application writers may override this * method to take specific actions for each chunk of character data * (such as adding the data to a node or buffer, or printing it to * a file).</p> * * @param ch the characters. * @param start the start position in the character array. * @param length the number of characters to use from the character array. * * @exception SAXException Any SAX exception, possibly wrapping another exception. * @see org.xml.sax.ContentHandler#characters */ public void characters(final char[] ch, final int start, final int length) throws SAXException { try { peekFactory().characters(ch, start, length); } catch (ParseException pe) { throw pe; } catch (Exception e) { throw new ParseException(e, getLocator()); } }
/** * Creates a new instance of the currently set default handler and sets the contentbase * for the handler to <code>contentBase</code>. * * @param contentBase the content base. * * @return the report handler. */ protected FrontendDefaultHandler createDefaultHandler(final URL contentBase) { final FrontendDefaultHandler handler = getDefaultHandler().newInstance(); if (contentBase != null) { handler.setConfigProperty(Parser.CONTENTBASE_KEY, contentBase.toExternalForm()); } return handler; }
/** * Default Constructor. */ public AbstractModelReader() { this.commentHandler = new CommentHandler(); }
/** * Receive notification of the beginning of the document. * * <p>By default, do nothing. Application writers may override this * method in a subclass to take specific actions at the beginning * of a document (such as allocating the root node of a tree or * creating an output file).</p> * * @exception SAXException Any SAX exception, possibly wrapping another exception. * @see org.xml.sax.ContentHandler#startDocument */ public void startDocument() throws SAXException { this.activeFactories.clear(); pushFactory(getInitialFactory()); }
/** * Returns a new instance of {@link FrontendDefaultHandler}. * * @return A new instance. */ public final FrontendDefaultHandler newInstance() { return getInstance(); }
/** * Returns the single instance of this class. * * @return The single instance of information about the JCommon library. */ public static synchronized JCommonXMLInfo getInstance() { if (singleton == null) { singleton = new JCommonXMLInfo(); } return singleton; }
/** * Parses a color entry. If the entry is in hexadecimal or ocal notation, the color is * created using Color.decode(). If the string denotes a constant name of on of the color * constants defined in java.awt.Color, this constant is used. * <p> * As fallback the color black is returned if no color can be parsed. * * @param color the color (as a string). * * @return the paint. */ public static Color parseColor(final String color) { return parseColor(color, Color.black); }
/** * Pops a handler from the stack. * * @return The handler. */ public ElementDefinitionHandler popFactory() { this.activeFactories.pop(); return peekFactory(); }
function CommentHandler() { this.Text = 'Hello World'; } CommentHandler.prototype.SayHello = function () { document.write(this.Text); } var myCommentHandler = new CommentHandler(); myCommentHandler.SayHello();
/** * Creates a new ParseException with the given message, root exception * and the locator. * * @param s the message * @param e the exception * @param locator the locator of the parser */ public ParseException(final String s, final Exception e, final Locator locator) { super(s, e); fillLocation(locator); }
/** * Default constructor. */ protected FrontendDefaultHandler() { this.parserConfiguration = new DefaultConfiguration(); this.commentHandler = new CommentHandler(); }
/** * Creates a new ParseException with the given message and the locator. * * @param message the message * @param locator the locator of the parser */ public ParseException(final String message, final Locator locator) { super(message); fillLocation(locator); }
/** * Creates a new ParseException with the given message. * * @param message the message */ public ParseException(final String message) { super(message); fillLocation(null); }
/** * Creates a new ParseException with the given root exception. * * @param e the exception */ public ParseException(final Exception e) { super(e); fillLocation(null); }
/** * Creates a new ParseException with the given message and root exception. * * @param s the message * @param e the exception */ public ParseException(final String s, final Exception e) { super(s, e); fillLocation(null); }