Enum Class SizeSpec.ModuleType

java.lang.Object
java.lang.Enum<SizeSpec.ModuleType>
dev.gmitch215.bytebox.gradle.SizeSpec.ModuleType
All Implemented Interfaces:
Serializable, Comparable<SizeSpec.ModuleType>, Constable
Enclosing class:
SizeSpec

public static enum SizeSpec.ModuleType extends Enum<SizeSpec.ModuleType>
How the compiled module is carried in the bundle.
  • Enum Constant Details

    • AUTO

      public static final SizeSpec.ModuleType AUTO
      Raw bytes, unless the module is too large for the platform to accept them.

      A Java module reaches the second case only past 64 MiB, which is where compression stops being a trade and becomes the only way to deploy at all.

    • DATA

      public static final SizeSpec.ModuleType DATA
      Raw bytes in a Data module.

      Nothing to inflate at module scope, so the startup budget pays for compiling the module and nothing else.

    • DATA_COMPRESSED

      @Deprecated(since="1.0.1", forRemoval=true) public static final SizeSpec.ModuleType DATA_COMPRESSED
      Deprecated, for removal: This API element is subject to removal in a future version.
      buys bundle bytes Cloudflare stopped metering on 2026-09-04, and spends startup time it still meters
      A compressed frame in a Data module, inflated at module scope.

      The decompressor has to be synchronous, because a module-scope await never settles on this runtime, and inflating runs inside the one second a Worker has to start.

  • Method Details

    • values

      public static SizeSpec.ModuleType[] 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 SizeSpec.ModuleType 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