[JBoss JIRA] Created: (JBIDE-6393) Create generic queryInterface method
by Yahor Radtsevich (JIRA)
Create generic queryInterface method
------------------------------------
Key: JBIDE-6393
URL: https://jira.jboss.org/browse/JBIDE-6393
Project: Tools (JBoss Tools)
Issue Type: Task
Components: Visual Page Editor core
Affects Versions: 3.2.0.M1
Reporter: Yahor Radtsevich
Assignee: Maxim Areshkau
Fix For: 3.2.0.M1
Our current approach to cast XULRunner types is to use nsISupports.queryInterface(String). Typical code using this method:
nsIDOMMouseEvent mouseEvent = (nsIDOMMouseEvent) event
.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
These long boilerplate calls are always look the same and they are far from object-oriented approach.
An object-oriented generic method is needed. It should look like the following:
<T extends nsISupports> T queryInterface(nsISupports object, Class<T> type)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 7 months