Combining a meta data file and java source code to...

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S152000, C707S793000

Reexamination Certificate

active

06427228

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to the field of computer programming, and more particularly to a system, method, and computer-readable code for combining a meta data file and Java source code to dynamically create Java classes and JavaBeans. This technique enables creating objects and JavaBeans in a new, more flexible manner.
2. Description of the Related Art
Java is an object-oriented programming language. As with programs written in other object-oriented languages, Java programs operate by instantiating objects and invoking methods upon these objects. “JavaBeans” is the name of a component architecture for use with the Java programming language. (“JavaBeans” and “Java” are trademarks of Sun Microsystems, Inc.) A JavaBean is the Java term for a “component”, where a component is a reusable building block of application logic that a programmer can combine with other components to form an application program.
A Java programmer creates a Java application program by writing new code and assembling existing components (i.e. JavaBeans), to provide the desired functionality for his application. A JavaBean may contain code for a relatively simple function such as displaying a button on a graphical user interface (“GUI”), but it may also contain quite complex code. JavaBeans are intended to execute locally, within the Java Virtual Machine (“JVM”) on which a Java application is running.
To create an object in the current art, the Java programmer specifies code that invokes a constructor method that is called, by convention, “new”. This method may be defined in the class for which an object is to be instantiated, or in a superclass from which this class inherits in the object hierarchy. The constructor method defines functionality that is to be performed when constructing, or instantiating, a new object. The constructor method may optionally use parameters, which will be used to specify initialization values, known as “instance data”, for the newly-created object.
However, the current art requires a static, predefined specification of the objects to be created, where this predefined specification includes the values that are to be used for initializing the instance data parameters. The code instantiating an object is coded directly into the source code of a Java program. The parameter values may be specified in the source code, or they may be obtained at run-time. For the latter case, the values may be read from a file, obtained from a user by prompting, or passed as invocation parameters.
It may happen that there is a need to create a large number of objects, either in a single class or in different classes. Further, there may be a need to enable an end-user of an application to specify the objects, and/or the instance data values, to be used by the application. There is currently no convenient way to handle these situations. The current art requires statically specifying the creation of each object in the Java source code. In addition, the end-user will likely be unable to change the source code (either due to lack of Java programming skills, or code locking techniques which prevent changing the code base, or both) to modify the objects and/or instance data specified in the program.
Accordingly, what is needed is a technique whereby the objects to be created during execution of a Java program can be dynamically specified, and whereby the values to be used for instantiating these objects can also be dynamically specified.
SUMMARY OF THE INVENTION
An object of the present invention is to provide a technique for more easily and efficiently creating objects for use in the Java programming language.
Another object of the present invention is to provide this technique such that it enables more easily and efficiently creating JavaBeans.
A further object of the present invention is to provide this technique by combining a meta data file and Java source code to dynamically create Java classes and JavaBeans.
Yet another object of the present invention is to provide this technique in a manner that defines all instance data for a particular object in a separate file from the Java source code.
Still another object of the invention is to provide this technique in a manner that isolates all Java source code for a particular application in a separate file from the instance data used to create objects for that application.
A further object of the present invention is to provide a technique whereby an end-user can conveniently specify creation of objects and/or values to be used for instance data of created objects.
Other objects and advantages of the present invention will be set forth in part in the description and in the drawings which follow and, in part, will be obvious from the description or may be learned by practice of the invention.
To achieve the foregoing objects, and in accordance with the purpose of the invention as broadly described herein, the present invention provides a system, method, and computer-readable code for combining a meta data file and an object-oriented source code input file to create an object-oriented source code output file that will be used to dynamically create objects at compile time in a computing environment. In one aspect, this technique comprises: creating a meta data file, wherein the meta data file includes specifications for one or more macros, each of the macro specifications comprising: a name for a particular macro, wherein the same name may be specified in one or more of the macro specifications; and values for one or more parameters for the particular macro; creating an object-oriented source code input file, wherein the input file comprises a plurality of lines, and wherein each of the lines may be characterized as a normal object-oriented source code statement or as a line within a scope of a macro reference; copying each of the normal object-oriented source code statements to an object-oriented source code output file; and processing each of the lines within the scope of the macro reference. The processing further comprises: locating one or more matching macro specifications in the meta data file, wherein the name of the matching macro specification is identical to a reference name used in the macro reference; expanding the lines within the scope of the macro reference using the one or more located specifications; and writing the expanded lines to the output file. Preferably, the processing of each of the lines further comprises: detecting an opening macro reference, the opening macro reference specifying the reference name, and wherein the detected opening reference begins the scope of the macro reference; detecting a closing macro reference, wherein the detected closing reference ends the scope of the macro reference; and wherein the detected opening and closing macro references are not themselves expanded.
In one embodiment, the expanding preferably further comprises: parsing each of the lines within the scope of the macro reference; copying each of the parsed lines which does not contain a macro parameter reference to the output file; and expanding the parsed line using the located macro specification when the parsed line contains one or more of the macro parameter references. Expanding the parsed line preferably further comprises: retrieving a corresponding one of the parameter values from the located macro specification using a sequence number from the macro parameter reference; and substituting the retrieved parameter value for the macro parameter reference, wherein the retrieving and the substituting are repeated for each of the one or more macro parameter references in the parsed line.
In another embodiment, the expanding preferably further comprises: parsing each of the lines within the scope of the macro reference; detecting an opening conditional macro processing statement in the parsed line; evaluating the detected opening conditional macro processing statement; bypassing one or more lines within the scope of said macro reference until detecting an ending conditional macro processing sta

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Combining a meta data file and java source code to... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Combining a meta data file and java source code to..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Combining a meta data file and java source code to... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2901165

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.