A way of combining object-oriented and structural paradigms of software composition is demonstrated in a tool for generative programming. Metaclasses are introduced that are components with specifications called metainterfaces. Automatic code generation is used that is based on structural synthesis of programs. This guarantees that problems of handling data dependencies, order of application of components, usage of higher-order control structures etc are handled automatically. Specifications can be written either in a specification language or given visually on an architectural level. The tool is Java-based and portable. Categories and Subject Descriptors