Search in sources :

Example 21 with StdTypeList

use of com.android.dx.rop.type.StdTypeList in project J2ME-Loader by nikita36078.

the class ProtoIdItem method makeShortForm.

/**
 * Creates the short-form of the given prototype.
 *
 * @param prototype {@code non-null;} the prototype
 * @return {@code non-null;} the short form
 */
private static CstString makeShortForm(Prototype prototype) {
    StdTypeList parameters = prototype.getParameterTypes();
    int size = parameters.size();
    StringBuilder sb = new StringBuilder(size + 1);
    sb.append(shortFormCharFor(prototype.getReturnType()));
    for (int i = 0; i < size; i++) {
        sb.append(shortFormCharFor(parameters.getType(i)));
    }
    return new CstString(sb.toString());
}
Also used : StdTypeList(com.android.dx.rop.type.StdTypeList) CstString(com.android.dx.rop.cst.CstString)

Aggregations

StdTypeList (com.android.dx.rop.type.StdTypeList)21 CstType (com.android.dx.rop.cst.CstType)10 Type (com.android.dx.rop.type.Type)10 CstString (com.android.dx.rop.cst.CstString)4 Prototype (com.android.dx.rop.type.Prototype)4 ByteArrayByteInput (com.android.dex.util.ByteArrayByteInput)2 ByteInput (com.android.dex.util.ByteInput)2 AttInnerClasses (com.android.dx.cf.attrib.AttInnerClasses)2 AttRuntimeInvisibleAnnotations (com.android.dx.cf.attrib.AttRuntimeInvisibleAnnotations)2 AttRuntimeInvisibleParameterAnnotations (com.android.dx.cf.attrib.AttRuntimeInvisibleParameterAnnotations)2 AttRuntimeVisibleAnnotations (com.android.dx.cf.attrib.AttRuntimeVisibleAnnotations)2 AttRuntimeVisibleParameterAnnotations (com.android.dx.cf.attrib.AttRuntimeVisibleParameterAnnotations)2 InnerClassList (com.android.dx.cf.attrib.InnerClassList)2 LocalList (com.android.dx.dex.code.LocalList)2 PositionList (com.android.dx.dex.code.PositionList)2 Annotations (com.android.dx.rop.annotation.Annotations)2 BasicBlock (com.android.dx.rop.code.BasicBlock)2 Insn (com.android.dx.rop.code.Insn)2 InsnList (com.android.dx.rop.code.InsnList)2 PlainCstInsn (com.android.dx.rop.code.PlainCstInsn)2