Aye, use deferred binding to override any direct references to the
code you want to include.


        <replace-with class="B.newEntryPoint">
                <when-type-is class="A.oldEntryPoint"/>
        </replace-with>


Be careful of static fields that are auto initialized, and static code
blocks, as you CANNOT override these.  Even if you never access the
static object, GWT must include all calls to static code, and will
only erase the notNeeded field.

static WastefulBlob notNeeded = someHugeBuilderMethod();

OR

static WastefulBlob notNeeded;

static{
notNeeded=someHugeBuilderMethod();
}

NOTE:

MONOLITHIC MODULES ARE Baaaaaad!  All those "nice" static imports turn
into cl_init() functions, and any code referenced in those static
functions that AREN'T called in an overridable EntryPoint will become
unerasable and bloat your codebase forever...  ...Trust me, I've
started over twice now, and I've got over 50 small modules that
FINALLY play nice with each other and the compiler.


Also, if you can, USE INTERFACES AS MUCH AS POSSIBLE.  I know it's off
topic, but putting all your interfaces in a single module that is
inherited by all will reduce bloat tremendously, reduce the footprint
by reusing prototypes AND gives you the freedom to connect and
disconnect modules by simply changing how you implement your
interfaces.  Plus, you will always have a central module to toggle <!--
set-property name="user.agent" value="gecko1_8"/--> to target your
builds to a specific browser whilst debugging and cut compile time in
half.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to