Tooling framework system and method for code generation
AssigneeInternational Business Machines Corporation
InventorsMichael Beisiegel, Piotr Przybylski, Norman K. W. Seto, John W. Stephenson
Life of this patent
Estimating the term…
Abstract
The ToolFrame is a code generation tooling framework. Its components form the basis of a generic tooling framework that provides a structured, consistent, and flexible method for developing tools. The ToolFrame separates functionality into components to emphasize substitution of components through common interfaces. This separation is furthered by a common complex object called Resource, used to represent any type of information shared between components.
Claims33
A code generation tooling framework, comprising:
- a resource component, said resource component representing information shared between components;
- a tool component having a reference to said resource component, said tool component comprising at least one object for generating code from data in said resource component;
- and
- a repository component separate from said resource component and from said tool component, said repository component having a reference to said resource component, said repository component comprising a wrapper class and a plurality of repository implementations, each repository implementation corresponding to a respective environment, said wrapper class enabling said tool component to interact with a current environment selectively for storing, retrieving, and deleting said resource component;
- wherein said tool component is independent of the environment in which said resource component is stored.
A method for generating code, comprising the steps of:
- executing a traverse description method including a node argument and a tool internal argument against a walker object;
- operating said walker object responsive to said traverse description method to selectively call first methods, second methods and third methods;
- said first methods including:
- invoking a tool internal method for preprocessing on a first node;
- operating said tool internal object to invoke a begin to build method against said first node to execute any required preprocessing by said first node on said builder object;
- said second methods including:
- invoking said tool internal method to perform processing of said first node;
- operating said tool internal object to invoke a build to method to execute processing by said first node on said builder object;
- said third methods including:
- invoking said tool internal method to perform post processing of said first node;
- operating said tool internal object to invoke an end build to method to execute any post processing by said first node needed on said builder object.
A system for generating code, comprising:
- a first tool for executing a traverse description method including a node argument and a tool internal argument against a walker object;
- said walker object being responsive to said traverse description method to selectively call first methods, second methods and third methods;
- said first methods including:
- a preprocessing call to a tool internal method for preprocessing on a first node;
- said tool internal object being responsive to said preprocessing call for invoking a begin to build method against said first node to execute any required preprocessing by said first node on said builder object;
- said second methods including:
- a processing call to said tool internal for processing of said first node;
- said tool internal object being responsive to said processing call to invoke a build to method to execute processing by said first node on said builder object;
- said third methods including:
- a post processing call to said tool internal for performing post processing of said first node;
- said tool internal object being responsive to said post processing call to invoke an end build to method to execute any post processing by said first node needed on said builder object.
A method for building a code generation tooling framework, comprising the steps of:
- instantiating a resource component, said resource component representing information shared between components;
- instantiating a tool component, said tool component having a reference to said resource component, said tool component comprising code generating objects for generating code from markup language meta data;
- and
- instantiating a repository component separate from said resource component and from said tool component, said repository component having a reference to said resource component and comprising a wrapper class and a plurality of repository implementations, each repository implementation corresponding to a respective environment, said wrapper class enabling said tool component to interact with a current environment selectively for storing, retrieving and deleting said resource components;
- wherein said tool component is independent of the environment in which said resource component is stored.
A program storage device readable by a machine, tangibly embodying a program of instructions executable by a machine to perform method steps for building a code generation tooling framework, said method steps comprising:
- providing a resource component, said resource component representing information shared between components;
- providing a tool component, said tool component having a reference to said resource component, said tool component comprising code generating objects for generating code from markup language meta data;
- and
- providing a repository component separate from said resource component and from said tool component, said repository component having a reference to said resource component and comprising a wrapper class and a plurality of repository implementations, each repository implementation corresponding to a respective environment, said wrapper class enabling said tool component to interact with a current environment selectively for storing, retrieving and deleting said resource components;
- wherein said tool component is independent of the environment in which said resource component is stored.
An article of manufacture comprising:
- a computer useable medium having computer readable program code means embodied therein for generating code, the computer readable program means in said article of manufacture comprising:
- computer readable program code means for causing a computer to effect executing a traverse description method including a node argument and a tool internal argument against a walker object;
- computer readable program code means for causing a computer to effect operating said walker object responsive to said traverse description method to selectively call first methods, second methods and third methods;
- said first methods including:
- invoking a tool internal method for preprocessing on a first node;
- operating said tool internal object to invoke a begin to build method against said first node to execute any required preprocessing by said first node on said builder object;
- said second methods including:
- invoking said tool internal method to perform processing of said first node;
- operating said tool internal object to invoke a build to method to execute processing by said first node on said builder object;
- said third methods including:
- invoking said tool internal method to perform post processing of said first node;
- operating said tool internal object to invoke an end build to method to execute any post processing by said first node needed on said builder object.
A computer program product embodied as a plurality of instructions recorded on computer readable media for building a code generation tooling framework according to the steps of:
- providing a resource component, said resource component representing information shared between components;
- providing a tool component having a reference to said resource component, said tool component comprising at least one object for generating code from data in said resource component;
- and
- providing a repository component separate from said resource component and from said tool component, said repository component having a reference to said resource component, said repository component comprising a wrapper class and a plurality of repository implementations, each repository implementation corresponding to a respective environment, said wrapper class enabling said tool component to interact with a current environment selectively for storing, retrieving, and deleting said resource component;
- wherein said tool component is independent of the environment in which said resource component is stored.
Dependencies are inferred from the claim text.