public static Type getReturnTypeOfInvocation ( AbstractInsnNode invokeNode ) { Validate . notNull ( invokeNode ) ; if ( invokeNode instanceof MethodInsnNode ) { MethodInsnNode methodInsnNode = ( MethodInsnNode ) invokeNode ; Type methodType = Type . getType ( methodInsnNode . desc ) ; return methodType . getReturnType ( ) ; } else if ( invokeNode instanceof InvokeDynamicInsnNode ) { InvokeDynamicInsnNode invokeDynamicInsnNode = ( InvokeDynamicInsnNode ) invokeNode ; Type methodType = Type . getType ( invokeDynamicInsnNode . desc ) ; return methodType . getReturnType ( ) ; } else { throw new IllegalArgumentException ( ) ; } }
Get the return type of the method being invoked .