1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00

Added @noextend to HashTable and its subclasses.

Change-Id: I89a5e887cd22e4cb79b96c549fe5c7b79045cf3b
This commit is contained in:
Sergey Prigogin 2016-06-13 11:00:28 -07:00
parent b7eb967b6d
commit de37ec61db
9 changed files with 26 additions and 11 deletions

View file

@ -1,13 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.cdt.core" version="2"> <component id="org.eclipse.cdt.core" version="2">
<resource path="parser/org/eclipse/cdt/core/parser/util/HashTable.java" type="org.eclipse.cdt.core.parser.util.HashTable">
<filter id="421654647">
<message_arguments>
<message_argument value="org.eclipse.cdt.core.parser.util.HashTable"/>
<message_argument value="linkIntoHashTable(int, int)"/>
</message_arguments>
</filter>
</resource>
<resource path="utils/org/eclipse/cdt/utils/BinaryObjectAdapter.java" type="org.eclipse.cdt.utils.BinaryObjectAdapter"> <resource path="utils/org/eclipse/cdt/utils/BinaryObjectAdapter.java" type="org.eclipse.cdt.utils.BinaryObjectAdapter">
<filter comment="NO_SYMBOLS array should be final" id="388100214"> <filter comment="NO_SYMBOLS array should be final" id="388100214">
<message_arguments> <message_arguments>

View file

@ -13,9 +13,9 @@ package org.eclipse.cdt.core.parser.util;
/** /**
* @author Doug Schaefer * @author Doug Schaefer
* @noextend This class is not intended to be subclassed by clients.
*/ */
public class CharArrayIntMap extends CharTable { public class CharArrayIntMap extends CharTable {
private int[] valueTable; private int[] valueTable;
public final int undefined; public final int undefined;

View file

@ -24,8 +24,12 @@ import java.util.function.Consumer;
/** /**
* @author Doug Schaefer * @author Doug Schaefer
* @noextend This class is not intended to be subclassed by clients.
*/ */
public class CharArrayObjectMap<T> extends CharTable { public class CharArrayObjectMap<T> extends CharTable {
/**
* An empty immutable {@code CharArrayObjectMap}.
*/
public static final CharArrayObjectMap<?> EMPTY_MAP = new CharArrayObjectMap<Object>(0) { public static final CharArrayObjectMap<?> EMPTY_MAP = new CharArrayObjectMap<Object>(0) {
@Override @Override
public Object clone() { return this; } public Object clone() { return this; }

View file

@ -13,8 +13,13 @@ package org.eclipse.cdt.core.parser.util;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
/**
* @noextend This class is not intended to be subclassed by clients.
*/
public class CharArraySet extends CharTable { public class CharArraySet extends CharTable {
/**
* An empty immutable {@code CharArraySet}.
*/
public static final CharArraySet EMPTY_SET = new CharArraySet(0) { public static final CharArraySet EMPTY_SET = new CharArraySet(0) {
@Override @Override
public Object clone() { return this; } public Object clone() { return this; }

View file

@ -18,6 +18,7 @@ import java.util.List;
/** /**
* @author ddaoust * @author ddaoust
* @noextend This class is not intended to be subclassed by clients.
*/ */
public class CharTable extends HashTable { public class CharTable extends HashTable {
protected char[][] keyTable; protected char[][] keyTable;

View file

@ -15,6 +15,7 @@ import java.util.Comparator;
/** /**
* @author ddaoust * @author ddaoust
* @noextend This class is not intended to be subclassed by clients.
*/ */
public class HashTable implements Cloneable { public class HashTable implements Cloneable {
// Prime numbers from http://planetmath.org/goodhashtableprimes // Prime numbers from http://planetmath.org/goodhashtableprimes

View file

@ -15,7 +15,13 @@ import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
/**
* @noextend This class is not intended to be subclassed by clients.
*/
public class ObjectMap extends ObjectTable<Object> { public class ObjectMap extends ObjectTable<Object> {
/**
* An empty immutable {@code ObjectMap}.
*/
public static final ObjectMap EMPTY_MAP = new ObjectMap(0) { public static final ObjectMap EMPTY_MAP = new ObjectMap(0) {
@Override @Override
public Object clone() { return this; } public Object clone() { return this; }

View file

@ -13,9 +13,12 @@ package org.eclipse.cdt.core.parser.util;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
/**
* @noextend This class is not intended to be subclassed by clients.
*/
public class ObjectSet<T> extends ObjectTable<T> { public class ObjectSet<T> extends ObjectTable<T> {
/** /**
* Represents the empty ObjectSet * An empty immutable {@code ObjectSet}.
*/ */
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
public static final ObjectSet EMPTY_SET = new ObjectSet(0) { public static final ObjectSet EMPTY_SET = new ObjectSet(0) {

View file

@ -18,6 +18,9 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
/**
* @noextend This class is not intended to be subclassed by clients.
*/
public abstract class ObjectTable<T> extends HashTable implements Iterable<T> { public abstract class ObjectTable<T> extends HashTable implements Iterable<T> {
protected T[] keyTable; protected T[] keyTable;