Class AutoValueMappers

java.lang.Object
gov.nasa.jpl.aerie.merlin.processor.AutoValueMappers

public class AutoValueMappers extends Object
  • Constructor Details

    • AutoValueMappers

      public AutoValueMappers()
  • Method Details

    • getIdentifier

      public static String getIdentifier(String str)
      Turn a given string into a valid Java identifier
      Parameters:
      str - a string that may or may not be a valid Java identifier
      Returns:
      a string that is a valid Java identifier Any illegal characters are replaced by their UTF_8 integer representation as a decimal number surrounded by underscores. This helps ensure that strings the differ only in illegal characters get unique identifiers. (e.g. "m/s" and "m*s") E.g. "invalid input: '<'Hello (Worl%d!)" becomes "_60_Hello_32__40_Worl_37_d_33__41_"