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

Method Index

 o catchExceptions()
Enter the debugger when an instance of this class is thrown.
 o clearBreakpoint(int)
Clear a breakpoint at a specific address in a class.
 o clearBreakpointLine(int)
Clear a breakpoint at a specified line.
 o clearBreakpointMethod(RemoteField)
Clear a breakpoint at the start of a specified method.
 o description()
Return a (somewhat verbose) description.
 o getClassLoader()
Return the classloader for this class.
 o getField(int)
Return the static field, specified by index.
 o getField(String)
Return the static field, specified by name.
 o getFields()
Return all the static fields for this class.
 o getFieldValue(int)
Return the value of a static field, specified by its index.
 o getFieldValue(String)
Return the value of a static field, specified by name.
 o getInstanceField(int)
Return the instance field, specified by its index.
 o getInstanceFields()
Return all the instance fields for this class.
 o getInterfaces()
Return the interfaces for this class.
 o getLineNumbers()
Return an array of all the class's source file line numbers which have code associated with them.
 o getMethod(String)
Return the method, specified by name.
 o getMethodLineNumber(int)
Return the first line number of the specified method, or throws NoSuchLineNumber exception.
 o getMethodLineNumber(String)
Return the first line number of the specified method, or throws NoSuchLineNumber exception.
 o getMethodNames()
Return the names of all methods supported by this class.
 o getMethods()
Return the class's methods.
 o getName()
Returns the name of the class.
 o getSourceFile()
Get the source file referenced by this stackframe.
 o getSourceFileName()
Get the name of the source file referenced by this stackframe.
 o getStaticFields()
Return all the static fields for this class.
 o getSuperclass()
Return the superclass for this class.
 o ignoreExceptions()
Don't enter the debugger when an instance of this class is thrown.
 o isInterface()
Is this RemoteClass an interface?
 o setBreakpointLine(int)
Set a breakpoint at a specified source line number in a class.
 o setBreakpointMethod(RemoteField)
Set a breakpoint at the first line of a class method.
 o toString()
Return a (somewhat verbose) description.
 o typeName()
Returns the name of the class as its type.

Methods

 o getName
 public String getName() throws Exception
Returns the name of the class.

Throws: Exception
if a general exception occurs.
 o 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
 o isInterface
 public boolean isInterface() throws Exception
Is this RemoteClass an interface?

Throws: Exception
if a general exception occurs.
 o getSuperclass
 public RemoteClass getSuperclass() throws Exception
Return the superclass for this class.

Throws: Exception
if a general exception occurs.
 o getClassLoader
 public RemoteObject getClassLoader() throws Exception
Return the classloader for this class.

Throws: Exception
if a general exception occurs.
 o getInterfaces
 public RemoteClass[] getInterfaces() throws Exception
Return the interfaces for this class.

Throws: Exception
if a general exception occurs.
 o getSourceFileName
 public String getSourceFileName() throws Exception
Get the name of the source file referenced by this stackframe.

Throws: Exception
if a general exception occurs.
 o getSourceFile
 public InputStream getSourceFile() throws Exception
Get the source file referenced by this stackframe.

Throws: Exception
if a general exception occurs.
 o 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
 o getStaticFields
 public RemoteField[] getStaticFields() throws Exception
Return all the static fields for this class.

Throws: Exception
if a general exception occurs.
 o 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.
 o 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
 o 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
 o 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.
 o 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
 o 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
 o 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.
 o getMethods
 public RemoteField[] getMethods() throws Exception
Return the class's methods.

Throws: Exception
if a general exception occurs.
 o getMethodNames
 public String[] getMethodNames() throws Exception
Return the names of all methods supported by this class.

Throws: Exception
if a general exception occurs.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o description
 public String description()
Return a (somewhat verbose) description.

Overrides:
description in class RemoteObject
 o 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