1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-03 22:35:43 +02:00

[cleanup] Get rid of invalid @noinstantiate on abstract classes

This commit is contained in:
Martin Oberhuber 2008-05-19 19:28:25 +00:00
parent 4120cbbdf6
commit 0edfb1a122
3 changed files with 65 additions and 66 deletions

View file

@ -7,10 +7,10 @@
* *
* Initial Contributors: * Initial Contributors:
* The following IBM employees contributed to the Remote System Explorer * The following IBM employees contributed to the Remote System Explorer
* component that contains this file: David McKnight, Kushal Munir, * component that contains this file: David McKnight, Kushal Munir,
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
* *
* Contributors: * Contributors:
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
* David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
@ -25,18 +25,17 @@ import org.eclipse.dstore.core.util.CommandGenerator;
/** /**
* <p> * <p>
* Abtract class for handling commands. A <code>CommandHandler</code> is a <code>Handler</code> that * Abstract class for handling commands. A <code>CommandHandler</code> is a
* contains a queue of commands to be sent to miners. Each DataStore instance uses a single * <code>Handler</code> that contains a queue of commands to be sent to miners.
* command handler that periodically sends it's queue either to a server or directly * Each DataStore instance uses a single command handler that periodically sends
* to miners. * it's queue either to a server or directly to miners.
* </p> * </p>
* <p> * <p>
* The CommandHandler is the means by which the DataStore sends information or files from * The CommandHandler is the means by which the DataStore sends information or
* the client to the remote tools. * files from the client to the remote tools.
* </p> * </p>
* *
* @noextend This class is not intended to be subclassed by clients. * @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public abstract class CommandHandler extends Handler public abstract class CommandHandler extends Handler
{ {
@ -96,7 +95,7 @@ public abstract class CommandHandler extends Handler
{ {
_commands.add(command); _commands.add(command);
} }
} }
} }
notifyInput(); notifyInput();
} }
@ -114,7 +113,7 @@ public abstract class CommandHandler extends Handler
/** /**
* Create and add a new command object to the command queue. * Create and add a new command object to the command queue.
* *
* @param commandDescriptor the descriptor for the new command * @param commandDescriptor the descriptor for the new command
* @param arguments the arguments for the command * @param arguments the arguments for the command
* @param object the subject of the command * @param object the subject of the command
@ -131,7 +130,7 @@ public abstract class CommandHandler extends Handler
/** /**
* Create and add a new command object to the command queue. * Create and add a new command object to the command queue.
* *
* @param commandDescriptor the descriptor for the new command * @param commandDescriptor the descriptor for the new command
* @param arg the arg for the command * @param arg the arg for the command
* @param object the subject of the command * @param object the subject of the command
@ -148,7 +147,7 @@ public abstract class CommandHandler extends Handler
/** /**
* Create and add a new command object to the command queue. * Create and add a new command object to the command queue.
* *
* @param commandDescriptor the descriptor for the new command * @param commandDescriptor the descriptor for the new command
* @param object the subject of the command * @param object the subject of the command
* @param refArg indicates whether the subject should be represented in the command as a * @param refArg indicates whether the subject should be represented in the command as a
@ -182,7 +181,7 @@ public abstract class CommandHandler extends Handler
DataElement status = null; DataElement status = null;
if ((cmd != null) && _dataStore != null) if ((cmd != null) && _dataStore != null)
{ {
status = cmd.get(cmd.getNestedSize() -1); status = cmd.get(cmd.getNestedSize() -1);
if (status != null && !status.getName().equals(DataStoreResources.model_done)) if (status != null && !status.getName().equals(DataStoreResources.model_done))
{ {
@ -206,7 +205,7 @@ public abstract class CommandHandler extends Handler
_commands.clear(); _commands.clear();
} }
public CommandGenerator getCommandGenerator() public CommandGenerator getCommandGenerator()
{ {
return _commandGenerator; return _commandGenerator;
@ -216,18 +215,18 @@ public abstract class CommandHandler extends Handler
* Implemented to provide the means by which commands in the queue are sent * Implemented to provide the means by which commands in the queue are sent
*/ */
public abstract void sendCommands(); public abstract void sendCommands();
/** /**
* Implemented to provide the means by which file bytes are sent * Implemented to provide the means by which file bytes are sent
* @param fileName the name of the file to send * @param fileName the name of the file to send
* @param bytes to bytes of the file to send * @param bytes to bytes of the file to send
* @param size the number of bytes to send * @param size the number of bytes to send
* @param binary indicates whether to send the bytes as binary or text * @param binary indicates whether to send the bytes as binary or text
*/ */
public abstract void sendFile(String fileName, byte[] bytes, int size, boolean binary); public abstract void sendFile(String fileName, byte[] bytes, int size, boolean binary);
/** /**
* Implemented to provide the means by which file bytes are sent * Implemented to provide the means by which file bytes are sent
* @param fileName the name of the file to send * @param fileName the name of the file to send
@ -235,18 +234,18 @@ public abstract class CommandHandler extends Handler
* @param size the number of bytes to send * @param size the number of bytes to send
* @param binary indicates whether to send the bytes as binary or text * @param binary indicates whether to send the bytes as binary or text
* @param byteStreamHandlerId indicates which byte stream handler to receive the bytes with * @param byteStreamHandlerId indicates which byte stream handler to receive the bytes with
*/ */
public abstract void sendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId); public abstract void sendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId);
/** /**
* Implemented to provide the means by which file bytes are sent and appended * Implemented to provide the means by which file bytes are sent and appended
* @param fileName the name of the file to send * @param fileName the name of the file to send
* @param bytes to bytes of the file to send * @param bytes to bytes of the file to send
* @param size the number of bytes to send * @param size the number of bytes to send
* @param binary indicates whether to send the bytes as binary or text * @param binary indicates whether to send the bytes as binary or text
*/ */
public abstract void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary); public abstract void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary);
/** /**
* Implemented to provide the means by which file bytes are sent and appended * Implemented to provide the means by which file bytes are sent and appended
* @param fileName the name of the file to send * @param fileName the name of the file to send
@ -254,7 +253,7 @@ public abstract class CommandHandler extends Handler
* @param size the number of bytes to send * @param size the number of bytes to send
* @param binary indicates whether to send the bytes as binary or text * @param binary indicates whether to send the bytes as binary or text
* @param byteStreamHandlerId indicates which byte stream handler to receive the bytes with * @param byteStreamHandlerId indicates which byte stream handler to receive the bytes with
*/ */
public abstract void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId); public abstract void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId);
/** /**
@ -263,7 +262,7 @@ public abstract class CommandHandler extends Handler
* @param className the name of the class to send * @param className the name of the class to send
*/ */
public abstract void sendClass(String className); public abstract void sendClass(String className);
/** /**
* Implemented to provide the means by which classes are sent * Implemented to provide the means by which classes are sent
* across the comm channel. * across the comm channel.
@ -271,14 +270,14 @@ public abstract class CommandHandler extends Handler
* @param classByteStreamHandlerId indicates which class byte stream handler to receive the class with * @param classByteStreamHandlerId indicates which class byte stream handler to receive the class with
*/ */
public abstract void sendClass(String className, String classByteStreamHandlerId); public abstract void sendClass(String className, String classByteStreamHandlerId);
/** /**
* Runs the specified class on the remote system * Runs the specified class on the remote system
*/ */
public abstract void sendClassInstance(IRemoteClassInstance runnable, String classByteStreamHandlerId); public abstract void sendClassInstance(IRemoteClassInstance runnable, String classByteStreamHandlerId);
/** /**
* Causes the current thread to wait until this class request has been * Causes the current thread to wait until this class request has been
* fulfilled. * fulfilled.
@ -290,7 +289,7 @@ public abstract class CommandHandler extends Handler
super.waitForInput(); super.waitForInput();
} }
} }
/** /**
* Implemented to provide the means by which classes are requested * Implemented to provide the means by which classes are requested
* across the comm channel. * across the comm channel.

View file

@ -7,10 +7,10 @@
* *
* Initial Contributors: * Initial Contributors:
* The following IBM employees contributed to the Remote System Explorer * The following IBM employees contributed to the Remote System Explorer
* component that contains this file: David McKnight, Kushal Munir, * component that contains this file: David McKnight, Kushal Munir,
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
* *
* Contributors: * Contributors:
* David McKnight (IBM) [202822] should not be synchronizing on clean method * David McKnight (IBM) [202822] should not be synchronizing on clean method
* David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
@ -26,17 +26,18 @@ import org.eclipse.dstore.internal.core.util.DataElementRemover;
/** /**
* <p> * <p>
* Abtract class for handling updates. A <code>UpdateHandler</code> is a <code>Handler</code> that * Abstract class for handling updates. A <code>UpdateHandler</code> is a
* contains a queue of data responses to be sent to the client. Each DataStore instance uses a single * <code>Handler</code> that contains a queue of data responses to be sent to
* update handler that periodically sends it's data queue either to a client or directly * the client. Each DataStore instance uses a single update handler that
* to a domain listener on the client. * periodically sends it's data queue either to a client or directly to a domain
* listener on the client.
* </p> * </p>
* <p> * <p>
* The UpdateHandler is the means by which the DataStore sends information or files from the remote tools to the client. * The UpdateHandler is the means by which the DataStore sends information or
* files from the remote tools to the client.
* </p> * </p>
* *
* @noextend This class is not intended to be subclassed by clients. * @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public abstract class UpdateHandler extends Handler public abstract class UpdateHandler extends Handler
{ {
@ -84,16 +85,16 @@ public abstract class UpdateHandler extends Handler
{ {
DataElement parent = child.getParent(); DataElement parent = child.getParent();
DataElementRemover.addToRemovedCount(); DataElementRemover.addToRemovedCount();
cleanChildren(child); // clean the children cleanChildren(child); // clean the children
if (child.isSpirit()) if (child.isSpirit())
{ {
// officially delete this now // officially delete this now
child.delete(); child.delete();
} }
child.clear(); child.clear();
if (parent != null) if (parent != null)
{ {
synchronized (parent) synchronized (parent)
@ -109,9 +110,9 @@ public abstract class UpdateHandler extends Handler
} }
// delete objects under temproot // delete objects under temproot
_dataStore.getTempRoot().removeNestedData(); _dataStore.getTempRoot().removeNestedData();
} }
/** /**
* Recursively clean children for deletion * Recursively clean children for deletion
* @param parent * @param parent
@ -123,8 +124,8 @@ public abstract class UpdateHandler extends Handler
{ {
for (int i = 0; i < nestedData.size(); i++){ for (int i = 0; i < nestedData.size(); i++){
DataElement child = (DataElement)nestedData.get(i); DataElement child = (DataElement)nestedData.get(i);
cleanChildren(child); cleanChildren(child);
if (child.isSpirit()) if (child.isSpirit())
{ {
// officially delete this now // officially delete this now
@ -180,7 +181,7 @@ public abstract class UpdateHandler extends Handler
} }
else else
{ {
if (_dataStore != null && object != null && !object.isDeleted()) if (_dataStore != null && object != null && !object.isDeleted())
{ {
if (object.getType().equals(DataStoreResources.model_status)) if (object.getType().equals(DataStoreResources.model_status))
@ -189,8 +190,8 @@ public abstract class UpdateHandler extends Handler
{ {
//DKM //DKM
// move to the back of the queue // move to the back of the queue
// this is done so that if status that was already queued changed to done in between // this is done so that if status that was already queued changed to done in between
// requests, and had not yet been transferred over comm layer, the completed status // requests, and had not yet been transferred over comm layer, the completed status
// object does not come back to client (as "done") before the results of a query // object does not come back to client (as "done") before the results of a query
_dataObjects.remove(object); _dataObjects.remove(object);
_dataObjects.add(object); _dataObjects.add(object);
@ -198,11 +199,11 @@ public abstract class UpdateHandler extends Handler
} }
} }
} }
} }
} }
notifyInput(); notifyInput();
} }
/** /**
* Causes the current thread to wait until this class request has been * Causes the current thread to wait until this class request has been
* fulfilled. * fulfilled.
@ -219,7 +220,7 @@ public abstract class UpdateHandler extends Handler
* Implemented to provide the means by which updates on the queue are sent. * Implemented to provide the means by which updates on the queue are sent.
*/ */
public abstract void sendUpdates(); public abstract void sendUpdates();
/** /**
* Implemented to provide the means by which files are sent * Implemented to provide the means by which files are sent
@ -229,7 +230,7 @@ public abstract class UpdateHandler extends Handler
* @param binary indicates whether to send the bytes as binary or text * @param binary indicates whether to send the bytes as binary or text
*/ */
public abstract void updateFile(String path, byte[] bytes, int size, boolean binary); public abstract void updateFile(String path, byte[] bytes, int size, boolean binary);
/** /**
* Implemented to provide the means by which files are sent and appended * Implemented to provide the means by which files are sent and appended
* @param path the path of the file to send * @param path the path of the file to send
@ -238,7 +239,7 @@ public abstract class UpdateHandler extends Handler
* @param binary indicates whether to send the bytes as binary or text * @param binary indicates whether to send the bytes as binary or text
*/ */
public abstract void updateAppendFile(String path, byte[] bytes, int size, boolean binary); public abstract void updateAppendFile(String path, byte[] bytes, int size, boolean binary);
/** /**
* Implemented to provide the means by which files are sent * Implemented to provide the means by which files are sent
* @param path the path of the file to send * @param path the path of the file to send
@ -248,7 +249,7 @@ public abstract class UpdateHandler extends Handler
* @param byteStreamHandlerId indicates the byte stream handler to receive the bytes * @param byteStreamHandlerId indicates the byte stream handler to receive the bytes
*/ */
public abstract void updateFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId); public abstract void updateFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId);
/** /**
* Implemented to provide the means by which files are sent and appended * Implemented to provide the means by which files are sent and appended
* @param path the path of the file to send * @param path the path of the file to send
@ -258,26 +259,26 @@ public abstract class UpdateHandler extends Handler
* @param byteStreamHandlerId indicates the byte stream handler to receive the bytes * @param byteStreamHandlerId indicates the byte stream handler to receive the bytes
*/ */
public abstract void updateAppendFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId); public abstract void updateAppendFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId);
/** /**
* Implemented to provide the means by which classes are requested * Implemented to provide the means by which classes are requested
* across the comm channel. * across the comm channel.
* @param className the name of the class to request * @param className the name of the class to request
*/ */
public abstract void requestClass(String className); public abstract void requestClass(String className);
/** /**
* Implemented to provide the means by which keepalive requests are sent * Implemented to provide the means by which keepalive requests are sent
* across the comm channel. * across the comm channel.
*/ */
public abstract void sendKeepAliveRequest(); public abstract void sendKeepAliveRequest();
/** /**
* Impleted to provide the means by which a class on the host is updated on the client * Impleted to provide the means by which a class on the host is updated on the client
* @param runnable * @param runnable
* @param deserializebyteStreamHandlerId * @param deserializebyteStreamHandlerId
*/ */
public abstract void updateClassInstance(IRemoteClassInstance runnable, String deserializebyteStreamHandlerId); public abstract void updateClassInstance(IRemoteClassInstance runnable, String deserializebyteStreamHandlerId);
/** /**
* Implemented to provide the means by which classes are sent * Implemented to provide the means by which classes are sent
@ -285,7 +286,7 @@ public abstract class UpdateHandler extends Handler
* @param className the name of the class to send * @param className the name of the class to send
*/ */
public abstract void sendClass(String className); public abstract void sendClass(String className);
/** /**
* Implemented to provide the means by which classes are sent * Implemented to provide the means by which classes are sent
* across the comm channel. * across the comm channel.
@ -299,5 +300,5 @@ public abstract class UpdateHandler extends Handler
* across the comm channel. * across the comm channel.
*/ */
public abstract void sendKeepAliveConfirmation(); public abstract void sendKeepAliveConfirmation();
} }

View file

@ -37,7 +37,6 @@ import org.eclipse.dstore.internal.core.util.XMLparser;
* communication layer. * communication layer.
* *
* @noextend This class is not intended to be subclassed by clients. * @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public abstract class Receiver extends SecuredThread implements IDataStorePreferenceListener public abstract class Receiver extends SecuredThread implements IDataStorePreferenceListener
{ {