Class RuntimeMapping

java.lang.Object
io.github.protasm.jvmud.compiler.runtime.RuntimeMapping

public final class RuntimeMapping extends Object
Runtime helpers for LPC mapping operations that accept legacy false sentinels.
  • Method Details

    • multiValue

      public static Object multiValue(Object... values)
      Wraps a mapping entry's semicolon-separated values as one Java map value.
    • select

      public static Object select(Object value, Object index)
      Selects one value slot from a possibly multi-value mapping entry.
    • replaceValue

      public static Object replaceValue(Object entry, Object index, Object value)
      Replaces one value slot in a multi-value mapping entry.
      Parameters:
      entry - current Java representation of the mapping entry, or null when absent
      index - zero-based mapping value slot
      value - replacement value
      Returns:
      the updated entry representation
    • merge

      public static Map<Object,Object> merge(Object left, Object right)
      Merges LPC mapping operands while treating the false sentinel as an empty mapping.

      The right operand wins duplicate keys, matching the direct putAll order the bytecode emitter used before this helper.