Enum Class DependencyOptions.DependencyMode

java.lang.Object
java.lang.Enum<DependencyOptions.DependencyMode>
com.google.javascript.jscomp.DependencyOptions.DependencyMode
All Implemented Interfaces:
Serializable, Comparable<DependencyOptions.DependencyMode>, Constable
Enclosing class:
DependencyOptions

public static enum DependencyOptions.DependencyMode extends Enum<DependencyOptions.DependencyMode>
Describes how the compiler should manage dependencies.
  • Enum Constant Details

    • NONE

      public static final DependencyOptions.DependencyMode NONE
      All input files will be included in the compilation in the order they were specified in.
    • SORT_ONLY

      public static final DependencyOptions.DependencyMode SORT_ONLY
      All input files will be included in the compilation in dependency order.
    • PRUNE_LEGACY

      public static final DependencyOptions.DependencyMode PRUNE_LEGACY
      Input files that are transitive dependencies of the entry points will be included in the compilation in dependency order. All other input files will be dropped.

      In addition to the explicitly defined entry points, moochers (see below) are implicit entry points.

    • PRUNE

      public static final DependencyOptions.DependencyMode PRUNE
      Input files that are transitive dependencies of the entry points will be included in the compilation in dependency order. All other input files will be dropped.

      All entry points must be explicitly defined.

    • PRUNE_ALLOW_NO_ENTRY_POINTS

      public static final DependencyOptions.DependencyMode PRUNE_ALLOW_NO_ENTRY_POINTS
      Identical to PRUNE unless there are no entry points specifified, in which case drops all other input files instead of crashing with an error about invalid flag usage.

      PRUNE mode will report an error if used without a specified entry point because that usually indicates user error, where the user actually wants pruning starting from one/more entry points.

      This mode is only recommended for use when using some macro to generate JSCompiler flags for a variety of targets, some of which have entry points and some of which do not.

  • Method Details

    • values

      public static DependencyOptions.DependencyMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DependencyOptions.DependencyMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null