1. A communication device comprising: a storing means for storing data; an obtaining means for obtaining a program using a method for accessing data; an executing means for executing said program, and, in accordance with said program, using data which said program is permitted to use; a specifying means for specifying, from among data stored in said storing means, data which is required to be used by said program; a selecting means for selecting from either an imperfect encapsulated object or a perfect encapsulated object for said program, the imperfect encapsulated object being an object utilizing a method to provide data included in the object to a program which accesses the object, and the perfect encapsulated object being an object not utilizing the method; an object generating means for generating, in accordance with the selection made by said selecting means, either an imperfect encapsulated object or a perfect encapsulated object for said program, the generated object including the data specified by said specifying means; and an access control means for controlling access to the data specified by said specifying means, and for permitting said executing means to access the data only via the object generated for said program by said object generating means.