Cannot convert Java type 'android.content.Context' to Yail type

I’m working on a very plain extension for now.
This is the code:

package net.ontstd.cachetools;

import android.content.*;
import android.util.Log;

@DesignerComponent(version = 1,  description = "This Extension was created with the AppyBuilder Code Editor.<br>" +
                   "Create your own here:<br><a href='' target='_blank'></a><br>",
        category = ComponentCategory.EXTENSION,
        nonVisible = true,   iconName = "")
@SimpleObject(external = true)
public class CacheTools extends AndroidNonvisibleComponent {

    public Context context;

    private ComponentContainer container;
     * @param container container, component will be placed in
    public CacheTools(ComponentContainer container) {
        this.container = container;
        context = (Context) container.$context();

    @SimpleFunction(description = "Retrieves value of a tag")
    public Object CacheDirectory(Context context) {
      File file = this.context.getExternalFilesDir(null);
      return file.toString();

and this is the log:

    [javac] An annotation processor threw an uncaught exception.
    [javac] Consult the following stack trace for details.
    [javac] java.lang.IllegalArgumentException: Cannot convert Java type 'android.content.Context' to Yail type

The full log is here:

I did find this question by Diego on StackOverflow but I have no idea how to implement it in my code

Help is appreciated

EDIT: A reference for my code is here java - context.getExternalFilesDir(null) is null - Stack Overflow

Error says it all.
You can’t pass java types as parameter in extensions.
Either change it to object or create a new method (without annotation )and add your code there.

Thanks for your reply, I’ll try it.

Which Is Answered By Taifun