All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.realityforge.bazel.depgen.CommandContextImpl Maven / Gradle / Ivy

Go to download

bazel-depgen: Generate Bazel dependency scripts by traversing Maven repositories

There is a newer version: 0.19
Show newest version
package org.realityforge.bazel.depgen;

import java.util.Objects;
import javax.annotation.Nonnull;
import org.realityforge.bazel.depgen.model.ApplicationModel;
import org.realityforge.bazel.depgen.record.ApplicationRecord;

final class CommandContextImpl
  implements Command.Context
{
  @Nonnull
  private final Environment _environment;

  CommandContextImpl( @Nonnull final Environment environment )
  {
    _environment = Objects.requireNonNull( environment );
  }

  @Nonnull
  @Override
  public Environment environment()
  {
    return _environment;
  }

  @Nonnull
  @Override
  public ApplicationModel loadModel()
  {
    return Main.loadModel( _environment );
  }

  @Nonnull
  @Override
  public ApplicationRecord loadRecord()
    throws Exception
  {
    return Main.loadRecord( _environment );
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy