Generating Code for JEAF Components
Components are self-contained, reusable pieces of software. They provide their functionality as services. JEAF Generator is able to use information about components from a UML Model and generate code for JEAF as a target platform.
As you can see in the diagram above, for every component (stereotype ) JEAF Generator will create the following output:
- Service Implementation Class (
AccountingServiceImpl
)
A service implementation class for every service that is implemented by the component . This class will be written to slotsrc
as the operations need to be implemented manually as they contain the business logic of the service.
- Service Implementation Base Class (
AccountingServiceImplBase
)
Every service implementation will inherit some functionality form a base class. That base class contains all the implementation that can be generated based on the information of the UML Model like dependencies on other services and access methods for configuration values of the component . As this class contains all the code that could be generated it will be written tosrc-gen
and must not be edited manually.
- Component Configuration Class (
AccountingComponentConfiguration
)
Class contains all the available configuration parameters of the component. This class is fully generated and so, it will be written tosrc-gen
.
- Service Factory (
AccountingServiceFactory
)
Factory class that is needed to create new instances of a service implementation. This class is fully generated and is only required at runtime, thus it is written tosrc-gen
.
- Component Class (
AccountingComponentFactory
)
The component class contains the implementation of all component specific things. It is also completed generated and only required at runtime. It will be written tosrc-gen
.
- Component Factory Class (
AccountingComponentFactory
)
Factory class is required to create new instances of the component. It is also completed generated and only required at runtime. It will be written tosrc-gen
.
For further information please also refer to:
Source Code Examples