5.11.1.1.1.1.13. example-code-instruction-simple-service-object-has-meta-data.xml

Listing 5.87 examples/example-code-instruction-simple-service-object-has-meta-data.xml
 1<?xml version="1.0" encoding="UTF-8"?>
 2<java_package xmlns="https://metafactory.io/xsd/v1/java-codeinstruction"
 3              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4              xsi:schemaLocation="https://metafactory.io/xsd/v1/java-codeinstruction https://metafactory.io/xsd/v1/java-codeinstruction.xsd"
 5              name="${pattern.property.java.package.base}.services.simple"
 6              path="${pattern.property.java.main.directory}"
 7              package="domain_model">
 8  <class  name="${createSimpleServiceClassName(${object.name})}"
 9          foreach="object"
10          condition="${objectHasMetaData(createSimpleService)}">
11    <method name="run">
12      <body>
13        // do something simple
14      </body>
15      <apicommentline>
16        This method does something simple
17      </apicommentline>
18    </method>
19  </class>
20</java_package>