Search in sources :

Example 36 with CstType

use of com.taobao.android.dx.rop.cst.CstType in project atlas by alibaba.

the class TypeIdsSection method intern.

/**
     * Interns an element into this instance.
     *
     * @param type {@code non-null;} the type to intern
     * @return {@code non-null;} the interned reference
     */
public synchronized TypeIdItem intern(CstType type) {
    if (type == null) {
        throw new NullPointerException("type == null");
    }
    throwIfPrepared();
    Type typePerSe = type.getClassType();
    if (typePerSe.getDescriptor().equals("L;")) {
        System.out.println("xxxxxx");
    }
    TypeIdItem result = typeIds.get(typePerSe);
    if (result == null) {
        result = new TypeIdItem(type);
        typeIds.put(typePerSe, result);
    }
    return result;
}
Also used : CstType(com.taobao.android.dx.rop.cst.CstType) Type(com.taobao.android.dx.rop.type.Type)

Aggregations

CstType (com.taobao.android.dx.rop.cst.CstType)36 CstString (com.taobao.android.dx.rop.cst.CstString)14 Constant (com.taobao.android.dx.rop.cst.Constant)12 Type (com.taobao.android.dx.rop.type.Type)9 CstFieldRef (com.taobao.android.dx.rop.cst.CstFieldRef)7 CstMethodRef (com.taobao.android.dx.rop.cst.CstMethodRef)6 CstInsn (com.taobao.android.dx.dex.code.CstInsn)5 Annotations (com.taobao.android.dx.rop.annotation.Annotations)5 RegisterSpec (com.taobao.android.dx.rop.code.RegisterSpec)5 RegisterSpecList (com.taobao.android.dx.rop.code.RegisterSpecList)5 Annotation (com.taobao.android.dx.rop.annotation.Annotation)4 CstNat (com.taobao.android.dx.rop.cst.CstNat)4 IntList (com.taobao.android.dx.util.IntList)4 AttEnclosingMethod (com.taobao.android.dx.cf.attrib.AttEnclosingMethod)3 NameValuePair (com.taobao.android.dx.rop.annotation.NameValuePair)3 ConstantPool (com.taobao.android.dx.rop.cst.ConstantPool)3 TypeList (com.taobao.android.dx.rop.type.TypeList)3 ByteArray (com.taobao.android.dx.util.ByteArray)3 AttInnerClasses (com.taobao.android.dx.cf.attrib.AttInnerClasses)2 AttRuntimeInvisibleAnnotations (com.taobao.android.dx.cf.attrib.AttRuntimeInvisibleAnnotations)2