Packages 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.
typeName
public String typeName() throws Exception
- Returns the name of the class as its type.
- Overrides:
- typeName in class RemoteObject
isInterface
public boolean isInterface() throws Exception
- Is this RemoteClass an interface?
getSuperclass
public RemoteClass getSuperclass() throws Exception
- Return the superclass for this class.
getClassLoader
public RemoteObject getClassLoader() throws Exception
- Return the classloader for this class.
getInterfaces
public RemoteClass[] getInterfaces() throws Exception
- Return the interfaces for this class.
getSourceFileName
public String getSourceFileName() throws Exception
- Get the name of the source file referenced by this stackframe.
getSourceFile
public InputStream getSourceFile() throws Exception
- Get the source file referenced by this stackframe.
getFields
public RemoteField[] getFields() throws Exception
- Return all the static fields for this class.
- Overrides:
- getFields in class RemoteObject
getStaticFields
public RemoteField[] getStaticFields() throws Exception
- Return all the static fields for this class.
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.
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
- Overrides:
- getField in class RemoteObject
getField
public RemoteField getField(String name) throws NoSuchFieldException, Exception
- Return the static field, specified by name.
- 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
getFieldValue
public RemoteValue getFieldValue(int n) throws Exception
- Return the value of a static field, specified by its index
- Overrides:
- getFieldValue in class RemoteObject
getFieldValue
public RemoteValue getFieldValue(String name) throws NoSuchFieldException, Exception
- Return the value of a static field, specified by name.
- Overrides:
- getFieldValue in class RemoteObject
getMethod
public RemoteField getMethod(String name) throws NoSuchMethodException, Exception
- Return the method, specified by name.
getMethods
public RemoteField[] getMethods() throws Exception
- Return the class's methods.
getMethodNames
public String[] getMethodNames() throws Exception
- Return the names of all methods supported by this class.
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
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
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.
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.
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.
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.
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.
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
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
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.
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
Packages This Package Previous Next Index