Timeline for Is there a way to make sure classes implementing an Interface implement static methods?
Current License: CC BY-SA 2.5
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 17, 2014 at 10:40 | comment | added | Ha. | I don't know a way to check such thing at compile time. | |
| Jan 31, 2014 at 13:38 | comment | added | Matthieu | How do you make sure, at compile time, that a class has a default, zero-arg constructor? I'm very interested! | |
| Apr 22, 2010 at 10:32 | comment | added | Ha. | I have seen this pattern used in eclipse. Mylyn connectors plugins provide class extending some abstract class and only single instance of the connector's class is created somewhere inside the mylyn via reflection. So is your case - only one reflection-aware singlton class will create all necessary instances and put them in the map. | |
| Apr 22, 2010 at 10:23 | comment | added | Ha. | Yes, you lose 16 bytes to store the instance but gain a lot of speed because only constructor is invoked via reflection. | |
| Apr 22, 2010 at 9:28 | comment | added | Tobias Kienzler | @Ha: You mean like in the answer I've posted myself? I rethought it, but to me it just seems unnecessary to instantiate a class for which the possibility of several instances does not offer anything useful. | |
| Apr 22, 2010 at 9:17 | history | answered | Ha. | CC BY-SA 2.5 |