java.lang.Object
is.codion.tools.generator.domain.DomainSource

public final class DomainSource extends Object
For instances use the factory method domainSource(Domain).
  • Method Details

    • api

      public String api(String domainPackage, boolean includeDto)
      Parameters:
      domainPackage - the domain package.
      Returns:
      the api source code.
    • implementation

      public String implementation(String domainPackage)
      Parameters:
      domainPackage - the domain package.
      Returns:
      the implementation source code.
    • combined

      public String combined(String domainPackage, boolean includeDto)
      Parameters:
      domainPackage - the domain package.
      Returns:
      the combined source code of the api and implementation.
    • writeApiImpl

      public void writeApiImpl(String domainPackage, boolean includeDto, Path path) throws IOException
      Writes the api and implementation source code to the given path.
      Parameters:
      domainPackage - the domain package.
      path - the path to write the source code to.
      Throws:
      IOException - in case of an I/O error.
    • writeCombined

      public void writeCombined(String domainPackage, boolean includeDto, Path path) throws IOException
      Writes the combined source code to the given path.
      Parameters:
      domainPackage - the domain package.
      path - the path to write the source code to.
      Throws:
      IOException - in case of an I/O error.
    • domainSource

      public static DomainSource domainSource(Domain domain)
      Instantiates a new DomainSource instance.
      Parameters:
      domain - the domain model for which to generate the source code.
      Returns:
      a new DomainSource instance.
    • apiSearchString

      public static String apiSearchString(EntityDefinition definition)
    • implSearchString

      public static String implSearchString(EntityDefinition definition)