[8] Review request for 8007716 Add FunctionalInterface annotation to swing interfaces
Alexander Scherbatiy
alexandr.scherbatiy at oracle.com
Fri Aug 23 04:36:01 PDT 2013
Hello,
Could you review the fix:
bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8007716
webrev: http://cr.openjdk.java.net/~alexsch/8007716/webrev.00
There is the suggested functional interface candidates list in the
issue description.
I selected only listeners and Acive/Lazy values.
However, I am not sure that listeners are good candidates for the
functional interface annotation
because there will be mix in the code that MouseWheelListener can be
used as functional interface and MouseMotionListener not.
------------------------------
The FunctionalInterface annotation has been added for the following
interfaces in the fix:
jdk/src/share/classes/javax/swing/event/ChangeListener.java:36: Note:
Candidate functional interface
public interface ChangeListener extends EventListener {
jdk/src/share/classes/javax/swing/event/HyperlinkListener.java:35:
Note: Candidate functional interface
public interface HyperlinkListener extends EventListener {
jdk/src/share/classes/javax/swing/event/RowSorterListener.java:34:
Note: Candidate functional interface
public interface RowSorterListener extends java.util.EventListener {
jdk/src/share/classes/javax/swing/event/CaretListener.java:36: Note:
Candidate functional interface
public interface CaretListener extends EventListener {
^
jdk/src/share/classes/javax/swing/event/ListSelectionListener.java:41:
Note: Candidate functional interface
public interface ListSelectionListener extends EventListener
^
jdk/src/share/classes/javax/swing/event/UndoableEditListener.java:37:
Note: Candidate functional interface
public interface UndoableEditListener extends java.util.EventListener {
^
jdk/src/share/classes/javax/swing/event/TableModelListener.java:38:
Note: Candidate functional interface
public interface TableModelListener extends java.util.EventListener
^
jdk/src/share/classes/javax/swing/event/TreeSelectionListener.java:43:
Note: Candidate functional interface
public interface TreeSelectionListener extends EventListener
jdk/src/share/classes/javax/swing/text/ViewFactory.java:36: Note:
Candidate functional interface
public interface ViewFactory {
jdk/src/share/classes/javax/swing/UIDefaults.java:951: Note:
Candidate functional interface
public interface LazyValue {
jdk/src/share/classes/javax/swing/UIDefaults.java:984: Note:
Candidate functional interface
public interface ActiveValue {
------------------------------
The FunctionalInterface annotation has not been added for the following
interfaces in the fix
because they mostly designed for the UI components painting rather to
use as single action or function calculation:
jdk/src/share/classes/javax/swing/tree/TreeCellRenderer.java:42:
Note: Candidate functional interface
public interface TreeCellRenderer {
jdk/src/share/classes/javax/swing/tree/RowMapper.java:36: Note:
Candidate functional interface
public interface RowMapper
jdk/src/share/classes/javax/swing/table/TableCellRenderer.java:38:
Note: Candidate functional interface
public interface TableCellRenderer {
jdk/src/share/classes/javax/swing/ListCellRenderer.java:89: Note:
Candidate functional interface
public interface ListCellRenderer<E>
jdk/src/share/classes/javax/swing/text/TabExpander.java:34: Note:
Candidate functional interface
public interface TabExpander {
jdk/src/share/classes/javax/swing/text/Position.java:49: Note:
Candidate functional interface
public interface Position {
jdk/src/share/classes/javax/swing/text/Highlighter.java:112: Note:
Candidate functional interface
public interface HighlightPainter {
jdk/src/share/classes/javax/swing/Painter.java:63: Note: Candidate
functional interface
public interface Painter<T> {
jdk/src/share/classes/javax/swing/JComboBox.java:1484: Note:
Candidate functional interface
public interface KeySelectionManager {
------------------------------
The FunctionalInterface annotation has not been added for the following
interfaces in the fix
because they are not public and so are not part of the public API:
jdk/src/share/classes/javax/swing/TransferHandler.java:128: Note:
Candidate functional interface
interface HasGetTransferHandler {
jdk/src/share/classes/javax/swing/text/html/CSSBorder.java:257: Note:
Candidate functional interface
interface BorderPainter {
^
jdk/src/share/classes/javax/swing/text/html/Map.java:234: Note:
Candidate functional interface
interface RegionContainment {
jdk/src/share/classes/javax/swing/plaf/basic/DragRecognitionSupport.java:52:
Note: Candidate functional interface
class DragRecognitionSupport {
public static interface BeforeDrag {
Thanks,
Alexandr.
More information about the lambda-dev
mailing list