What this is
This file is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn
Java by Example" TM.
Other links
The source code
/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.openide.debugger;
import java.beans.PropertyChangeListener;
import org.openide.text.Line;
import org.openide.src.ConstructorElement;
/**
* Represents one breakpoint.
* Breakpoints are created and returned
* by the {@link Debugger} implementation. A breakpoint may be assigned either to a source line
* of a class, or to a method (or constructor) of a class.
* The current set of breakpoints is stored
* in the implementation of {@link Debugger}.
*
* The abstract class contains only the necessary manipulation methods
* used by the IDE, like enabling/disabling the breakpoint and obtaining its
* position. A good implementation can offer the user much better ways to
* deal with the breakpoint (conditional breakpoints, etc.). Such information should
* be presented as properties--so it is assumed that the
* breakpoint itself is a serializable JavaBean.
*
* @deprecated Use new Debugger API (http://www.netbeans.org/download/dev/javadoc/).
* @author Jan Jancura, Jaroslav Tulach
*/
public abstract class Breakpoint implements java.io.Serializable {
/** Property name for validity of the breakpoint. */
public static final String PROP_VALID = "valid"; // NOI18N
/** Property name for enabled status of the breakpoint. */
public static final String PROP_ENABLED = "enabled"; // NOI18N
static final long serialVersionUID =4899621215676971003L;
/** Destroy this breakpoint.
* Removes it from the list of all breakpoints in the system.
*/
public abstract void remove ();
/** Get the line assigned to the breakpoint.
*
* @return the source line or null if no line is specified (it is assigned to a method)
*/
public abstract Line getLine ();
/** Get the name of the class the breakpoint is in.
*
* @return the class name
*/
public abstract String getClassName ();
/** Get the method the breakpoint is in.
*
* @return the method (or constructor) element or null if it assigned to a line
*/
public abstract ConstructorElement getMethod ();
/**
* Test whether the breakpoint is enabled.
*
* @return true if so
*/
public abstract boolean isEnabled ();
/**
* Set whether the breakpoint is enabled.
*
* @param enabled true to enable, false to disable
*/
public abstract void setEnabled (boolean enabled);
/**
* Test whether the breakpoint is valid.
* Invalidity might be caused by an inability to find the class it is supposed to be in, for example.
* @return true if it is valid
*/
public abstract boolean isValid ();
/** Test whether the breakpoint is hidden.
* If so, it
* is not presented in the list of all breakpoints. Such a breakpoint can be used
* for the IDE's (or some module's) private use, not displaying anything to the user.
* @return true if the breakpoint is hidden
*/
public abstract boolean isHidden ();
/**
* Add a property change listener.
* @param listener the listener to add
*/
public abstract void addPropertyChangeListener (PropertyChangeListener listener);
/**
* Remove a property change listener.
* @param listener the listener to remove
*/
public abstract void removePropertyChangeListener (PropertyChangeListener listener);
}
|