本文整理了Java中org.objectweb.asm.Type.getReturnType()
方法的一些代码示例,展示了Type.getReturnType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Type.getReturnType()
方法的具体详情如下:
包路径:org.objectweb.asm.Type
类名称:Type
方法名:getReturnType
[英]Returns the return type of methods of this type. This method should only be used for method types.
[中]返回此类型的方法的返回类型。此方法只能用于方法类型。
代码示例来源:origin: robolectric/robolectric
public MethodExtraInfo(MethodNode method) {
this.isStatic = (method.access & Opcodes.ACC_STATIC) != 0;
this.returnType = typeWithoutGenerics(normalize(Type.getReturnType(method.desc)));
}
代码示例来源:origin: robolectric/robolectric
public Type getReturnType() {
return Type.getReturnType(desc);
}
代码示例来源:origin: cglib/cglib
public Type getReturnType() {
return Type.getReturnType(desc);
}
代码示例来源:origin: scouter-project/scouter
public InitialContextMV(int access, String desc, MethodVisitor mv, String classname, String methodname,
String methoddesc) {
super(ASM7, access, desc, mv);
this.returnType = Type.getReturnType(desc);
}
代码示例来源:origin: scouter-project/scouter
public CallOrRunMV(int access, String name, String desc, MethodVisitor mv) {
super(ASM7, access, desc, mv);
this.name = name;
this.desc = desc;
this.returnType = Type.getReturnType(desc);
}
代码示例来源:origin: scouter-project/scouter
public ApiCallResponseObjectInitMV(String className, int access, String name, String desc, MethodVisitor mv) {
super(ASM7, access, desc, mv);
this.className = className;
this.name = name;
this.desc = desc;
this.returnType = Type.getReturnType(desc);
}
代码示例来源:origin: scouter-project/scouter
public GetKeyBytesMV(int access, String className, String name, String desc, MethodVisitor mv) {
super(ASM7, access, desc, mv);
this.className = className;
this.name = name;
this.desc = desc;
this.returnType = Type.getReturnType(desc);
}
代码示例来源:origin: scouter-project/scouter
public FacotoryMV(int access, String name, String desc, MethodVisitor mv) {
super(ASM7, access, desc, mv);
this.name = name;
this.desc = desc;
this.returnType = Type.getReturnType(desc);
}
代码示例来源:origin: scouter-project/scouter
public CapReturnMV(int access, String desc, MethodVisitor mv,
String classname,
String methodname,
String methoddesc, boolean isStatic) {
super(ASM7, access, desc, mv);
this.returnType = Type.getReturnType(desc);
this.className = classname;
this.methodName = methodname;
this.methodDesc = methoddesc;
this.isStatic = isStatic;
}
代码示例来源:origin: scouter-project/scouter
public DataSourceMV(int access, String desc, MethodVisitor mv, String className, String methodName) {
super(ASM7,access, desc, mv);
this.returnType = Type.getReturnType(desc);
this.className = className;
this.methodName = methodName;
this.methodDesc = desc;
}
代码示例来源:origin: scouter-project/scouter
public SendCommandMV(int access, String name, String desc, MethodVisitor mv) {
super(ASM7, access, desc, mv);
this.name = name;
this.desc = desc;
this.returnType = Type.getReturnType(desc);
}
代码示例来源:origin: Meituan-Dianping/Robust
public MethodBodyInsertor(MethodVisitor mv, String className, String desc, boolean isStatic, String methodId, String name, int access) {
super(Opcodes.ASM5, mv, access, name, desc);
this.className = className;
this.returnType = Type.getReturnType(desc);
Type[] argsType = Type.getArgumentTypes(desc);
for (Type type : argsType) {
paramsTypeClass.add(type);
}
this.isStatic = isStatic;
this.methodId = methodId;
}
代码示例来源:origin: pxb1988/dex2jar
private Method build(MtdInfo mapTo) {
Type[] ts = Type.getArgumentTypes(mapTo.desc);
String ss[] = new String[ts.length];
for (int i = 0; i < ss.length; i++) {
ss[i] = ts[i].getDescriptor();
}
return new Method(mapTo.owner, mapTo.name, ss, Type.getReturnType(mapTo.desc).getDescriptor());
}
代码示例来源:origin: pxb1988/dex2jar
IrMethod populate(String owner, MethodNode source) {
IrMethod target = new IrMethod();
target.name = source.name;
target.owner = "L" + owner + ";";
target.ret = Type.getReturnType(source.desc).getDescriptor();
Type[] args = Type.getArgumentTypes(source.desc);
String sArgs[] = new String[args.length];
target.args = sArgs;
for (int i = 0; i < args.length; i++) {
sArgs[i] = args[i].getDescriptor();
}
target.isStatic = 0 != (source.access & Opcodes.ACC_STATIC);
return target;
}
代码示例来源:origin: robolectric/robolectric
public static MethodSignature parse(String internalString) {
int parenStart = internalString.indexOf('(');
int methodStart = internalString.lastIndexOf('/', parenStart);
String className = internalString.substring(0, methodStart).replace('/', '.');
String methodName = internalString.substring(methodStart + 1, parenStart);
String methodDescriptor = internalString.substring(parenStart);
Type[] argumentTypes = Type.getArgumentTypes(methodDescriptor);
String[] paramTypes = new String[argumentTypes.length];
for (int i = 0; i < argumentTypes.length; i++) {
paramTypes[i] = argumentTypes[i].getClassName();
}
final String returnType = Type.getReturnType(methodDescriptor).getClassName();
return new MethodSignature(className, methodName, paramTypes, returnType);
}
代码示例来源:origin: robolectric/robolectric
String remapParams(String desc) {
StringBuilder buf = new StringBuilder();
buf.append("(");
for (Type type : Type.getArgumentTypes(desc)) {
buf.append(remapParamType(type));
}
buf.append(")");
buf.append(remapParamType(Type.getReturnType(desc)));
return buf.toString();
}
代码示例来源:origin: scouter-project/scouter
public StExecuteMV(int access, String desc, MethodVisitor mv, String owner, String name) {
super(ASM7, access, desc, mv);
this.returnType = Type.getReturnType(desc);
this.desc = desc;
this.methodType = methodType(name);
}
代码示例来源:origin: scouter-project/scouter
public PsExecuteMV(int access, String desc, MethodVisitor mv, String owner,String name) {
super(ASM7,access, desc, mv);
this.owner = owner;
this.returnType = Type.getReturnType(desc);
this.desc = desc;
this.methodType = StExecuteMV.methodType(name);
}
private Label startFinally = new Label();
代码示例来源:origin: scouter-project/scouter
public static void main(String[] args) {
Type type = Type.getReturnType("(Z)[I");
System.out.println("type = " + type.getSort());
System.out.println("dim = " + type.getDimensions());
System.out.println("element = " + type.getElementType());
}
代码示例来源:origin: pmd/pmd
private void addMethodDesc(String desc) {
addTypes(desc);
addType(Type.getReturnType(desc));
}
内容来源于网络,如有侵权,请联系作者删除!