using Luban.Job.Common.Types;

namespace Luban.Job.Common.TypeVisitors
{
    public class NeedMarshalBoolPrefixVisitor : DecoratorFuncVisitor<bool>
    {
        public static NeedMarshalBoolPrefixVisitor Ins { get; } = new NeedMarshalBoolPrefixVisitor();

        public override bool DoAccept(TType type)
        {
            return type.IsNullable && !(type is TBean bean && bean.IsDynamic);
        }
    }
}
