public static function init() { self::$JS_CHARS_ESCAPED[chr(0)] = '0'; self::$JS_CHARS_ESCAPED[""] = 'b'; self::$JS_CHARS_ESCAPED["\t"] = 't'; self::$JS_CHARS_ESCAPED["\n"] = 'n'; self::$JS_CHARS_ESCAPED["\f"] = 'f'; self::$JS_CHARS_ESCAPED["\r"] = 'r'; self::$JS_CHARS_ESCAPED[self::JS_ESCAPE_CHAR] = self::JS_ESCAPE_CHAR; self::$JS_CHARS_ESCAPED[self::JS_QUOTE_CHAR] = self::JS_QUOTE_CHAR; self::$CLASS_TO_VALUE_WRITER = new IdentityHashMap(); self::$CLASS_TO_VECTOR_WRITER = new IdentityHashMap(); self::$CLASS_TO_VECTOR_WRITER->put(Classes::classOf('boolean[]'), SSSW_VectorWriter::$BOOLEAN_VECTOR); self::$CLASS_TO_VECTOR_WRITER->put(Classes::classOf('byte[]'), SSSW_VectorWriter::$BYTE_VECTOR); self::$CLASS_TO_VECTOR_WRITER->put(Classes::classOf('char[]'), SSSW_VectorWriter::$CHAR_VECTOR); self::$CLASS_TO_VECTOR_WRITER->put(Classes::classOf('double[]'), SSSW_VectorWriter::$DOUBLE_VECTOR); self::$CLASS_TO_VECTOR_WRITER->put(Classes::classOf('float[]'), SSSW_VectorWriter::$FLOAT_VECTOR); self::$CLASS_TO_VECTOR_WRITER->put(Classes::classOf('int[]'), SSSW_VectorWriter::$INT_VECTOR); self::$CLASS_TO_VECTOR_WRITER->put(Classes::classOf('long[]'), SSSW_VectorWriter::$LONG_VECTOR); self::$CLASS_TO_VECTOR_WRITER->put(Classes::classOf('Object[]'), SSSW_VectorWriter::$OBJECT_VECTOR); self::$CLASS_TO_VECTOR_WRITER->put(Classes::classOf('short[]'), SSSW_VectorWriter::$SHORT_VECTOR); self::$CLASS_TO_VECTOR_WRITER->put(Classes::classOf('String[]'), SSSW_VectorWriter::$STRING_VECTOR); self::$CLASS_TO_VALUE_WRITER->put(Boolean::typeClass(), SSSW_ValueWriter::$BOOLEAN); self::$CLASS_TO_VALUE_WRITER->put(Byte::typeClass(), SSSW_ValueWriter::$BYTE); self::$CLASS_TO_VALUE_WRITER->put(Character::typeClass(), SSSW_ValueWriter::$CHAR); self::$CLASS_TO_VALUE_WRITER->put(Double::typeClass(), SSSW_ValueWriter::$DOUBLE); self::$CLASS_TO_VALUE_WRITER->put(Float::typeClass(), SSSW_ValueWriter::$FLOAT); self::$CLASS_TO_VALUE_WRITER->put(Integer::typeClass(), SSSW_ValueWriter::$INT); self::$CLASS_TO_VALUE_WRITER->put(Long::typeClass(), SSSW_ValueWriter::$LONG); self::$CLASS_TO_VALUE_WRITER->put(Object::clazz(), SSSW_ValueWriter::$OBJECT); self::$CLASS_TO_VALUE_WRITER->put(Short::typeClass(), SSSW_ValueWriter::$SHORT); self::$CLASS_TO_VALUE_WRITER->put(String::clazz(), SSSW_ValueWriter::$STRING); }