Class AutoImports

  • All Implemented Interfaces:
    Consumer<File>

    public final class AutoImports
    extends Object
    implements Consumer<File>
    This control can be applied to a File to automatically add imports for all types mentioned in the model hierarchy. Types mentioned inside strings still need to be imported manually.
    Author:
    Emil Forslund
    • Constructor Detail

      • AutoImports

        public AutoImports​(DependencyManager mgr)
        Initializes the AutoImports.
        Parameters:
        mgr - the dependency manager
    • Method Detail

      • accept

        public void accept​(File file)
        Adds explicit imports for all Type references mentioned in the specified File.
        Specified by:
        accept in interface Consumer<File>
        Parameters:
        file - the file to add imports in