KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > core > IMemoryBlockManager


1 /*******************************************************************************
2  * Copyright (c) 2004, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.debug.core;
13
14 import org.eclipse.debug.core.model.IDebugTarget;
15 import org.eclipse.debug.core.model.IMemoryBlock;
16 import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
17
18
19 /**
20  * Manages registered memory blocks in the workspace. Clients
21  * interested in notification of the addition and removal of
22  * memory blocks may register as a memory block listener with
23  * the memory block manager.
24  * <p>
25  * This interface is not intended to be implemented by clients.
26  * </p>
27  * @see org.eclipse.debug.core.model.IMemoryBlock
28  * @see org.eclipse.debug.core.IMemoryBlockListener
29  * @since 3.1
30  */

31 public interface IMemoryBlockManager {
32
33     /**
34      * Adds the given memory blocks to the memory block manager.
35      * Registered memory block listeners are notified of the additions.
36      * Has no effect on memory blocks that are already registered.
37      *
38      * @param memoryBlocks memory blocks to add
39      */

40     public void addMemoryBlocks(IMemoryBlock[] memoryBlocks);
41     
42     /**
43      * Removes the given memory blocks from the memory block manager.
44      * Registered memory block listeners are notified of the removals.
45      * Has no effect on memory blocks that are not currently registered.
46      *
47      * @param memoryBlocks memory blocks to remove
48      */

49     public void removeMemoryBlocks(IMemoryBlock[] memoryBlocks);
50     
51     /**
52      * Registers the given listener for memory block addition and
53      * removal notification. Has no effect if an identical listener
54      * is already registered.
55      *
56      * @param listener the listener to add
57      */

58     public void addListener(IMemoryBlockListener listener);
59     
60     /**
61      * Unregisters the given listener for memory block addition and
62      * removal notification. Has no effect if an identical listener
63      * is not already registered.
64      *
65      * @param listener the listener to remove
66      */

67     public void removeListener(IMemoryBlockListener listener);
68     
69     /**
70      * Returns all registered memory blocks.
71      *
72      * @return all registered memory blocks
73      */

74     public IMemoryBlock[] getMemoryBlocks();
75     
76     /**
77      * Returns all registered memory blocks associated with the
78      * given debug target. That is, all registered memory blocks
79      * whose <code>getDebugTarget()</code> method returns the
80      * specified debug target.
81      *
82      * @param debugTarget target for which memory blocks have been requested
83      * @return all registered memory blocks associated with the given debug
84      * target
85      */

86     public IMemoryBlock[] getMemoryBlocks(IDebugTarget debugTarget);
87     
88     /**
89      * Returns all registered memory blocks that originated from the
90      * given memory retrieval source.
91      *
92      * @param source source for which memory blocks have been requested
93      * @return all registered memory blocks that originated from the
94      * given memory retrieval source
95      */

96     public IMemoryBlock[] getMemoryBlocks(IMemoryBlockRetrieval source);
97
98 }
99
Popular Tags