本文整理汇总了Java中com.android.dex.TypeList类的典型用法代码示例。如果您正苦于以下问题:Java TypeList类的具体用法?Java TypeList怎么用?Java TypeList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TypeList类属于com.android.dex包,在下文中一共展示了TypeList类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: adjustTypeList
import com.android.dex.TypeList; //导入依赖的package包/类
public TypeList adjustTypeList(TypeList typeList) {
if (typeList == TypeList.EMPTY) {
return typeList;
}
short[] types = typeList.getTypes().clone();
for (int i = 0; i < types.length; i++) {
types[i] = (short) adjustType(types[i]);
}
return new TypeList(target, types);
}
示例2: readParamList
import com.android.dex.TypeList; //导入依赖的package包/类
public List<ArgType> readParamList(int parametersOffset) {
TypeList paramList = dexBuf.readTypeList(parametersOffset);
List<ArgType> args = new ArrayList<ArgType>(paramList.getTypes().length);
for (short t : paramList.getTypes()) {
args.add(getType(t));
}
return Collections.unmodifiableList(args);
}
示例3: fromDex
import com.android.dex.TypeList; //导入依赖的package包/类
static MethodDescriptor fromDex(Dex dex, int methodIndex) {
MethodId method = dex.methodIds().get(methodIndex);
ProtoId proto = dex.protoIds().get(method.getProtoIndex());
String name = dex.strings().get(method.getNameIndex());
String declaringClass = typeName(dex, method.getDeclaringClassIndex());
String returnType = typeName(dex, proto.getReturnTypeIndex());
TypeList parameterTypeIndices = dex.readTypeList(proto.getParametersOffset());
ImmutableList.Builder<String> parameterTypes = ImmutableList.builder();
for (short parameterTypeIndex : parameterTypeIndices.getTypes()) {
parameterTypes.add(typeName(dex, parameterTypeIndex & 0xFFFF));
}
return new AutoValue_DexLimitTracker_MethodDescriptor(
declaringClass, name, parameterTypes.build(), returnType);
}
示例4: readParamList
import com.android.dex.TypeList; //导入依赖的package包/类
public List<ArgType> readParamList(int parametersOffset) {
TypeList paramList = dexBuf.readTypeList(parametersOffset);
List<ArgType> args = new ArrayList<>(paramList.getTypes().length);
for (short t : paramList.getTypes()) {
args.add(getType(t));
}
return Collections.unmodifiableList(args);
}