Information processing apparatus, method, and recording medium for recording a computer program to be executed by a computer to carry out processing of constructing software6269476Abstract A build object of build class Builder has build method build (Object resolved) for building reference relations among construction-element objects by calling a field setting method owned by construction-element object resolved. A get object of class Getter has get method get object ( ) for acquiring a construction-element object and is also allowed to own a build object. In the get object, construction-element object resolved is acquired by calling get method get object ( ). In a build object owned by the get object, construction-element object resolved acquired by the get object is initialized by build method build (Object resolved). By adopting the procedure described above, construction-element objects required for constructing desired software such as an application program can be collected for constructing the desired software. Claims What is claimed is: Description BACKGROUND OF THE INVENTION
class ResolvedC extends Object(
private int fieldA;
private int fieldB;
private void setFieldA(int f){
fieldA=f;
}
public void setFieldB(int f){
fieldB=f;
}
. . .
} . . . (1)
In this example, class ResolvedC is treated as a subclass to the object class object, a super class thereof. In Java, all objects that exist in the language pertain eventually to the object class Object. As shown in program list (1) above, in class ResolvedC, fields fieldA and fieldb are declared. Since fields fieldA and fieldb are declared, field setting methods setFieldA (int f) and setFieldB (int f) are also defined to be executed to carry out initialization by setting fields fieldA and fieldB respectively. It should be noted that, in this embodiment, field setting methods are defined as public methods. The get object for acquiring construction-element object resolvedc owns a build object for initializing construction-element object resolvedc. That is to say, the get object owns a build object that calls field setting methods setFieldA (int f) and setFieldB (int f). Thus, after construction-element object resolvedC has been acquired, a build method owned by the build object is called. The build method in turn calls field setting methods setFieldA (int f) and setFieldB (int f). As a result, fields fieldA and fieldB are set. It should be noted that construction-element object resolvedc, an instance of class ResolvedC shown in program list (1), has 2 fields, namely, fieldA and fieldB, as fields to be set. In the case of a construction-element object having a plurality of fields to be initialized like construction-element object resolvedc described above, build objects owned by the get object used for acquiring the construction-element object are declared as an array in the get object to allow the fields to be initialized with ease. To put it in detail, in the get object used for acquiring the construction-element object resolvedC, build objects for calling field setting methods setFieldA (int f) and setFieldB (int f) are declared as array builders [ ] of the Builder type. Thus, by writing a program typically like program list (2) shown below for the get object, a plurality of fields owned by the acquired construction-element object can all be initialized.
for(int j=0; j<builders.length; j++)
builders(j) .build(resolved);
. . . (2)
where builders length is the length of field builder [ ] which is an array. Argument `resolved` of build method build (resolved) refers to a construction-element object to be initialized as described above. In this example, the argument indicates construction-element object resolvedC. It should be noted that, in the case of a construction-element object requiring no initialization, that is, in the case of a construction-element object having no fields or a construction-element object with fields requiring no initialization, it is not necessary to provide a get object used for acquiring the construction-element object with a build object for the initialization. It is also not always necessary to provide a get object used for acquiring a construction-element object having a plurality of fields with as many build objects as the fields. This is because some of the fields owned by the acquired construction-element object may have been initialized by the time the construction-element object is acquired for some reasons. Thus, it is necessary to provide the get object used for acquiring the construction-element object only with as many build objects as fields that have not been initialized by the time the construction-element object is acquired. In addition, in the case of a construction-element object having a plurality of fields to be initialized, as described above, build objects provided to a get object for acquiring the construction-element object are declared as an array. As an alternative, a so-called container class is used as a subclass to the build class and, by using the container class, a plurality of fields can also be initialized with ease. In addition, while a `for` statement is used in program list (2), other statements such as a `while` statement is also usable as well. Next, assume that a certain get object is used to acquire construction-element object resolvedA, an instance of class ResolvedA which is defined as follows.
class ResolvedA extends Object{
private ResolvedB fieldA;
private Object painters[]
public void setFieldA (ResolvedB f){
fieldA=f;
}
public void addPainter(Object p,int index){
painters [index]=p;
}
. . .
}
. . . (3)
Let class ResolvedA be a subclass to the super class Object. As shown in program list (3), in class ResolvedA, fieldA of a ResolvedB type and painters [ ] of the Object type are declared as fields. Since fieldA and painters [ ] are declared, field setting methods setFieldA (ResolvedB f) and add painter (Object p, int index) are also defined to be executed to carry out initialization by setting fields fieldA and painters [ ] respectively. It should be noted that class ResolvedB is also a subclass to the super class Object. The get object used for acquiring construction-element object resolvedA (an instance of class ResolvedA) shown in program list (3) owns a build object which owns a build method calling field setting method setFieldA (ResolvedB f) used for setting field fieldA. To be more specific, build method build (resolvedA) owned by the build object is called to initialize field fieldA. In this case, however, in order to initialize field fieldA, construction-element object resolvedB, an instance of class ResolvedB, needs to be referenced. Therefore, the build object which owns a build method calling field setting method setFieldA (ResolvedB f) owns a get object (an instance of the get class) which owns get method getobject ( ) used for acquiring construction-element object resolvedB. Then, in the build object which owns a build method calling field setting method setFieldA (ResolvedB f), get method getobject ( ) owned thereby is called to acquire construction-element object resolvedB. Thus, a reference to construction-element object resolvedB allows field setting method setFieldA (ResolvedB f) to initialize field fieldA. It should be noted that, if it is necessary to initialize construction-element object resolvedB, the get object used for acquiring construction-element object resolvedB is provided with a build object for initializing construction-element object resolvedB. The build object then initializes construction-element object resolvedB. In general, after a construction-element object has been acquired, if another construction-element object is found necessary for initializing the acquired construction-element object, the other construction-element object is acquired. Thereafter, if a further other construction-element object is found necessary for initializing the other construction-element object, the further other construction-element object is similarly acquired. This process is repeated to initialize each sequentially acquired construction-element object as will be described more later. By the way, in the implementation of build method build (Object resolved) defined in the build class, it is necessary to provide a build class for each construction-element object which requires initialization different from those of other construction-element objects if the build method is to be implemented for each build class. In order to solve this problem, much like get method getobject ( ) of the get class described above, build method build (Object resolved) defined in the build class is also made polymorphic, allowing a variety of implementations to be provided to subclasses. Then, a subclass with a desired implementation can be utilized. For example, as subclasses to build class Builder, 2 subclasses, namely, set method build class SetBuilder and add method AddBuilder, are defined as shown in FIG. 8. Set method build class SetBuilder is defined as a subclass to build class Builder for initialization of field fielda by calling field setting method setFieldA (ResolvedB f) shown in program list (3) as follows.
class SetBuilder extends Builder{
String fieldName;
String methodName;
Getter getter;
void build(Object ressolved){
Mehtod method=getSetMethod(fieldName,methodName, resolved
Object objs[]={getter.getObject()};
method.invoke(resolved,objs);
}
}
. . . (4)
Method getSetMethod (fieldname, methodName, resolved) shown in program list (4) constructs an object owning a field setting method specified by argument methodName and used for initializing a field specified by argument fieldName. In the case of program list (4), the constructed object is set in field method of the Method type. That is to say, instance method of the Method class is constructed. It should be noted that, in method getSetMethod (fieldName, methodName, resolved), the type of the object owning a field setting method specified by argument methodName is recognized from arguments fieldName and resolved. Then, the class for the recognized type, that is, the class of the construction-element object, is searched for a field setting method specified by argument methodName. In addition, in statement Object objs [ ] {getter.getobject ( )}; shown in program list (4), one construction-element object acquired by get method getobject [ ] owned by get object getter is set in array (or field) objs [ ] of the Object type as an element of the array. Furthermore, in class Method, method invoke (resolved, objs) is defined. Method invoke (resolved, objs) initializes a construction-element object specified by argument resolved by reference to a construction-element object specified by argument objs. In statement method.invoke (resolved, objs); shown in program list (4), method invoke (resolved, objs) in object method is called so as to call a field setting method owned by object method, that is, a method represented by argument methodName in this case. This field setting method initializes a construction-element object specified by argument resolved by reference to a construction-element object specified by argument objs. It should be noted that the 2.sup.nd argument (that is, an argument placed at the 2.sup.nd position on the argument list) of method invoke (resolved, objs) is prescribed to be an array. Thus, objs is a field of the array type. As shown in program list (4), in subclass SetBuilder, build method build (Object resolved) is implemented by reflection, that is, reflecting a definition structure such as a class in the language system. To be more specific, fieldName and methodName are provided respectively as the name of a field to be initialized and the name of a field setting method for initializing the field. Thus, a field setting method owned by object method is called. The field setting method is the same as the field setting method of a construction-element object acquired by get method getobject ( ). As a result, a variety of construction-element objects can be initialized. It should be noted that arguments fieldName and methodName shown in program list (4) can be provided typically by a constructor. In addition, in order to initialize field painters of the array type for example by means of field setting method add painter (object p, int index) shown in program list (3), it is necessary to define class AddBuilder as a subclass to build class Builder as follows.
class AddBuilder extends Builder{
String fieldName;
String methodName;
int index;
Getter getter;
void build(Object resolved){
Method method=getAddMethod(fieldName,methodName,resolove
d);
Object objs[]={getter.getObject() ,new Integer(index)};
method.invoke(resolved,objs);
}
}
. . . (5)
Much like method getSetMethod (fieldName, methodName, resolved) shown in program list (4), method getAddMethod (fieldName, methodName, resolved) shown in program list (5) constructs an object owning a field setting method specified by argument methodName and used for initializing a field specified by argument fieldName. However, method getAddMethod (fieldName, methodName, resolved) is different from method getSetMethod (fieldName, methodName, resolved) in that, in the case of the former, the type of an object owning the field setting method specified by argument method name is recognized from argument fieldName to be an array of a certain class and, after the class of the array is further recognized, a field setting method represented by argument methodName is found. It should be noted that the field setting method specified by argument methodName is determined in advance to have a field of the int type as a 2.sup.nd argument as is the case with add painter (Object p, int index) shown in program list (3) for example. Accordingly, the class of the array described above can thereby be recognized. In this case, the fact that a field of the int type is taken as a 2.sup.nd argument is recognized. In program list (5), array (field) objs [ ] of the Object type has two array elements, namely, a construction-element object acquired by get method getobject ( ) owned by get object getter and an instance constructed by constructor Integer (index), that is, an instance of the Integer type corresponding to the value of subscript index. Much like program list (4), also in the case of program list (5), by calling method invoke (resolved, objs) in object method, a field setting method owned by object method is called to initialize construction-element object resolved by a reference to construction-element object objs. The field setting method owned by object method is a method specified by argument methodName. As shown in program list (5), in subclass AddBuilder, build method build (Object resolved) is implemented by reflection, making it possible to initialize a variety of construction-element objects each having a field of the array type like painters which can not be handled by subclass Setbuilder shown in program list (4). It should be noted that, much like program list (4), arguments fieldName and methodName shown in program list (5) can be provided typically by a constructor. Next, the bind class is explained. The bind class is a class for binding a construction-element object acquired by a get object. As shown in FIG. 9, the bind class has bind method bind (String name, Object resolved) for binding (or cataloging) construction-element object resolved by giving argument name, a string of alphanumeric characters, to the construction-element object and lookup method lookup (String name) for finding a bound (or cataloged) construction-element object with argument name used as a key. Normally, in a bind object (an instance of the bind class), a construction-element object acquired by a get object is bound (or cataloged) by bind method bind (String name, Object resolved). Thus, when it is necessary to refer to the bound construction-element object again, on the other hand, the object can be found by lookup method lookup (String name). To put it concretely, refer to an example shown in FIG. 10. As shown in the figure, there is desired software such as an application program, multimedia contents or other data which is composed of (or constructed) from three construction-element objects A to C. Assume that field fieldA of construction-element object A is initialized by a reference to construction-element object B, field fieldB of construction-element object B is initialized by a reference to construction-element object C and field fieldC of construction-element object C is initialized also by a reference to construction-element object B. In this case, a reference to construction-element object B is made during initialization of construction-element object C after being made during initialization of construction-element object A. For this reason, construction-element object B acquired for initialization of construction-element object A is cataloged by bind method bind (String name, object resolved) in a bind object. Then, during initialization of construction-element object C, in the bind object, cataloged construction-element object B is searched for by lookup method lookup (string name) for use in the initialization of construction-element object C. The following is a description of construction processing (or build processing) carried out by execution of a build program at user terminal UT with reference to a flowchart shown in FIG. 11. As shown in the figure, the construction processing begins with step SI to generate (develop on a memory built in a user terminal) a get object, a build object and a bind object, instances of the get, build and bind classes respectively. The get object is used for acquiring a construction-element object which is used for constructing desired software. The build object is used for building a reference relation among construction-element objects. The bind object is used for binding (or cataloging) a construction-element object to be referenced at a later time. Then, the flow of the processing goes on to step S2 at which the get object, the build object and, if necessary, the bind object generated at step S1 are used for acquiring construction-element objects for constructing the desired software and building reference relations among the construction-element objects. After the construction of the desired software is completed, the processing is ended. The following is another description of construction processing to build an application program, multimedia contents or other data which comprises eight construction-element objects obj1 to obj8 having reference relations like ones shown in FIG. 12. Each of construction-element objects obj1 to obj8 shown in FIG. 12 is represented by a rectangular box with the lower level thereof describing the name of a field owned thereby. Since the desired software, that is, the application program, multimedia contents or other data shown in FIG. 12, is constructed from eight construction-element objects obj1 to obj8, in the first place, get objects (that is, instances of the get class) for acquiring construction-element objects obj1 to obj8 are required. Let Getterl, Getter2, Getter3-1, Getter4, Getter5, Getter6, Getter7 and Getter8 be the get objects for acquiring construction-element objects obj1 to obj8 respectively. In the example shown in FIG. 12, construction-element object obj3 referenced by construction-element object obj1 is also referenced by construction-element object obj8 which is acquired after construction-element object obj3 has been acquired. For this reason, a get object for acquiring construction-element object obj3 during initialization of construction-element object obj8 is required. Let Getter3-2 be this get object. It should be noted that, in order to acquire construction-element object obj3, get object Getter3-2 merely needs to search for construction-element object 3 by calling lookup method lookup (String name) owned by a bind object, an instance of the bind class. In the embodiment shown in FIG. 12, construction-element object obj1 has fields ppartll and pPart12, construction-element object obj2 has field pPart21, construction-element object obj3 has field pPart31, construction-element object obj4 has fields pPart41 and pPart42, construction-element object obj6 has fields ppart61 and pPart62, construction-element object obj7 has fields ppart71 and construction-element object obj8 has field pPart81 respectively. In the embodiment shown in FIG. 12, fields ppart11 and ppart12 of construction-element object obj1 are initialized by referencing construction-element objects obj3 and obj6 respectively. Field pPart21 of construction-element object obj2 is initialized by referencing construction-element object obj7. Fields pPart41 and pPart42 of construction-element object obj4 are initialized by referencing construction-element objects obj5 and obj8 respectively. Fields pPart61 and pPart62 of construction-element object obj6 are initialized by referencing construction-element objects obj4 and obj2 respectively. Field pPart81 of construction-element object obj8 is initialized by referencing construction-element object obj3. As described above, ppart11, pPart12, pPart21, pPart41, pPart42, pPart61, pPart62 and pPart81 are eight fields to be initialized. Let Builder1-1, Builder1-2, Builder2, Builder4-1, Builder4-2, Builder6-1, Builder6-2 and Builder8 be eight build objects required for initializing the eight fields respectively. It should be noted that, in the embodiment shown in FIG. 12, construction-element object obj3 has field pPart31 and construction-element object obj7 has field pPart71. In the initialization of fields pPart31 and pPart71, however, no construction-element objects are referenced. Thus, no build objects are required for initializing the fields. As described above, in order to construct the desired software shown in FIG. 12, nine get objects (instances of the get class) and eight build objects (instances of the build class) shown in FIG. 13 are required. FIGS. 14, 14A and 14B are diagrams showing relations among the nine get objects and the eight build objects. In each of the get objects, get method getobject ( ) is executed and, in each of the build objects, build method build (Object resolved) is executed to carry out the construction processing (or the build processing) to construct (or build) the desired software shown in FIG. 12. To put it in detail, first of all, get object Getterl acquires construction-element object obj1 by calling get method getobject ( ) owned by get object Getter 1. It should be noted that get object Getterl also owns build objects Builder1-1 and Builder1-2 used for initializing fields pPart11 and pPart12 respectively owned by construction-element object obj1. Strictly speaking, get object Getter1 owns build objects Builder1-1 and Builder1-2 as two elements of array builders [ ] of the Builder type. Then, build objects Builder1-1 and Builder1-2 initialize fields pPart11 and pPart12 respectively. To put it in detail, in get object Getter1, build method build (Object resolved) of Builder1-1, the lst one among build objects Builder1-1 and Builder1-2, is first called. It should be noted that build objects Builder1-1 and Builder1-2 are 2 elements of array builders [ ] of the Builder type owned by the get object Getter1, and build object Builder1-1 owns get object Getter3-1 used for acquiring construction-element object obj3 which is referenced during initialization of field pPart11 carried out by build object Builder1-1 as described above. Then, get object Getter3-1 acquires construction-element object obj3. That is to say, in build method build (Object resolved) also owned by build object Builder1-1, get method getobject ( ) owned by get object Getter3-1 is called to acquire construction-element object obj3. Since it is not necessary to initialize construction-element object obj3, get object Getter3-1 does not own a build object for initializing construction-element object obj3. Thus, the element of array builders [ ] of the array type owned by get object Getter3-1 is null. Therefore, after the processing of get method getobject ( ) owned by get object Getter3-1 is completed, control of execution is returned to the caller. At that time, get method get object ( ) owned by get object Getter3-1 acquires construction-element object obj3, passing information required for referencing construction-element object obj3 to build object Builder1-1 as a return value. Receiving the information, build object Builder1-1 initializes field pPart11 of construction-element object obj1 by referencing construction-element object obj3. As the initialization of field ppart11 is finished, the processing of build method build (Object resolved) owned by build object Builder1-1 is completed and control of execution is returned to the caller. When the processing of build method build (Object resolved) owned by build object Builder1-1 is completed, in get object Getter1, build method build (Object resolved) of Builder1-2, the 2.sup.nd one among build objects Builder1-1 and Builder1-2, is called. As described above, build objects Builder1-1 and Builder1-2 are 2 elements of array builders[ ] of the Builder type owned by the get object Getter1. By the same token, build object Builder1-2 owns get object Getter6 used for acquiring construction-element object obj6 which is referenced during initialization of field pPart12 carried out by build object Builder1-2. Then, get object Getter6 acquires construction-element object obj6. To put it in detail, in build method build (Object resolved) also owned by build object Builder1-2, get method getobject ( ) owned by get object Getter6 is called to acquire construction-element object obj6. Much like get object Getter1, get object Getter6 also owns build objects Builder6-1 and Builder6-2 used for initializing fields pPart61 and pPart62 respectively owned by construction-element object obj6. Strictly speaking, get object Getter6 owns build objects Builder6-1 and Builder6-2 as 2 elements of array builders [ ] of the Builder type. Then, build objects Builder6-1 and Builder6-2 initialize fields pPart61 and pPart62 respectively. To put it in detail, in get object Getter6, build method build (Object resolved) of Builder6-1, the 1.sup.st one among build objects Builder6-1 and Builder6-2, is first called. It should be noted that build objects Builder6-1 and Builder6-2 are two elements of array builders[ ] of the Builder type owned by the get object Getter6, and build object Builder6-1 owns get object Getter4 used for acquiring construction-element object obj4 which is referenced during initialization of field pPart61 carried out by build object Builder6-1 as described above. Then, get object Getter4 acquires construction-element object obj4. That is to say, in build method build (Object resolved) also owned by build object Builder6-1, get method get object ( ) owned by get object Getter4 is called to acquire construction-element object obj4. Much like get object Getter1, get object Getter4 also owns build objects Builder4-1 and Builder4-2 used for initializing fields pPart4l and pPart42 respectively owned by construction-element object obj4. Strictly speaking, get object Getter4 owns build objects Builder4-1 and Builder4-2 as two elements of array builders [ ] of the Builder type. Then, build objects Builder4-1 and Builder4-2 initialize fields pPart41 and pPart42 respectively. To put it in detail, in get object Getter4, build method build (Object resolved) of Builder4-1, the 1.sup.st one among build objects Builder4-1 and Builder4-2, is first called. It should be noted that build objects Builder4-1 and Builder4-2 are two elements of array builders[ ] of the Builder type owned by the get object Getter4, and build object Builder4-1 owns get object Getter5 used for acquiring construction-element object obj5 which is referenced during initialization of field pPart41 carried out by build object Builder4-1 as described above. Then, get object Getter5 acquires construction-element object obj5. Since it is not necessary to initialize construction-element object obj5, get object Getter5 does not own a build object for initializing construction-element object obj5. Thus, the element of array builders [ ] of the array type owned by get object Getter5 is null. Therefore, after the processing of get method getobject ( ) owned by get object Getter5 is completed, control of execution is returned to the caller. At that time, get method getobject ( ) owned by get object Getter5 acquires construction-element object obj5, passing information required for referencing construction-element object obj5 to build object Builder4-1 as a return value. Receiving the information, build object Builder4-1 initializes field pPart4l of construction-element object obj4 by referencing construction-element object obj5. As the initialization of field pPart41 is finished, the processing of build method build (Object resolved) owned by build object Builder4-1 is completed and control of execution is returned to the caller. When the processing of build method build (Object resolved) owned by build object Builder4-1 is completed, in get object Getter4, build method build (Object resolved) of Builder4-2, the 2.sup.nd one among build objects Builder4-1 and Builder4-2, is called. As described above, build objects Builder4-1 and Builder4-2 are 2 elements of array builders[ ] of the Builder type owned by the get object Getter4. By the same token, build object Builder4-2 owns get object Getter8 used for acquiring construction-element object obj8 which is referenced during initialization of field pPart42 carried out by build object Builder4-2. Then, get object Getter8 acquires construction-element object obj8. Get object Getter8 also owns build object Builder8 used for initializing field pPart81 owned by construction-element object obj8 as the only element of single-element array builders [ ] of the Builder type. Then, build object Builder8 initializes field pPart81. To put it in detail, in get object Getter8, build method build (Object resolved) of Builder8, the only element of single-element array builders [ ] of the Builder type owned by the get object Getter8, is first called. It should be noted that build object Builder8 owns get object Getter3-2 used for acquiring construction-element object obj3 which is referenced during initialization of field pPart81 carried out by build object Builder8 as described above. Then, get object Getter3-2 acquires construction-element object obj3. That is to say, in build method build (Object resolved) also owned by build object Builder8, get method getobject ( ) owned by get object Getter3-2 is called to acquire construction-element object obj3. It should be noted that construction-element object obj3 referenced earlier by construction-element object obj1 is also referenced by construction-element object obj8 acquired later than construction-element object obj3 as is known in advance. For this reason, when get object Getter3-1 acquired construction-element object obj3, bind method bind (String name, Object resolved) of a bind object was called to catalog construction-element object obj3 acquired by get object Getter3-1. Thus, get object Getter3-2 in actuality merely obtains information required for referencing construction-element object obj3 already cataloged by calling lookup method lookup (string name) instead of acquiring construction-element object obj3 itself. It is not necessary to initialize construction-element object obj3. This is because, in the embodiment shown in FIG. 12, construction-element object obj3 is, from the beginning, a construction-element object that does not have a field to be initialized. Even if construction-element object obj3 has a field to be initialized, the field should have been initialized by build object owned by get object Getter3-1 when construction-element object obj3 was acquired thereby. For this reason, get object Getter3-2 does not own a build object for initializing construction-element object obj3. Thus, the element of array builders [ ] of the array type owned by get object Getter3-2 is null. Therefore, after the processing of get method getobject ( ) owned by get object Getter3-2 is completed, control of execution is returned to the caller. At that time, get method getobject ( ) owned by get object Getter3-2 acquires construction-element object obj3, passing the information to build object Builder8 as a return value. Receiving the information, build object Builder8 then initializes field pPart8l of construction-element object obj8 by referencing construction-element object obj3. As the initialization of field pPart81 is finished, the processing of build method build (Object resolved) owned by build object Builder8 is completed and control of execution is returned to the caller. The completion of the processing of build method build (Object resolved) owned by build object Builder8 also completes the processing of get method getobject of get object Getter8. Information required for referencing construction-element object obj8 acquired thereby is passed as a return value to build object Builder4-2. Receiving the information, build object Builder4-2 initializes field pPart42 of construction-element object obj4 by referencing construction-element object obj8. As the initialization of field pPart42 is finished, the processing of build method build (Object resolved) owned by build object Builder4-2 is completed and control of execution is returned to the caller. The completion of the processing of build method build (Object resolved) owned by build object Builder4-2 also completes the processing of get method getObject ( ) of get object Getter4. Information required for referencing construction-element object obj4 acquired thereby is passed as a return value to build object Builder6-1. Receiving the information, build object Builder6-1 initializes field pPart61 of construction-element object obj6 by referencing construction-element object obj4. As the initialization of field pPart61 is finished, the processing of build method build (Object resolved) owned by build object Builder6-1 is completed and control of execution is returned to the caller. When the processing of build method build (Object resolved) owned by build object Builder6-1 is completed, in get object Getter6, build method build (Object resolved) of Builder6-2, the 2.sup.nd one among build objects Builder6-1 and Builder6-2, is called. As described above, build objects Builder6-1 and Builder6-2 are 2 elements of array builders[ ] of the Builder type owned by the get object Getter6. By the same token, build object Builder6-2 owns get object Getter2 used for acquiring construction-element object obj2 which is referenced during initialization of field pPart62 carried out by build object Builder6-2. Then, get object Getter2 acquires construction-element object obj2. Get object Getter2 also owns build object Builder2 used for initializing field pPart21 owned by construction-element object obj2 as the only element of single-element array builders [ ] of the Builder type. Then, build object Builder2 initializes field pPart21. To put it in detail, in get object Getter2, build method build (Object resolved) of Builder2, the only element of single-element array builders [ ] of the Builder type owned by the get object Getter2, is first called. It should be noted that build object Builder2 owns get object Getter7 used for acquiring construction-element object obj7 which is referenced during initialization of field pPart21 carried out by build object Builder2 as described above. Then, get object Getter7 acquires construction-element object obj7. Since it is not necessary to initialize construction-element object obj7, get object Getter7 does not own a build object for initializing construction-element object obj7. Thus, the element of array builders [ ] of the array type owned by get object Getter7 is null. Therefore, after the processing of get method getObject ( ) owned by get object Getter7 is completed, control of execution is returned to the caller. At that time, get method getobject ( ) owned by get object Getter7 acquires construction-element object obj7, passing information required for referencing construction-element object obj7 to build object Builder2 as a return value. Receiving the information, build object Builder2 initializes field pPart21 of construction-element object obj2 by referencing construction-element object obj7. As the initialization of field pPart21 is finished, the processing of build method build (Object resolved) owned by build object Builder2 is completed and control of execution is returned to the caller. The completion of the processing of build method build (Object resolved) owned by build object Builder2 also completes the processing of get method getObject ( ) of get object Getter2. Information required for referencing construction-element object obj2 acquired thereby is passed as a return value to build object Builder6-2. Receiving the information, build object Builder6-2 initializes field pPart62 of construction-element object obj6 by referencing construction-element object obj2. As the initialization of field pPart62 is finished, the processing of build method build (Object resolved) owned by build object Builder6-2 is completed and control of execution is returned to the caller. The completion of the processing of build method build (Object resolved) owned by build object Builder6-2 also completes the processing of get method getObject ( ) of get object Getter6. Information required for referencing construction-element object obj6 acquired thereby is passed as a return value to build object Builder1-2. Receiving the information, build object Builder1-2 initializes field pPartl2 of construction-element object obj1 by referencing construction-element object obj6. As the initialization of field pPart12 is finished, the processing of build method build (Object resolved) owned by build object Builder1-2 is completed and control of execution is returned to the caller. The completion of the processing of build method build (Object resolved) owned by build object Builder1-2 also finishes the processing of get method getObject ( ) of get object Getter1, completing the construction of the desired software shown in FIG. 12. As described above, a plurality of construction-element objects used as elements for constructing an application program or a plurality of construction-element objects used as elements for constructing multimedia contents or other data utilized by an application program are acquired by get objects and reference relations among the construction-element objects are built by build objects. As a result, an application program or multimedia contents or other data utilized by an application program can be constructed by collecting only necessary construction-element objects only when they are required in order to dynamically link the construction-element objects, that is, to build reference relations among the construction-element objects, even if the construction-element objects are originally distributed among apparatuses information, build throughout a network. It should be noted that a construction-element object is allowed to own a build object for building a new reference relation to the construction-element object. To put it in detail, the class of the construction-element object can be typically defined by the following program list.
class ResolvedD extends Object{
private int fieldA;
private Builder builder;
public void setFieldA(int f){
fieldA=f;
}
public void setBuilder(Builder f){
builder=f;
}
public void rebuild(){
builder.build(this);
}
} . . . (6)
In the construction-element object of class ResolvedD like program list (6) shown above, field fieldA is initialized in the same way as described above. In addition, field builder is also initialized by a certain build object. By calling build method build (Object resolved) in the initialized field builder, a reference relation in desired software can be built dynamically during program execution of the software. In program list (6), build method build (Object resolved) in the initialized field builder is expressed as builder.build (this). Thus, calling build method build (Object resolved) in the initialized field builder means calling method rebuild ( ) described in program list (6). In this way, is possible to delete an already existing construction-element object of desired software, replace a construction-element object already existing in desired software with another or add a new a construction-element object to desired software even after the construction of the desired software has once been completed. As described above, the embodiment is exemplified by a case in which construction-element objects are scattered throughout a network or distributed among geographically scattered sites. It should be noted that the present invention can also be applied to a case in which construction-element objects are distributed along a time axis. It is needless to say that the present invention can also be applied to a case in which construction-element objects all exist at a site, for example, in the hard disc 17 of the STB 4 shown in FIG. 2. In addition, in the embodiment described above, the build program is stored in the hard disc 17 of the STB 4. It is worth noting that a build program required for building desired software can be obtained from the Internet 6 when needed. In this case, the amount of received data is small in comparison with a case in which an EPG itself is received. Furthermore, in the embodiment, the present invention is applied to construction of an EPG. It should be noted that the present invention can also be applied to construction of an application program or multimedia contents or other data used by an application program in addition to an EPG. In addition, in the embodiment, a build program and each construction-element object are described in the Java language. It is worth noting that another computer language can also be used to described them as well. However, it is desirable to use the so-called object oriented language such as Java, C++ or smalltalk. Furthermore, in this embodiment, three kinds of object, namely, get objects, build objects and bind objects, are used to construct desired software. It should be noted that only get and build objects can be used. In this case, in a build object, it is possible to let a bind object carry out bind processing. In the information processing apparatus, the information processing method and the recording medium according to the present invention, a get object is used for acquiring a construction-element object by using a get method of the get object and a build object owned by a get object is used for initializing a construction-element object acquired by the get object by using a build method owned by the build object. As a result, an application program or multimedia contents used by an application program can be built or constructed by collecting construction-element objects even if the collecting-element objects are distributed among geographically scattered sites or along a time axis.
|
Same subclass Same class Consider this |
||||||||||
