Class NameMangler.JavaIdent

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

public static class NameMangler.JavaIdent extends Object implements NameMangler
A mangler which outputs valid Java identifiers.
  • Constructor Details

    • JavaIdent

      public JavaIdent(NameMangler.IllegalSymbolPolicy policy)
      Construct a Java identifier mangler.
      Parameters:
      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.