class SignatureParserWithGeneric {

    private final List<String> argumentsTypes;
    private final String returnType;

    public SignatureParserWithGeneric(String signature) {
        GenericSignatureParser delegate = new GenericSignatureParser(signature);
        List<String> arguments = new ArrayList<>();
        delegate.parameterSignatureIterator().forEachRemaining(arguments::add);
        this.argumentsTypes = Collections.unmodifiableList(arguments);
        this.returnType = delegate.getReturnTypeSignature();
    }

    public List<JavaClass[]> getArgumentsClasses() {<FILL_FUNCTION_BODY>}

    public JavaClass[] getReturnClasses() {
        return typeToJavaClass(returnType);
    }

    private JavaClass[] typeToJavaClass(String signature) {
        if ("V".equals(signature)) {
            // Special case for void
            return new JavaClass[0];
        }
        
        Type type = GenericUtilities.getType(signature);
        
        List<JavaClass> types =  typeToJavaClass(type);
        
        return types.toArray(new JavaClass[types.size()]);
    }
    
    private List<JavaClass> typeToJavaClass(Type type) {
        List<JavaClass> types = new ArrayList<>();
        
        if (type instanceof ArrayType) {
            ArrayType arrayType = (ArrayType) type;
            
            return typeToJavaClass(arrayType.getBasicType());
        } else if (type instanceof GenericObjectType) {
            GenericObjectType genericObjectType = (GenericObjectType) type;
            
            try {
                types.add(Repository.lookupClass(genericObjectType.getClassName()));
            } catch (ClassNotFoundException e) {
                AnalysisContext.reportMissingClass(e);
            }
            
            if (genericObjectType.getParameters() != null) {
                for (Type parameterType : genericObjectType.getParameters()) {
                    types.addAll(typeToJavaClass(parameterType));
                }
            }
        } else if (type instanceof ObjectType) {
            ObjectType objectType = (ObjectType) type;

            try {
                types.add(Repository.lookupClass(objectType.getClassName()));
            } catch (ClassNotFoundException e) {
                AnalysisContext.reportMissingClass(e);
            }
        }
        
        return types;
    }
}

        List<JavaClass[]> types = new ArrayList<>();

        for(String argumentType : argumentsTypes) {
            if(argumentType.equals("")) continue;
            types.add(typeToJavaClass(argumentType));
        }
        return types;
    
<no_super_class>