Exemplo 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;
 }
Exemplo n.º 2
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;
 }
Exemplo n.º 3
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;
 }