for each field 505 in the lists created above 501 the fields are marked as 34 unused 34 503 then for each method 513 the text or byte code of that method is retrieved 507 and is parsed for references to the class parameter 509 references to fields in a superclass are determined based on standard java scoping rules such parsing and scoping are standard compiler technology then for each class reference the field that is referenced is marked as 34 used 34 511 when marking the referenced fields used the preferred embodiment of the present invention utilizes the following conservative assumptions although the assumptions used in the preferred embodiment are not meant to limit the invention in any way a if the parameter is passed from the called method to another method every field in the class is marked 34 used 34 and the process terminates since java code is bound only at run time this ensures that the analysis is accurate when code is dynamically replaced b if the parameter is written to a stream of any sort then every field in the class is marked 34 used 34 and the process is terminated since streams are used to access files and sockets both of which can be used for persistence it is necessary to send the entire object this is necessary for persistent objects because other programs written after the analysis might access fields that would not otherwise be.