Enum Class ScaffoldScope

java.lang.Object
java.lang.Enum<ScaffoldScope>
network.ike.plugin.scaffold.ScaffoldScope
All Implemented Interfaces:
Serializable, Comparable<ScaffoldScope>, Constable

public enum ScaffoldScope extends Enum<ScaffoldScope>
Scope a scaffold manifest entry targets.

A scaffold invocation dispatches entries based on scope:

  • PROJECT entries are processed when scaffold runs inside a Maven project (i.e. {project.root}/.ike/scaffold.lock is the applicable lockfile).
  • USER entries are processed in every scaffold run, whether invoked inside a project or standalone (fresh-machine bootstrap), and track state in {user.home}/.ike/scaffold.lock.
  • Enum Constant Details

    • PROJECT

      public static final ScaffoldScope PROJECT
      Target lives under the current project root. Examples: mvnw, .mvn/maven.config, .gitignore.
    • USER

      public static final ScaffoldScope USER
      Target lives under the user's home directory. Examples: ~/.m2/settings.xml, ~/.git-hooks/post-checkout.
  • Method Details

    • values

      public static ScaffoldScope[] 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 ScaffoldScope 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
    • manifestValue

      public String manifestValue()
      The kebab-case spelling used in manifest files.
      Returns:
      the manifest spelling of this scope
    • fromManifestValue

      public static ScaffoldScope fromManifestValue(String value)
      Parse a scope from its manifest spelling.
      Parameters:
      value - the manifest spelling (case-insensitive)
      Returns:
      the matching scope
      Throws:
      IllegalArgumentException - if no scope has this spelling