@@ -0,0 +1,1073 @@
+package com.ninty.runtime.heap;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0A/**%0A * Created by ninty on 2017/8/2.%0A */%0Apublic class NiString %7B%0A%0A    private static Map%3CString, NiObject%3E stringPool = new HashMap%3C%3E(1 %3C%3C 10);%0A    private static String className = %22java/lang/String%22;%0A%0A    public static NiObject newString(NiClassLoader loader, String str) %7B%0A        if (stringPool.containsKey(str)) %7B%0A            return stringPool.get(str);%0A        %7D%0A        char%5B%5D chars = str.toCharArray();%0A        NiObject value = new NiObject(loader.loadClass(%22%5BC%22), chars);%0A        NiObject strRef = loader.loadClass(className).newObject();%0A        NiField field = strRef.getClz().findField(%22value%22, %22%5BC%22);%0A        strRef.getFields().setRef(field.getSlotId(), value);%0A        stringPool.put(str, strRef);%0A        return strRef;%0A    %7D%0A%0A    public static String getString(NiObject ref) %7B%0A        NiField field = ref.getClz().findField(%22value%22, %22%5BC%22);%0A        NiObject value = ref.getFields().getRef(field.getSlotId());%0A        return new String((char%5B%5D) value.getArrayDatas());%0A    %7D%0A%7D%0A

support String