Class DomainObjectCreationContext


  • @Internal
    public class DomainObjectCreationContext
    extends java.lang.Object
    Together with DomainBuilders, this class is the link to create domain objects from the import context. To make the API clear, we try to keep only those methods public, which are really meant to be used. Constructors of domain objects however, are not to be used under any circumstances, only ArchUnit may construct domain objects. To keep ..domain.. and ..importer.. in reasonably grouped packages, we unfortunately need to have some public link, which is created by supplying DomainBuilders, which can only be instantiated within package ..importer.. to DomainObjectCreationContext, which is the only place to create domain objects.

    To make up for the public visibility, the JLS forces upon us, DomainObjectCreationContext is declared @Internal, to emphasize that it is not meant for ArchUnit users, to be accessed in any way.