Hi Shai, thank you for reply. My singular request because I am trying to create a layer MVC on CD1 framework, so in same case I need to instance the Controller dinamically.
regards Dario On Thursday, 26 May 2016 06:27:01 UTC+2, Shai Almog wrote: > > Correct. > The main problem is that even on devices like Android we obfuscate the > binaries as Google explicitly recommends so the class names will be garbled. > > Since iOS doesn't allow dynamic code download there will be no class that > is "unknown" on build time and thus there is no reason for class forName or > reflection as both pose a very large overhead in AOT compilation (Ahead of > time as opposed to typical Java JIT compilation). > > Notice that if you need generic code that uses the Class object you can > use class literals in a very portable and efficient way e.g.: > > MyCommonInterface i = (MyCommonInterface)MyClass.class.newInstance(); > > This will be reasonably efficient on the device as it will translate to an > indirect function pointer call. > -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/af435bd6-d0dc-4a10-b384-54ab14da71fe%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
