Class RhinoStringPool.LazyInternedStringList

java.lang.Object
com.google.javascript.rhino.RhinoStringPool.LazyInternedStringList
Enclosing class:
RhinoStringPool

public static final class RhinoStringPool.LazyInternedStringList extends Object
A list of strings that is lazily interned into a RhinoStringPool as they are accessed.

The only reason to use this class is for performance optimizations - the

invalid reference
LazyInternedStringList#newStringNode
method skips re-interning the string. This is a performance win if creating a lot of string nodes with the same string.
  • Constructor Details

    • LazyInternedStringList

      public LazyInternedStringList(List<String> pool)
  • Method Details