public static NativeSymbol construct ( Context cx , Scriptable scope , Object [ ] args ) { cx . putThreadLocal ( CONSTRUCTOR_SLOT , Boolean . TRUE ) ; try { return ( NativeSymbol ) cx . newObject ( scope , CLASS_NAME , args ) ; } finally { cx . removeThreadLocal ( CONSTRUCTOR_SLOT ) ; } }
Use this when we need to create symbols internally because of the convoluted way we have to construct them .