本文整理汇总了Java中com.android.dex.MethodId类的典型用法代码示例。如果您正苦于以下问题:Java MethodId类的具体用法?Java MethodId怎么用?Java MethodId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MethodId类属于com.android.dex包,在下文中一共展示了MethodId类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: location
import com.android.dex.MethodId; //导入依赖的package包/类
private String location() {
String className = dex.typeNames().get(currentClass.getTypeIndex());
if (currentMethod != null) {
MethodId methodId = dex.methodIds().get(currentMethod.getMethodIndex());
return className + "." + dex.strings().get(methodId.getNameIndex());
} else {
return className;
}
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:10,代码来源:Grep.java
示例2: getMethodIds
import com.android.dex.MethodId; //导入依赖的package包/类
/**
* Returns the methods with {@code memberNameIndex} declared by {@code
* declaringType} and its subtypes.
*/
private Set<Integer> getMethodIds(Dex dex, Set<Integer> memberNameIndexes, int declaringType) {
Set<Integer> subtypes = findAssignableTypes(dex, declaringType);
Set<Integer> methods = new HashSet<Integer>();
int methodIndex = 0;
for (MethodId method : dex.methodIds()) {
if (memberNameIndexes.contains(method.getNameIndex())
&& subtypes.contains(method.getDeclaringClassIndex())) {
methods.add(methodIndex);
}
methodIndex++;
}
return methods;
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:19,代码来源:FindUsages.java
示例3: printMethodIds
import com.android.dex.MethodId; //导入依赖的package包/类
private void printMethodIds() throws IOException {
int index = 0;
for (MethodId methodId : dex.methodIds()) {
System.out.println("methodId " + index + ": " + methodId);
index++;
}
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:8,代码来源:DexIndexPrinter.java
示例4: MethodInfo
import com.android.dex.MethodId; //导入依赖的package包/类
private MethodInfo(DexNode dex, int mthIndex) {
MethodId mthId = dex.getMethodId(mthIndex);
name = dex.getString(mthId.getNameIndex());
alias = name;
aliasFromPreset = false;
declClass = ClassInfo.fromDex(dex, mthId.getDeclaringClassIndex());
ProtoId proto = dex.getProtoId(mthId.getProtoIndex());
retType = dex.getType(proto.getReturnTypeIndex());
args = dex.readParamList(proto.getParametersOffset());
shortId = makeSignature(true);
}
开发者ID:niranjan94,项目名称:show-java,代码行数:13,代码来源:MethodInfo.java
示例5: fromDex
import com.android.dex.MethodId; //导入依赖的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);
}
开发者ID:bazelbuild,项目名称:bazel,代码行数:15,代码来源:DexLimitTracker.java
示例6: adjust
import com.android.dex.MethodId; //导入依赖的package包/类
public MethodId adjust(MethodId methodId) {
return new MethodId(target,
adjustType(methodId.getDeclaringClassIndex()),
adjustProto(methodId.getProtoIndex()),
adjustString(methodId.getNameIndex()));
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:7,代码来源:IndexMap.java
示例7: getMethodId
import com.android.dex.MethodId; //导入依赖的package包/类
public MethodId getMethodId(int mthIndex) {
return dexBuf.methodIds().get(mthIndex);
}
开发者ID:niranjan94,项目名称:show-java,代码行数:4,代码来源:DexNode.java
注:本文中的com.android.dex.MethodId类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论