/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
// Per line sym -> tags mapping
protected LineTagMap() {
}
}
// line -> tag_map
/** Map from symbol to the line numbers on which the symbol is defined. */
/** List of all the tags. */
public Definitions() {
}
/**
* Get all symbols used in definitions.
* @return a set containing all the symbols
*/
}
/**
* Check if there is a tag for a symbol.
* @param symbol the symbol to check
* @return {@code true} iff there is a tag for {@code symbol}
*/
}
/**
* Check whether the specified symbol is defined on the given line.
* @param symbol the symbol to look for
* @param lineNumber the line to check
* @param strs type of definition(to be passed back to caller)
* @return {@code true} iff {@code symbol} is defined on the specified line
*/
}
// Get tag info
}
// Assume the first one
break;
}
}
return true;
}
return false;
}
/**
* Return the number of occurrences of definitions with the specified
* symbol.
* @param symbol the symbol to count the occurrences of
* @return the number of times the specified symbol is defined
*/
}
/**
* Return the number of distinct symbols.
* @return number of distinct symbols
*/
public int numberOfSymbols() {
}
/**
* Get a list of all tags.
* @return all tags
*/
return tags;
}
/**
* Class that represents a single tag.
*/
/** Line number of the tag. */
public final int line;
/** The symbol used in the definition. */
/** The type of the tag. */
/** The full line on which the definition occurs. */
}
}
// The strings are frequently repeated (a symbol can be used in
// multiple definitions, multiple definitions can have the same type,
// one line can contain multiple definitions). Intern them to minimize
// the space consumed by them (see bug #809).
}
// Get per line map
line_map = new LineTagMap();
}
// Insert sym->tag map for this line
}
}
/**
* Create a binary representation of this object.
* @return a byte array representing this object
* @throws IOException if an error happens when writing to the array
*/
return bytes.toByteArray();
}
/**
* Deserialize a binary representation of a {@code Definitions} object.
* @param bytes a byte array containing the {@code Definitions} object
* @return a {@code Definitions} object
* @throws IOException if an I/O error happens when reading the array
* @throws ClassNotFoundException if the class definition for an object
* stored in the byte array cannot be found
* @throws ClassCastException if the array contains an object of another
* type than {@code Definitions}
*/
throws IOException, ClassNotFoundException {
}
}