All Packages Class Hierarchy This Package Previous Next Index
Class sun.tools.debug.RemoteClass
java.lang.Object
|
+----sun.tools.debug.RemoteValue
|
+----sun.tools.debug.RemoteObject
|
+----sun.tools.debug.RemoteClass
- public class RemoteClass
- extends RemoteObject
The RemoteClass class allows access to a class in a remote Java
interpreter.
- See Also:
- RemoteDebugger
-
catchExceptions()
- Enter the debugger when an instance of this class is thrown.
-
clearBreakpoint(int)
- Clear a breakpoint at a specific address in a class.
-
clearBreakpointLine(int)
- Clear a breakpoint at a specified line.
-
clearBreakpointMethod(RemoteField)
- Clear a breakpoint at the start of a specified method.
-
description()
- Return a (somewhat verbose) description.
-
getClassLoader()
- Return the classloader for this class.
-
getField(int)
- Return the static field, specified by index.
-
getField(String)
- Return the static field, specified by name.
-
getFields()
- Return all the static fields for this class.
-
getFieldValue(int)
- Return the value of a static field, specified by its index.
-
getFieldValue(String)
- Return the value of a static field, specified by name.
-
getInstanceField(int)
- Return the instance field, specified by its index.
-
getInstanceFields()
- Return all the instance fields for this class.
-
getInterfaces()
- Return the interfaces for this class.
-
getLineNumbers()
- Return an array of all the class's source file line numbers which
have code associated with them.
-
getMethod(String)
- Return the method, specified by name.
-
getMethodLineNumber(int)
-
Return the first line number of the specified method, or throws
NoSuchLineNumber exception.
-
getMethodLineNumber(String)
-
Return the first line number of the specified method, or throws
NoSuchLineNumber exception.
-
getMethodNames()
- Return the names of all methods supported by this class.
-
getMethods()
- Return the class's methods.
-
getName()
- Returns the name of the class.
-
getSourceFile()
- Get the source file referenced by this stackframe.
-
getSourceFileName()
- Get the name of the source file referenced by this stackframe.
-
getStaticFields()
- Return all the static fields for this class.
-
getSuperclass()
- Return the superclass for this class.
-
ignoreExceptions()
- Don't enter the debugger when an instance of this class is thrown.
-
isInterface()
- Is this RemoteClass an interface?
-
setBreakpointLine(int)
- Set a breakpoint at a specified source line number in a class.
-
setBreakpointMethod(RemoteField)
- Set a breakpoint at the first line of a class method.
-
toString()
- Return a (somewhat verbose) description.
-
typeName()
- Returns the name of the class as its type.
getName
public String getName() throws Exception
- Returns the name of the class.
- Throws: Exception
- if a general exception occurs.
typeName
public String typeName() throws Exception
- Returns the name of the class as its type.
- Throws: Exception
- if a general exception occurs.
- Overrides:
- typeName in class RemoteObject
isInterface
public boolean isInterface() throws Exception
- Is this RemoteClass an interface?
- Throws: Exception
- if a general exception occurs.
getSuperclass
public RemoteClass getSuperclass() throws Exception
- Return the superclass for this class.
- Throws: Exception
- if a general exception occurs.
getClassLoader
public RemoteObject getClassLoader() throws Exception
- Return the classloader for this class.
- Throws: Exception
- if a general exception occurs.
getInterfaces
public RemoteClass[] getInterfaces() throws Exception
- Return the interfaces for this class.
- Throws: Exception
- if a general exception occurs.
getSourceFileName
public String getSourceFileName() throws Exception
- Get the name of the source file referenced by this stackframe.
- Throws: Exception
- if a general exception occurs.
getSourceFile
public InputStream getSourceFile() throws Exception
- Get the source file referenced by this stackframe.
- Throws: Exception
- if a general exception occurs.
getFields
public RemoteField[] getFields() throws Exception
- Return all the static fields for this class.
- Throws: Exception
- if a general exception occurs.
- Overrides:
- getFields in class RemoteObject
getStaticFields
public RemoteField[] getStaticFields() throws Exception
- Return all the static fields for this class.
- Throws: Exception
- if a general exception occurs.
getInstanceFields
public RemoteField[] getInstanceFields() throws Exception
- Return all the instance fields for this class.
Note: because this is a RemoteClass method, only the name and
type methods will be valid, not the data.
- Throws: Exception
- if a general exception occurs.
getField
public RemoteField getField(int n) throws Exception
- Return the static field, specified by index.
- Throws: ArrayIndexOutOfBoundsException
- when the index is greater than the number of instance variables
- Throws: Exception
- if a general exception occurs.
- Overrides:
- getField in class RemoteObject
getField
public RemoteField getField(String name) throws NoSuchFieldException, Exception
- Return the static field, specified by name.
- Throws: Exception
- if a general exception occurs.
- Throws: NoSuchFieldException
- if a field with the specified
name is not found.
- Overrides:
- getField in class RemoteObject
getInstanceField
public RemoteField getInstanceField(int n) throws Exception
- Return the instance field, specified by its index.
Note: because this is a RemoteClass method, only the name and
type information is valid, not the data.
- Throws: ArrayIndexOutOfBoundsException
- when the index is greater than the number of instance variables
- Throws: Exception
- if a general exception occurs.
getFieldValue
public RemoteValue getFieldValue(int n) throws Exception
- Return the value of a static field, specified by its index.
- Throws: Exception
- if a general exception occurs.
- Overrides:
- getFieldValue in class RemoteObject
getFieldValue
public RemoteValue getFieldValue(String name) throws NoSuchFieldException, Exception
- Return the value of a static field, specified by name.
- Throws: Exception
- if a general exception occurs.
- Throws: NoSuchFieldException
- if a field with the specified
name is not found.
- Overrides:
- getFieldValue in class RemoteObject
getMethod
public RemoteField getMethod(String name) throws NoSuchMethodException, Exception
- Return the method, specified by name.
- Throws: Exception
- if a general exception occurs.
- Throws: NoSuchMethodException
- if a matching method is
not found.
getMethods
public RemoteField[] getMethods() throws Exception
- Return the class's methods.
- Throws: Exception
- if a general exception occurs.
getMethodNames
public String[] getMethodNames() throws Exception
- Return the names of all methods supported by this class.
- Throws: Exception
- if a general exception occurs.
getMethodLineNumber
public int getMethodLineNumber(String name) throws NoSuchMethodException, NoSuchLineNumberException, Exception
- Return the first line number of the specified method, or throws
NoSuchLineNumber exception.
- Parameters:
- name - the name of the method
- Returns:
- the method's beginning line number
- Throws: Exception
- if a general exception occurs.
- Throws: NoSuchLineNumberException
- if no code is associated with the
specified line number in a Java source file.
- Throws: NoSuchMethodException
- if a matching method is
not found.
getMethodLineNumber
public int getMethodLineNumber(int index) throws IndexOutOfBoundsException, NoSuchLineNumberException, Exception
- Return the first line number of the specified method, or throws
NoSuchLineNumber exception.
- Parameters:
- index - the index of the method, as found in the array
returned from getMethods().
- Returns:
- the method's beginning line number
- Throws: Exception
- if a general exception occurs.
- Throws: NoSuchLineNumberException
- if no code is associated with the
specified line number in a Java source file.
setBreakpointLine
public String setBreakpointLine(int lineno) throws Exception
- Set a breakpoint at a specified source line number in a class.
- Parameters:
- lineno - the line number where the breakpoint is set
- Returns:
- an empty string if successful, otherwise a description of the error.
- Throws: Exception
- if a general exception occurs.
setBreakpointMethod
public String setBreakpointMethod(RemoteField method) throws Exception
- Set a breakpoint at the first line of a class method.
- Parameters:
- method - the method where the breakpoint is set
- Returns:
- an empty string if successful, otherwise a description of the error.
- Throws: Exception
- if a general exception occurs.
clearBreakpoint
public String clearBreakpoint(int pc) throws Exception
- Clear a breakpoint at a specific address in a class.
- Parameters:
- pc - the address of the breakpoint to be cleared
- Returns:
- an empty string if successful, otherwise a description of the error.
- Throws: Exception
- if a general exception occurs.
clearBreakpointLine
public String clearBreakpointLine(int lineno) throws Exception
- Clear a breakpoint at a specified line.
- Parameters:
- lineno - the line number of the breakpoint to be cleared
- Returns:
- an empty string if successful, otherwise a description of the error.
- Throws: Exception
- if a general exception occurs.
clearBreakpointMethod
public String clearBreakpointMethod(RemoteField method) throws Exception
- Clear a breakpoint at the start of a specified method.
- Parameters:
- method - the method of the breakpoint to be cleared
- Returns:
- an empty string if successful, otherwise a description of the error.
- Throws: Exception
- if a general exception occurs.
catchExceptions
public void catchExceptions() throws Exception
- Enter the debugger when an instance of this class is thrown.
- Throws: ClassCastException
- when this class isn't an exception class
- Throws: Exception
- if a general exception occurs.
ignoreExceptions
public void ignoreExceptions() throws Exception
- Don't enter the debugger when an instance of this class is thrown.
- Throws: ClassCastException
- when this class isn't an exception class
- Throws: Exception
- if a general exception occurs.
getLineNumbers
public int[] getLineNumbers() throws Exception
- Return an array of all the class's source file line numbers which
have code associated with them. This array may be zero-length, as
the class may not have been compiled with line number information.
- Returns:
- an array of integers of valid line numbers.
- Throws: Exception
- if a general exception occurs.
description
public String description()
- Return a (somewhat verbose) description.
- Overrides:
- description in class RemoteObject
toString
public String toString()
- Return a (somewhat verbose) description.
- Overrides:
- toString in class RemoteObject
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature