本文整理汇总了Java中org.jf.dexlib2.iface.MethodParameter.getName方法的典型用法代码示例。如果您正苦于以下问题:Java MethodParameter.getName方法的具体用法?Java MethodParameter.getName怎么用?Java MethodParameter.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jf.dexlib2.iface.MethodParameter
的用法示例。
在下文中一共展示了MethodParameter.getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: internDebug
import org.jf.dexlib2.iface.MethodParameter; //导入方法依赖的package包/类
private void internDebug(@Nonnull Method method) {
for (MethodParameter param : method.getParameters()) {
String paramName = param.getName();
if (paramName != null) {
stringPool.intern(paramName);
}
}
MethodImplementation methodImpl = method.getImplementation();
if (methodImpl != null) {
for (DebugItem debugItem : methodImpl.getDebugItems()) {
switch (debugItem.getDebugItemType()) {
case DebugItemType.START_LOCAL:
StartLocal startLocal = (StartLocal) debugItem;
stringPool.internNullable(startLocal.getName());
typePool.internNullable(startLocal.getType());
stringPool.internNullable(startLocal.getSignature());
break;
case DebugItemType.SET_SOURCE_FILE:
stringPool.internNullable(((SetSourceFile) debugItem).getSourceFile());
break;
}
}
}
}
示例2: of
import org.jf.dexlib2.iface.MethodParameter; //导入方法依赖的package包/类
public static ImmutableMethodParameter of(MethodParameter methodParameter) {
if (methodParameter instanceof ImmutableMethodParameter) {
return (ImmutableMethodParameter)methodParameter;
}
return new ImmutableMethodParameter(
methodParameter.getType(),
methodParameter.getAnnotations(),
methodParameter.getName());
}
示例3: of
import org.jf.dexlib2.iface.MethodParameter; //导入方法依赖的package包/类
public static ImmutableMethodParameter of(MethodParameter methodParameter) {
if (methodParameter instanceof ImmutableMethodParameter) {
return (ImmutableMethodParameter) methodParameter;
}
return new ImmutableMethodParameter(
methodParameter.getType(),
methodParameter.getAnnotations(),
methodParameter.getName());
}
示例4: makeParamString
import org.jf.dexlib2.iface.MethodParameter; //导入方法依赖的package包/类
private String makeParamString(DexBackedMethod method) {
StringBuilder paramStringBuilder = new StringBuilder();
int paramOffset = 0;
for (MethodParameter param : method.getParameters()) {
String dottedReturnName = Utils.descriptorToDot(param.getType());
this.addImport(dottedReturnName);
String shortName = Utils.getShort(dottedReturnName);
String argName = "";
/* Is the name saved? */
if (param.getName() != null) {
argName = param.getName();
} else {
argName = "arg" + Integer.toString(paramOffset);
}
paramStringBuilder.append(shortName + " " + argName + ", ");
paramOffset++;
}
return paramStringBuilder.toString().replaceAll(",\\s$", "");
}