Esempio n. 1
0
 public MCpInfo newCpInfoClass(String className) {
   MCpInfo clazz = newCpInfo(CpClass);
   MCpInfo clazzName = newCpInfo(CpUtf8);
   clazz.ptr_name = clazzName;
   clazzName.str_bytes = className;
   return clazz;
 }
Esempio n. 2
0
 public MCpInfo newCpInfoUtf8(String str) {
   MCpInfo strUtf8 = cpUtf8Map.get(str);
   if (strUtf8 == null) {
     strUtf8 = newCpInfo(CpUtf8);
     strUtf8.str_bytes = str;
     cpUtf8Map.put(str, strUtf8);
   }
   return strUtf8;
 }
Esempio n. 3
0
 public MField newField(MCpInfo clazz, String name, String signature) {
   MField field = new MField(this);
   MCpInfo fieldName = newCpInfoUtf8(name);
   MCpInfo fieldSign = newCpInfoUtf8(signature);
   MCpInfo fieldNat = newCpInfo(CpNameAndType);
   MCpInfo fieldRef = newCpInfo(CpFieldref);
   field.ptr_name = fieldName;
   field.ptr_signature = fieldSign;
   field.ptr_ref = fieldRef;
   fieldNat.ptr_name = fieldName;
   fieldNat.ptr_signature = fieldSign;
   fieldRef.ptr_class = clazz;
   fieldRef.ptr_name_and_type = fieldNat;
   return field;
 }
Esempio n. 4
0
 public MMethod newMethod(MCpInfo clazz, String name, String signature) {
   MMethod method = new MMethod(this);
   MCpInfo methodName = newCpInfoUtf8(name);
   MCpInfo methodSign = newCpInfoUtf8(signature);
   MCpInfo methodNat = newCpInfo(CpNameAndType);
   MCpInfo methodRef = newCpInfo(CpMethodref);
   method.ptr_name = methodName;
   method.ptr_signature = methodSign;
   method.ptr_ref = methodRef;
   methodNat.ptr_name = methodName;
   methodNat.ptr_signature = methodSign;
   methodRef.ptr_class = clazz;
   methodRef.ptr_name_and_type = methodNat;
   return method;
 }
Esempio n. 5
0
 public MCpInfo newCpInfoString(String str) {
   MCpInfo cpStr = newCpInfo(CpString);
   cpStr.ptr_string = newCpInfoUtf8(str);
   return cpStr;
 }