1. An information processing apparatus which executably stores an application program and a class library having a plurality of classes, comprising: a first acquisition unit configured to acquire, in accordance with an execution instruction of the application program, information about an interface described in the application program and information about a position in the application program where the interface is described; a second acquisition unit configured to acquire, in accordance with the execution instruction of the application program, information about an interface stored in the class library and information about a class belonging to the interface; a generation unit configured to generate an instance for each information about the position by executing, of the classes belonging to the interface corresponding to the acquired information about the position, a class selected by a user; an embedding unit configured to embed the generated instance in the application program on the basis of the corresponding information about the position; and an execution unit configured to execute the application program with the instance being embedded.