/[classpath]/classpath/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
ViewVC logotype

Diff of /classpath/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by aluchko, Thu Jul 7 20:50:47 2005 UTC revision 1.2 by aluchko, Wed Jul 27 16:01:43 2005 UTC
# Line 1  Line 1 
1  /* ReferenceTypeCommandSet.java -- lass to implement the ReferenceType  /* ReferenceTypeCommandSet.java -- class to implement the ReferenceType
2     Command Set     Command Set
3     Copyright (C) 2005 Free Software Foundation     Copyright (C) 2005 Free Software Foundation
4    
# Line 36  this exception to your version of the li Line 36  this exception to your version of the li
36  obligated to do so.  If you do not wish to do so, delete this  obligated to do so.  If you do not wish to do so, delete this
37  exception statement from your version. */  exception statement from your version. */
38    
39    
40  package gnu.classpath.jdwp.processor;  package gnu.classpath.jdwp.processor;
41    
42  import gnu.classpath.jdwp.IVirtualMachine;  import gnu.classpath.jdwp.IVirtualMachine;
# Line 125  public class ReferenceTypeCommandSet imp Line 126  public class ReferenceTypeCommandSet imp
126              break;              break;
127            default:            default:
128              throw new NotImplementedException("Command " + command +              throw new NotImplementedException("Command " + command +
129                " not found in String Reference Command Set.");                " not found in ReferenceType Command Set.");
130            }            }
131        }        }
132      catch (IOException ex)      catch (IOException ex)
# Line 218  public class ReferenceTypeCommandSet imp Line 219  public class ReferenceTypeCommandSet imp
219          // We don't actually need the clazz to get the field but we might as          // We don't actually need the clazz to get the field but we might as
220          // well check that the debugger got it right          // well check that the debugger got it right
221          if (fieldClazz.isAssignableFrom(clazz))          if (fieldClazz.isAssignableFrom(clazz))
222            Value.writeStaticValueFromField(os, field);            {
223                try
224                  {
225                    field.setAccessible(true); // Might be a private field
226                    Object value = field.get(null);
227                    Value.writeTaggedValue(os, value);
228                  }
229                catch (IllegalArgumentException ex)
230                  {
231                    // I suppose this would best qualify as an invalid field then
232                    throw new InvalidFieldException(ex);
233                  }
234                catch (IllegalAccessException ex)
235                  {
236                    // Since we set it as accessible this really shouldn't happen
237                    throw new JdwpInternalErrorException(ex);
238                  }
239              }
240          else          else
241            throw new InvalidFieldException(fieldId.getId());            throw new InvalidFieldException(fieldId.getId());
242        }        }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26