Loader

Loader supports the following types:

  • General - control flow and context manipulation components. Can be adapted to both supplier and consumer factories and as such can be used both as resource and as content generators:
    • configure - Configurator - Adds or overrides context properties.
    • for-each - Iterator - execute child components zero or more times with different contexts.
    • (map) - Map cast - Forces content to be treated as a map even if there is a single entry, which by default is treated as an object definition.
    • map - Mapper - Replaces the current context with a new context loaded from a map and intepolated.
    • reference - Reference - Loads object(s) from a YAML resource identified by the reference.
  • Resources - components which implement org.nasdanika.common.ConsumerFactory<org.nasdanika.common.resources.BinaryEntityContainer> and can contribute elements to a container:
    • container - Container - Generates a container (folder).
    • file - File - Generates a file with contents provided by the content components (see below).
    • zip-resource-collection - ZipResourceCollection - Contributes resources loaded from a Zip archive.
  • Content - components which implement org.nasdanika.common.SupplierFactory<java.io.InputStream> and can contribute contents to a file:
  • Java - Specializations of resource and content components/generators for generating Java sources:
    • source-folder - Source folder - Container specialization designating the root folder containing package folders and compilation units.
    • package - Package - Container specialization for a Java package.
    • compilation-unit - Compilation Unit - File specialization providing support for Java imports management, auto-injection of package declaration, code formatting, and auto-merging of generated and hand-crafted code.
    • Members - elements that can be contained in types:
      • Types - elements that can be contained in compilation units and other types. Can contain members and other content components:
        • annotation - Annotation - Generates a Java annotation.
        • class - Class - Generates a Java class.
        • enum - Enum - Generates a Java enum.
        • interface - Interface - Generates a Java interface.
      • Operations - executable members which may take parameters and throw exceptions.
        • method - Method - Generates a Java method.
        • constructor - Constructor - Generates a Java class constructor.
      • field - Field - Generates a Java type field.