Definitions.java revision 1112
349N/A * The contents of this file are subject to the terms of the 349N/A * Common Development and Distribution License (the "License"). 349N/A * You may not use this file except in compliance with the License. 349N/A * language governing permissions and limitations under the License. 349N/A * When distributing Covered Code, include this CDDL HEADER in each 349N/A * If applicable, add the following below this CDDL HEADER, with the 349N/A * fields enclosed by brackets "[]" replaced with your own identifying 349N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1071N/A * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 1108N/A // Per line sym -> tags mapping 349N/A /** Map from symbol to the line numbers on which the symbol is defined. */ 349N/A /** List of all the tags. */ 349N/A * Get all symbols used in definitions. 349N/A * @return a set containing all the symbols 349N/A * Check if there is a tag for a symbol. 349N/A * @param symbol the symbol to check 349N/A * @return {@code true} iff there is a tag for {@code symbol} 349N/A * Check whether the specified symbol is defined on the given line. 349N/A * @param symbol the symbol to look for 349N/A * @param lineNumber the line to check 1108N/A * @param strs type of definition(to be passed back to caller) 349N/A * @return {@code true} iff {@code symbol} is defined on the specified line 349N/A * Return the number of occurrences of definitions with the specified 349N/A * @param symbol the symbol to count the occurrences of 349N/A * @return the number of times the specified symbol is defined 349N/A * Return the number of distinct symbols. 349N/A * @return number of distinct symbols 349N/A * Get a list of all tags. 349N/A * Class that represents a single tag. 349N/A /** Line number of the tag. */ 349N/A /** The symbol used in the definition. */ 349N/A /** The type of the tag. */ 349N/A /** The full line on which the definition occurs. */ 351N/A // The strings are frequently repeated (a symbol can be used in 351N/A // multiple definitions, multiple definitions can have the same type, 351N/A // one line can contain multiple definitions). Intern them to minimize 351N/A // the space consumed by them (see bug #809). 1108N/A // Insert sym->tag map for this line 350N/A * Create a binary representation of this object. 350N/A * @return a byte array representing this object 350N/A * @throws IOException if an error happens when writing to the array 350N/A * Deserialize a binary representation of a {@code Definitions} object. 350N/A * @param bytes a byte array containing the {@code Definitions} object 350N/A * @return a {@code Definitions} object 350N/A * @throws IOException if an I/O error happens when reading the array 350N/A * @throws ClassNotFoundException if the class definition for an object 350N/A * stored in the byte array cannot be found 350N/A * @throws ClassCastException if the array contains an object of another 350N/A * type than {@code Definitions}