Class NameMangler.BanChars

java.lang.Object
io.github.eutro.wasm2j.api.support.NameMangler.BanChars
All Implemented Interfaces:
NameMangler
Enclosing interface:
NameMangler

public static class NameMangler.BanChars extends Object implements NameMangler
A name mangler that forbids a certain set of characters.
  • Constructor Details

    • BanChars

      public BanChars(String forbidden, NameMangler.IllegalSymbolPolicy policy)
      Construct a character-banning name mangler that forbids the given characters.
      Parameters:
      forbidden - The forbidden characters.
      policy - The policy for handling illegal characters.
  • Method Details

    • mangle

      public String mangle(String str)
      Description copied from interface: NameMangler
      Mangle a string, so it becomes a valid name according to the rules of this mangler.
      Specified by:
      mangle in interface NameMangler
      Parameters:
      str - The name to mangle
      Returns:
      The mangled string.