850N/A * The contents of this file are subject to the terms of the 850N/A * Common Development and Distribution License (the "License"). 850N/A * You may not use this file except in compliance with the License. 850N/A * language governing permissions and limitations under the License. 850N/A * When distributing Covered Code, include this CDDL HEADER in each 850N/A * If applicable, add the following below this CDDL HEADER, with the 850N/A * fields enclosed by brackets "[]" replaced with your own identifying 850N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1259N/A * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. 1370N/A * Portions Copyright 2011, 2012 Jens Elkner. 1020N/A * Base class for Xref lexers. 1461N/A /** Where to write xref content. */ 1461N/A /** URL prefix to use when generating search URLs. Per default this is 1470N/A * {@link Configuration#getUrlPrefix()}.*/ 1461N/A /** Annotation to use when writing out annotation info.*/ 1461N/A /** The project, to which this instance is related to. */ 1461N/A /** symbol definitions to use when writing out related info */ 1370N/A * A stack of <span ...> CSS class names currently opened. 1370N/A * It is used to close all open spans for a line and re-open them at the 1370N/A * start of the next line to produce wellformed XML. So if a 1370N/A * <span ...> is opened and do not closed on the same line, the class 1370N/A * name used needs to be pushed onto this stack. If the <span ...> 1370N/A * gets closed on a different line, it needs to be popped from this stack. 1370N/A * If properly done, the stack should be empty when the last line has been 1370N/A * Create a new empty instance with the default capacity. 1370N/A * The preferred method to add a new span class name to this instance. 1370N/A * @param s class name to add. 1370N/A * @throws IllegalArgumentException if the given argument is {@code null}. 1370N/A * The preferred method to remove the last element from this stack. 1370N/A * @return {@code null} if the stack is empty, the removed element 1370N/A /** the {@link SpanStack} for this and only this instance */ 1121N/A /** EOF value returned by yylex(). */ 1470N/A /** See {@link Configuration#getUserPage()}. Per default initialized 1190N/A * in the constructor and here to be consistent and avoid lot of 1470N/A /** See {@link Configuration#getUserPageSuffix()}. Per default 1190N/A * initialized in the constructor and here to be consistent and avoid lot of 1461N/A /** Stack to remember the order of relevant states for the current parser. 1461N/A /** Stack to remember the order of relevant state related labels for the 1461N/A * current parser. To keep consistency, {@link #stateStack} opertions should 1461N/A * always performed accordingly to this instance (i.e. if you wanna pop, 1259N/A * Description of the style to use for a type of definitions. 1259N/A /** Name of the style definition as given by CTags. */ 1259N/A /** Class name used by the style sheets when rendering the xref. */ 1259N/A * The title of the section to which this type belongs, or {@code null} 1259N/A * if this type should not be listed in the navigation panel. 1259N/A /** Construct a style description. */ 1259N/A * Description of styles to use for different types of definitions. 1370N/A * Create a new lexer instance. Initializes {@link #userPageLink}, 1370N/A * {@link #userPageSuffix} using the runtime environment and creates a new 1470N/A * @see Configuration#getUserPage() 1470N/A * @see Configuration#getUserPageSuffix() 1121N/A // TODO when bug #16053 is fixed, we should add a getter to a file 1121N/A // that's included from all the Xref classes so that we avoid the 1121N/A // The auto-generated constructors for the Xref classes don't 1121N/A // expect a checked exception, so wrap it in an AssertionError. 1121N/A // This should never happen, since all the Xref classes will get 1121N/A // a public static YYEOF field from JFlex. 1121N/A throw ae;
// NOPMD (stack trace is preserved by initCause(), but 1121N/A * Reinitialize the xref with new contents. 1121N/A * @param contents a char buffer with text to analyze 1121N/A * @param length the number of characters to use from the char buffer 1461N/A * Set the symbol defintions to use when writing out related info. 1461N/A * @param defs symbol definitions to use. Might be {@code null}. 1461N/A * Write out the URL parameter, which specifies the project to use. Does 1461N/A * nothing if {@link #project} is not set. 1461N/A * Get the URL parameter, which specifies the project to use. 1461N/A * @return an empty String if {@link #project} is not set, the parameter 1461N/A * including the leading & otherwise. 1461N/A * Run the scanner to get the next token from the input. 1461N/A * Closes the current input stream, and resets the scanner to read from the 1461N/A * given input stream. All internal variables are reset, the old input 1461N/A * stream cannot be reused (content of the internal buffer is discarded and 1461N/A * lost). The lexical state is set to {@code YY_INITIAL}. 1461N/A * @param reader the new input stream to operate on.*/ 1461N/A * Get the number of the current line of input (which is usually the same as 1461N/A * Set the number of the current line of input (which is usually the same as 1461N/A * @param line line number to set. */ 1461N/A * Enter the given lexical state. 1461N/A * @param newState state to enter 1461N/A * Get the current lexical state of the scanner. 1384N/A * Write the crossfile content to the specified {@code Writer}. 1121N/A * @param out xref destination 1121N/A * @throws IOException on error when writing the xref 1121N/A // nothing to do here, yylex() will do the work 1384N/A +
" lexer is not perfect yet!");
1145N/A * Write a JavaScript function that returns an array with the definitions 1145N/A * to list in the navigation panel. Each element of the array is itself an 1145N/A * array containing the name of the definition type, the CSS class name for 1145N/A * the type, and an array of (symbol, line) pairs for the definitions of 1145N/A // No definitions, no symbol table to write 1145N/A // We want the symbol table to be sorted 1145N/A // Order by symbol name, and then by line number if multiple 1145N/A // definitions use the same symbol name 1185N/A /* no LF intentionally - xml is whitespace aware ... */ 1145N/A * Get the style description for a definition type. 1145N/A * @param type the definition type 1259N/A * @return the style of a definition type, or {@code null} if no style is 1370N/A * Write out annotation infos for the given line. 1370N/A * @param num linenumber to print 1370N/A * @throws IOException depends on the destination (<var>out</var>). 1121N/A * Terminate the current line and insert preamble for the next line. The 1121N/A * line count will be incremented. 1121N/A * @throws IOException on error when writing the xref 1384N/A * -> uncompressed size ~6%, compressed size ~26% bigger; 1384N/A * <div id="N"><b>N</b>...</div> 1384N/A * -> uncompressed size ~12%, compressed size ~52% bigger; 1384N/A * <span class="[h]l" id="N">N</span>... 1384N/A * -> is about the same as previous one 1121N/A * Write a symbol and generate links as appropriate. 1469N/A * @param symbol the symbol to write. 1121N/A * @param keywords a set of keywords recognized by this analyzer (no links 1121N/A * will be generated if the symbol is a keyword) 1121N/A * @param line the line number on which the symbol appears 1469N/A * @param escape If {@code true} <var>symbol</var> gets escapes for URI paths 1469N/A * and html text. Otherwise it is assumed, that symbol contains no HTML 1121N/A * @throws IOException if an error occurs while writing to the stream 1121N/A // This is a keyword, so we don't create a link. 1121N/A // This is the definition of the symbol. 1121N/A // 1) Create an anchor for direct links. (Perhaps we should only 1121N/A // do this when there's exactly one definition of the symbol in 1121N/A // this file? Otherwise, we may end up with multiple anchors with 1121N/A // 2) Create a link that searches for all references to this symbol. 1121N/A // This is a reference to a symbol defined exactly once in this file. 1121N/A // Generate a direct link to the symbol definition. 1121N/A // This is a symbol that is not defined in this file, or a symbol 1121N/A // that is defined more than once in this file. In either case, we 1121N/A // can't generate a direct link to the definition, so generate a 1121N/A // link to search for all definitions of that symbol instead. 1469N/A * Write out the Unicode character, unless it's an ISO control character 1469N/A * < 0x20, in which case it is ignored. 1121N/A * @param c the character to write 1121N/A * @throws IOException if an error occurs while writing to the stream 1123N/A * Write an e-mail address. The address will be obfuscated if 1470N/A * {@link Configuration#isObfuscatingEMailAddresses()} returns 1469N/A * {@code true}. It gets not htmlized because it is assumed to contain no 1122N/A * @param address the address to write 1122N/A * @throws IOException if an error occurs while writing to the stream 1461N/A * Push the current state to the state order stack, the given label to the 1461N/A * {@link #labelStack} and enter the given state. 1461N/A * @param newState new state to enter. 1461N/A * @param label label to push to the {@link #labelStack}. Might be {@code null}. 1461N/A * Pop the last entry from the state order stack and enter it. Also pop the 1461N/A * the last label from the {@link #labelStack} and write it out, if it is