예제 #1
0
파일: ITable.java 프로젝트: vipyami/robovm
 @Override
 public String toString() {
   StringBuilder builder = new StringBuilder();
   builder
       .append("Entry [index=")
       .append(index)
       .append(", name=")
       .append(name)
       .append(", desc=")
       .append(desc)
       .append("]");
   return builder.toString();
 }
예제 #2
0
파일: ITable.java 프로젝트: vipyami/robovm
 @Override
 public String toString() {
   StringBuilder builder = new StringBuilder();
   builder
       .append("ResolvedEntry [modifiers=")
       .append(modifiers)
       .append(", declaringClass=")
       .append(declaringClass)
       .append(", index=")
       .append(index)
       .append(", name=")
       .append(name)
       .append(", desc=")
       .append(desc)
       .append("]");
   return builder.toString();
 }
예제 #3
0
 protected static String getLoType(
     final Type type, String base, int index, Map<String, String> structs) {
   if (type instanceof StructureType) {
     StringBuilder sb = new StringBuilder();
     StructureType st = (StructureType) type;
     sb.append("{");
     String name = String.format("%s_%04d", base, index);
     for (int i = 0; i < st.getTypeCount(); i++) {
       Type t = st.getTypeAt(i);
       if (i == 0 && t instanceof StructureType) {
         if (((StructureType) t).getTypeCount() == 0) {
           // Skip empty structs as first member
           continue;
         }
       }
       // Only support arrays embedded in structs
       StringBuilder dims = new StringBuilder();
       while (t instanceof ArrayType) {
         ArrayType at = (ArrayType) t;
         dims.append('[').append(at.getSize()).append(']');
         t = ((ArrayType) t).getElementType();
       }
       sb.append(getLoType(t, name, i, structs)).append(" m" + i).append(dims).append(";");
     }
     sb.append("}");
     structs.put(name, sb.toString());
     return "struct " + name;
   } else {
     return getHiType(type);
   }
 }