package com.gh.gamecenter.ksp.compiler.entity;

import com.google.devtools.ksp.symbol.KSClassDeclaration;
import com.therouter.router.Route;

import java.util.Map;

import javax.lang.model.element.Element;

public class RouteMetaKsp extends RouteMeta {
    private KSClassDeclaration kspRawTypeInner;      // Raw type of ksp : KSClassDeclaration

    public RouteMetaKsp(Route route, Element rawType, Map<String, Integer> paramsType) {
        super(rawType, null, route.description(), route.path(), "", paramsType, 1, 1);
    }

    /**
     * Type
     *
     * @param route      route
     * @param kspRawType kspRawType
     * @param paramsType paramsType
     */
    public static RouteMeta build(Route route, KSClassDeclaration kspRawType, Map<String, Integer> paramsType) {
        RouteMetaKsp meta = new RouteMetaKsp(route, null, paramsType);
        meta.kspRawTypeInner = kspRawType;
        return meta;
    }

    public KSClassDeclaration getKspRawTypeInner() {
        return kspRawTypeInner;
    }
}
