16 |
|
|
17 |
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License |
18 |
along with GNU Classpath; see the file COPYING. If not, write to the |
along with GNU Classpath; see the file COPYING. If not, write to the |
19 |
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
20 |
02111-1307 USA. |
02110-1301 USA. |
21 |
|
|
22 |
Linking this library statically or dynamically with other modules is |
Linking this library statically or dynamically with other modules is |
23 |
making a combined work based on this library. Thus, the terms and |
making a combined work based on this library. Thus, the terms and |
40 |
|
|
41 |
package gnu.classpath.jdwp.processor; |
package gnu.classpath.jdwp.processor; |
42 |
|
|
|
import gnu.classpath.jdwp.IVirtualMachine; |
|
|
import gnu.classpath.jdwp.Jdwp; |
|
43 |
import gnu.classpath.jdwp.JdwpConstants; |
import gnu.classpath.jdwp.JdwpConstants; |
44 |
|
import gnu.classpath.jdwp.VMVirtualMachine; |
45 |
import gnu.classpath.jdwp.exception.JdwpException; |
import gnu.classpath.jdwp.exception.JdwpException; |
46 |
import gnu.classpath.jdwp.exception.JdwpInternalErrorException; |
import gnu.classpath.jdwp.exception.JdwpInternalErrorException; |
47 |
import gnu.classpath.jdwp.exception.NotImplementedException; |
import gnu.classpath.jdwp.exception.NotImplementedException; |
|
import gnu.classpath.jdwp.id.IdManager; |
|
48 |
import gnu.classpath.jdwp.id.ObjectId; |
import gnu.classpath.jdwp.id.ObjectId; |
49 |
import gnu.classpath.jdwp.id.ReferenceTypeId; |
import gnu.classpath.jdwp.id.ReferenceTypeId; |
50 |
|
|
59 |
* |
* |
60 |
* @author Aaron Luchko <aluchko@redhat.com> |
* @author Aaron Luchko <aluchko@redhat.com> |
61 |
*/ |
*/ |
62 |
public class ClassLoaderReferenceCommandSet implements CommandSet |
public class ClassLoaderReferenceCommandSet |
63 |
|
extends CommandSet |
64 |
{ |
{ |
|
// Our hook into the jvm |
|
|
private final IVirtualMachine vm = Jdwp.getIVirtualMachine(); |
|
|
|
|
|
// Manages all the different ids that are assigned by jdwp |
|
|
private final IdManager idMan = Jdwp.getIdManager(); |
|
|
|
|
65 |
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command) |
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command) |
66 |
throws JdwpException |
throws JdwpException |
67 |
{ |
{ |
92 |
public void executeVisibleClasses(ByteBuffer bb, DataOutputStream os) |
public void executeVisibleClasses(ByteBuffer bb, DataOutputStream os) |
93 |
throws JdwpException, IOException |
throws JdwpException, IOException |
94 |
{ |
{ |
95 |
ObjectId oId = idMan.readId(bb); |
ObjectId oId = idMan.readObjectId(bb); |
96 |
ClassLoader cl = (ClassLoader) oId.getObject(); |
ClassLoader cl = (ClassLoader) oId.getObject(); |
97 |
ArrayList loadRequests = vm.getLoadRequests(cl); |
ArrayList loadRequests = VMVirtualMachine.getLoadRequests(cl); |
98 |
os.writeInt(loadRequests.size()); |
os.writeInt(loadRequests.size()); |
99 |
for (Iterator iter = loadRequests.iterator(); iter.hasNext();) |
for (Iterator iter = loadRequests.iterator(); iter.hasNext();) |
100 |
{ |
{ |