title: Java: Compile only selected methods from another class
body: <p>If my java class "UserClass" depends on another class "UsedClass"(provided as a library jar). If the "UsedClass" has 26 methods(lets say A - Z). But my "UserClass" needs only methods from(lets say A to D, assuming they dont internally call any methods other than A to D). When I build the "UserClass", Is there any way to prevent unused methods(example E to Z) from "UsedClass" from being shipped in my application(which may increase size of distributable/memory consumption while execution).  </p>