# TokenResolver.java

    /*
    ** Module   : TokenResolver.java
    ** Abstract : Implementation of the OpenEdge.Core.Util.TokenResolver builtin class.
    **
    ** Copyright (c) 2025, Golden Code Development Corporation.
    **
    ** -#- -I- --Date-- -------------------------------Description--------------------------------
    ** 001 ICP 20250313 First version.
    */

    /*
    ** This program is free software: you can redistribute it and/or modify
    ** it under the terms of the GNU Affero General Public License as
    ** published by the Free Software Foundation, either version 3 of the
    ** License, or (at your option) any later version.
    **
    ** This program is distributed in the hope that it will be useful,
    ** but WITHOUT ANY WARRANTY; without even the implied warranty of
    ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    ** GNU Affero General Public License for more details.
    **
    ** You may find a copy of the GNU Affero GPL version 3 at the following
    ** location: https://www.gnu.org/licenses/agpl-3.0.en.html
    **
    ** Additional terms under GNU Affero GPL version 3 section 7:
    **
    **   Under Section 7 of the GNU Affero GPL version 3, the following additional
    **   terms apply to the works covered under the License.  These additional terms
    **   are non-permissive additional terms allowed under Section 7 of the GNU
    **   Affero GPL version 3 and may not be removed by you.
    **
    **   0. Attribution Requirement.
    **
    **     You must preserve all legal notices or author attributions in the covered
    **     work or Appropriate Legal Notices displayed by works containing the covered
    **     work.  You may not remove from the covered work any author or developer
    **     credit already included within the covered work.
    **
    **   1. No License To Use Trademarks.
    **
    **     This license does not grant any license or rights to use the trademarks
    **     Golden Code, FWD, any Golden Code or FWD logo, or any other trademarks
    **     of Golden Code Development Corporation. You are not authorized to use the
    **     name Golden Code, FWD, or the names of any author or contributor, for
    **     publicity purposes without written authorization.
    **
    **   2. No Misrepresentation of Affiliation.
    **
    **     You may not represent yourself as Golden Code Development Corporation or FWD.
    **
    **     You may not represent yourself for publicity purposes as associated with
    **     Golden Code Development Corporation, FWD, or any author or contributor to
    **     the covered work, without written authorization.
    **
    **   3. No Misrepresentation of Source or Origin.
    **
    **     You may not represent the covered work as solely your work.  All modified
    **     versions of the covered work must be marked in a reasonable way to make it
    **     clear that the modified work is not originating from Golden Code Development
    **     Corporation or FWD.  All modified versions must contain the notices of
    **     attribution required in this license.
    */

    package com.goldencode.p2j.oo.core.util;

    import com.goldencode.p2j.oo.lang.*;
    import com.goldencode.p2j.security.*;
    import com.goldencode.p2j.util.*;

    import static com.goldencode.p2j.report.ReportConstants.*;
    import static com.goldencode.p2j.util.ArrayAssigner.*;
    import static com.goldencode.p2j.util.BlockManager.*;
    import static com.goldencode.p2j.util.InternalEntry.*;

    /**
     * Implementation of the OpenEdge.Core.Util.TokenResolver builtin class.
     */
    @LegacyResource(resource = "OpenEdge.Core.Util.TokenResolver")
    @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
    public class TokenResolver
    extends BaseObject
    {
       @LegacySignature(type = Type.PROPERTY, extent = 12, name = "MONTH_LONG")
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       private static ContextLocal<character[]> monthLong = new ContextLocal<character[]>()
       {
          protected character[] initialValue()
          {
             return TypeFactory.characterExtent(12);
          }
       };

       @LegacySignature(type = Type.PROPERTY, extent = 12, name = "MONTH_SHORT")
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       private static ContextLocal<character[]> monthShort = new ContextLocal<character[]>()
       {
          protected character[] initialValue()
          {
             return TypeFactory.characterExtent(12);
          }
       };

       @LegacySignature(type = Type.PROPERTY, extent = 7, name = "WEEKDAY_LONG")
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       private static ContextLocal<character[]> weekdayLong = new ContextLocal<character[]>()
       {
          protected character[] initialValue()
          {
             return TypeFactory.characterExtent(7);
          }
       };

       @LegacySignature(type = Type.PROPERTY, extent = 7, name = "WEEKDAY_SHORT")
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       private static ContextLocal<character[]> weekdayShort = new ContextLocal<character[]>()
       {
          protected character[] initialValue()
          {
             return TypeFactory.characterExtent(7);
          }
       };

       @LegacySignature(type = Type.EVENT, name = "TokenResolved", parameters =
       {
          @LegacyParameter(name = "pSender", type = "OBJECT", qualified = "progress.lang.object", mode = "INPUT"),
          @LegacyParameter(name = "pArgs", type = "OBJECT", qualified = "openedge.core.util.tokenresolvereventargs", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       private static ContextLocal<ClassEvent> tokenResolved = new ContextLocal<ClassEvent>()
       {
          protected ClassEvent initialValue()
          {
             return new ClassEvent(TokenResolver.class, "TokenResolved", "tokenResolved");
          }
       };

       @LegacySignature(type = Type.CONSTRUCTOR, name = "TokenResolver")
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public void __core_util_tokenResolver_constructor__()
       {
          internalProcedure(TokenResolver.class, this, "TokenResolver", new Block((Body) () ->
          {
             __lang_BaseObject_constructor__();
          }));
       }

       @LegacySignature(type = Type.GETTER, name = "MONTH_LONG", returns = "CHARACTER", parameters =
       {
          @LegacyParameter(name = "idx", type = "INT64", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character getMonthLong(final int64 _idx)
       {
          ObjectOps.load(TokenResolver.class);
          int64 idx = TypeFactory.initInput(_idx);

          return function(TokenResolver.class, "MONTH_LONG", character.class, new Block((Body) () ->
          {
             storeReturnValue(subscript(monthLong.get(), idx));
          }));
       }

       @LegacySignature(type = Type.SETTER, name = "MONTH_LONG", parameters =
       {
          @LegacyParameter(name = "var", type = "CHARACTER", mode = "INPUT"),
          @LegacyParameter(name = "idx", type = "INT64", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void setMonthLong(final character _var, final int64 _idx)
       {
          ObjectOps.load(TokenResolver.class);
          character var = TypeFactory.initInput(_var);
          int64 idx = TypeFactory.initInput(_idx);

          internalProcedure(TokenResolver.class, "MONTH_LONG", new Block((Body) () ->
          {
             assignSingle(monthLong.get(), idx, var);
          }));
       }

       @LegacySignature(type = Type.GETTER, name = "MONTH_LONG", extent = 12, returns = "CHARACTER")
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character[] bulkGetMonthLong()
       {
          ObjectOps.load(TokenResolver.class);

          return extentFunction(TokenResolver.class, "MONTH_LONG", character.class, 12, new Block((Body) () ->
          {
             storeExtentReturnValue(monthLong.get());
          }));
       }

       @LegacySignature(type = Type.SETTER, name = "MONTH_LONG", parameters =
       {
          @LegacyParameter(name = "var", type = "CHARACTER", extent = 12, mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void bulkSetMonthLong(final character[] _var)
       {
          ObjectOps.load(TokenResolver.class);
          character[] var = TypeFactory.initInput(_var);

          internalProcedure(TokenResolver.class, "MONTH_LONG", new Block((Body) () ->
          {
             assignMulti(monthLong.get(), var);
          }));
       }

       @LegacySignature(type = Type.SETTER, name = "MONTH_LONG", parameters =
       {
          @LegacyParameter(name = "var", type = "CHARACTER", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void setAllMonthLong(final character _var)
       {
          ObjectOps.load(TokenResolver.class);
          character var = TypeFactory.initInput(_var);

          internalProcedure(TokenResolver.class, "MONTH_LONG", new Block((Body) () ->
          {
             assignMulti(monthLong.get(), var);
          }));
       }

       @LegacySignature(type = Type.LENGTH, name = "MONTH_LONG", returns = "INTEGER")
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static integer lengthOfMonthLong()
       {
          ObjectOps.load(TokenResolver.class);

          return function(TokenResolver.class, "length-of-MONTH_LONG", integer.class, new Block((Body) () ->
          {
             storeReturnValue(monthLong.get().length);
          }));
       }

       @LegacySignature(type = Type.GETTER, name = "MONTH_SHORT", returns = "CHARACTER", parameters =
       {
          @LegacyParameter(name = "idx", type = "INT64", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character getMonthShort(final int64 _idx)
       {
          ObjectOps.load(TokenResolver.class);
          int64 idx = TypeFactory.initInput(_idx);

          return function(TokenResolver.class, "MONTH_SHORT", character.class, new Block((Body) () ->
          {
             storeReturnValue(subscript(monthShort.get(), idx));
          }));
       }

       @LegacySignature(type = Type.SETTER, name = "MONTH_SHORT", parameters =
       {
          @LegacyParameter(name = "var", type = "CHARACTER", mode = "INPUT"),
          @LegacyParameter(name = "idx", type = "INT64", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void setMonthShort(final character _var, final int64 _idx)
       {
          ObjectOps.load(TokenResolver.class);
          character var = TypeFactory.initInput(_var);
          int64 idx = TypeFactory.initInput(_idx);

          internalProcedure(TokenResolver.class, "MONTH_SHORT", new Block((Body) () ->
          {
             assignSingle(monthShort.get(), idx, var);
          }));
       }

       @LegacySignature(type = Type.GETTER, name = "MONTH_SHORT", extent = 12, returns = "CHARACTER")
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character[] bulkGetMonthShort()
       {
          ObjectOps.load(TokenResolver.class);

          return extentFunction(TokenResolver.class, "MONTH_SHORT", character.class, 12, new Block((Body) () ->
          {
             storeExtentReturnValue(monthShort.get());
          }));
       }

       @LegacySignature(type = Type.SETTER, name = "MONTH_SHORT", parameters =
       {
          @LegacyParameter(name = "var", type = "CHARACTER", extent = 12, mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void bulkSetMonthShort(final character[] _var)
       {
          ObjectOps.load(TokenResolver.class);
          character[] var = TypeFactory.initInput(_var);

          internalProcedure(TokenResolver.class, "MONTH_SHORT", new Block((Body) () ->
          {
             assignMulti(monthShort.get(), var);
          }));
       }

       @LegacySignature(type = Type.SETTER, name = "MONTH_SHORT", parameters =
       {
          @LegacyParameter(name = "var", type = "CHARACTER", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void setAllMonthShort(final character _var)
       {
          ObjectOps.load(TokenResolver.class);
          character var = TypeFactory.initInput(_var);

          internalProcedure(TokenResolver.class, "MONTH_SHORT", new Block((Body) () ->
          {
             assignMulti(monthShort.get(), var);
          }));
       }

       @LegacySignature(type = Type.LENGTH, name = "MONTH_SHORT", returns = "INTEGER")
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static integer lengthOfMonthShort()
       {
          ObjectOps.load(TokenResolver.class);

          return function(TokenResolver.class, "length-of-MONTH_SHORT", integer.class, new Block((Body) () ->
          {
             storeReturnValue(monthShort.get().length);
          }));
       }

       @LegacySignature(type = Type.GETTER, name = "WEEKDAY_LONG", returns = "CHARACTER", parameters =
       {
          @LegacyParameter(name = "idx", type = "INT64", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character getWeekdayLong(final int64 _idx)
       {
          ObjectOps.load(TokenResolver.class);
          int64 idx = TypeFactory.initInput(_idx);

          return function(TokenResolver.class, "WEEKDAY_LONG", character.class, new Block((Body) () ->
          {
             storeReturnValue(subscript(weekdayLong.get(), idx));
          }));
       }

       @LegacySignature(type = Type.SETTER, name = "WEEKDAY_LONG", parameters =
       {
          @LegacyParameter(name = "var", type = "CHARACTER", mode = "INPUT"),
          @LegacyParameter(name = "idx", type = "INT64", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void setWeekdayLong(final character _var, final int64 _idx)
       {
          ObjectOps.load(TokenResolver.class);
          character var = TypeFactory.initInput(_var);
          int64 idx = TypeFactory.initInput(_idx);

          internalProcedure(TokenResolver.class, "WEEKDAY_LONG", new Block((Body) () ->
          {
             assignSingle(weekdayLong.get(), idx, var);
          }));
       }

       @LegacySignature(type = Type.GETTER, name = "WEEKDAY_LONG", extent = 7, returns = "CHARACTER")
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character[] bulkGetWeekdayLong()
       {
          ObjectOps.load(TokenResolver.class);

          return extentFunction(TokenResolver.class, "WEEKDAY_LONG", character.class, 7, new Block((Body) () ->
          {
             storeExtentReturnValue(weekdayLong.get());
          }));
       }

       @LegacySignature(type = Type.SETTER, name = "WEEKDAY_LONG", parameters =
       {
          @LegacyParameter(name = "var", type = "CHARACTER", extent = 7, mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void bulkSetWeekdayLong(final character[] _var)
       {
          ObjectOps.load(TokenResolver.class);
          character[] var = TypeFactory.initInput(_var);

          internalProcedure(TokenResolver.class, "WEEKDAY_LONG", new Block((Body) () ->
          {
             assignMulti(weekdayLong.get(), var);
          }));
       }

       @LegacySignature(type = Type.SETTER, name = "WEEKDAY_LONG", parameters =
       {
          @LegacyParameter(name = "var", type = "CHARACTER", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void setAllWeekdayLong(final character _var)
       {
          ObjectOps.load(TokenResolver.class);
          character var = TypeFactory.initInput(_var);

          internalProcedure(TokenResolver.class, "WEEKDAY_LONG", new Block((Body) () ->
          {
             assignMulti(weekdayLong.get(), var);
          }));
       }

       @LegacySignature(type = Type.LENGTH, name = "WEEKDAY_LONG", returns = "INTEGER")
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static integer lengthOfWeekdayLong()
       {
          ObjectOps.load(TokenResolver.class);

          return function(TokenResolver.class, "length-of-WEEKDAY_LONG", integer.class, new Block((Body) () ->
          {
             storeReturnValue(weekdayLong.get().length);
          }));
       }

       @LegacySignature(type = Type.GETTER, name = "WEEKDAY_SHORT", returns = "CHARACTER", parameters =
       {
          @LegacyParameter(name = "idx", type = "INT64", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character getWeekdayShort(final int64 _idx)
       {
          ObjectOps.load(TokenResolver.class);
          int64 idx = TypeFactory.initInput(_idx);

          return function(TokenResolver.class, "WEEKDAY_SHORT", character.class, new Block((Body) () ->
          {
             storeReturnValue(subscript(weekdayShort.get(), idx));
          }));
       }

       @LegacySignature(type = Type.SETTER, name = "WEEKDAY_SHORT", parameters =
       {
          @LegacyParameter(name = "var", type = "CHARACTER", mode = "INPUT"),
          @LegacyParameter(name = "idx", type = "INT64", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void setWeekdayShort(final character _var, final int64 _idx)
       {
          ObjectOps.load(TokenResolver.class);
          character var = TypeFactory.initInput(_var);
          int64 idx = TypeFactory.initInput(_idx);

          internalProcedure(TokenResolver.class, "WEEKDAY_SHORT", new Block((Body) () ->
          {
             assignSingle(weekdayShort.get(), idx, var);
          }));
       }

       @LegacySignature(type = Type.GETTER, name = "WEEKDAY_SHORT", extent = 7, returns = "CHARACTER")
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character[] bulkGetWeekdayShort()
       {
          ObjectOps.load(TokenResolver.class);

          return extentFunction(TokenResolver.class, "WEEKDAY_SHORT", character.class, 7, new Block((Body) () ->
          {
             storeExtentReturnValue(weekdayShort.get());
          }));
       }

       @LegacySignature(type = Type.SETTER, name = "WEEKDAY_SHORT", parameters =
       {
          @LegacyParameter(name = "var", type = "CHARACTER", extent = 7, mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void bulkSetWeekdayShort(final character[] _var)
       {
          ObjectOps.load(TokenResolver.class);
          character[] var = TypeFactory.initInput(_var);

          internalProcedure(TokenResolver.class, "WEEKDAY_SHORT", new Block((Body) () ->
          {
             assignMulti(weekdayShort.get(), var);
          }));
       }

       @LegacySignature(type = Type.SETTER, name = "WEEKDAY_SHORT", parameters =
       {
          @LegacyParameter(name = "var", type = "CHARACTER", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void setAllWeekdayShort(final character _var)
       {
          ObjectOps.load(TokenResolver.class);
          character var = TypeFactory.initInput(_var);

          internalProcedure(TokenResolver.class, "WEEKDAY_SHORT", new Block((Body) () ->
          {
             assignMulti(weekdayShort.get(), var);
          }));
       }

       @LegacySignature(type = Type.LENGTH, name = "WEEKDAY_SHORT", returns = "INTEGER")
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static integer lengthOfWeekdayShort()
       {
          ObjectOps.load(TokenResolver.class);

          return function(TokenResolver.class, "length-of-WEEKDAY_SHORT", integer.class, new Block((Body) () ->
          {
             storeReturnValue(weekdayShort.get().length);
          }));
       }

       @LegacySignature(type = Type.METHOD, name = "ResolveError", returns = "CHARACTER", parameters =
       {
          @LegacyParameter(name = "pTokenArg", type = "CHARACTER", mode = "INPUT"),
          @LegacyParameter(name = "pError", type = "OBJECT", qualified = "progress.lang.error", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character resolveError(final character _pTokenArg, final object<? extends LegacyError> _pError)
       {
          character pTokenArg = TypeFactory.initInput(_pTokenArg);
          object<? extends LegacyError> pError = TypeFactory.initInput(_pError);

          return function(TokenResolver.class, "ResolveError", character.class, new Block());
       }

       @LegacySignature(type = Type.METHOD, name = "ResolveName", returns = "CHARACTER", parameters =
       {
          @LegacyParameter(name = "pTokenArg", type = "CHARACTER", mode = "INPUT"),
          @LegacyParameter(name = "pName", type = "CHARACTER", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character resolveName(final character _pTokenArg, final character _pName)
       {
          character pTokenArg = TypeFactory.initInput(_pTokenArg);
          character pName = TypeFactory.initInput(_pName);

          return function(TokenResolver.class, "ResolveName", character.class, new Block());
       }

       @LegacySignature(type = Type.METHOD, name = "ResolveTime", returns = "CHARACTER", parameters =
       {
          @LegacyParameter(name = "pTokenArg", type = "CHARACTER", mode = "INPUT"),
          @LegacyParameter(name = "pTimestamp", type = "DATETIMETZ", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character resolveTime(final character _pTokenArg, final datetimetz _pTimestamp)
       {
          character pTokenArg = TypeFactory.initInput(_pTokenArg);
          datetimetz pTimestamp = TypeFactory.initInput(_pTimestamp);

          return function(TokenResolver.class, "ResolveTime", character.class, new Block());
       }

       @LegacySignature(type = Type.METHOD, name = "ResolveTime", returns = "CHARACTER", parameters =
       {
          @LegacyParameter(name = "pTokenArg", type = "CHARACTER", mode = "INPUT"),
          @LegacyParameter(name = "pMonthLong", type = "CHARACTER", extent = 12, mode = "INPUT"),
          @LegacyParameter(name = "pMonthShort", type = "CHARACTER", extent = 12, mode = "INPUT"),
          @LegacyParameter(name = "pWeekdayLong", type = "CHARACTER", extent = 7, mode = "INPUT"),
          @LegacyParameter(name = "pWeekdayShort", type = "CHARACTER", extent = 7, mode = "INPUT"),
          @LegacyParameter(name = "pTimestamp", type = "DATETIMETZ", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character resolveTime(final character _pTokenArg, final character[] _pMonthLong, final character[] _pMonthShort, final character[] _pWeekdayLong, final character[] _pWeekdayShort, final datetimetz _pTimestamp)
       {
          character pTokenArg = TypeFactory.initInput(_pTokenArg);
          character[] pMonthLong = TypeFactory.initInput(_pMonthLong);
          character[] pMonthShort = TypeFactory.initInput(_pMonthShort);
          character[] pWeekdayLong = TypeFactory.initInput(_pWeekdayLong);
          character[] pWeekdayShort = TypeFactory.initInput(_pWeekdayShort);
          datetimetz pTimestamp = TypeFactory.initInput(_pTimestamp);

          return function(TokenResolver.class, "ResolveTime", character.class, new Block());
       }

       @LegacySignature(type = Type.METHOD, name = "ResolveUser", returns = "CHARACTER", parameters =
       {
          @LegacyParameter(name = "pTokenArg", type = "CHARACTER", mode = "INPUT"),
          @LegacyParameter(name = "pUser", type = "HANDLE", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character resolveUser(final character _pTokenArg, final handle _pUser)
       {
          character pTokenArg = TypeFactory.initInput(_pTokenArg);
          handle pUser = TypeFactory.initInput(_pUser);

          return function(TokenResolver.class, "ResolveUser", character.class, new Block());
       }

       @LegacySignature(type = Type.METHOD, name = "ResolveToken", returns = "CHARACTER", parameters =
       {
          @LegacyParameter(name = "pTokenGroup", type = "CHARACTER", mode = "INPUT"),
          @LegacyParameter(name = "pTokenArg", type = "CHARACTER", mode = "INPUT"),
          @LegacyParameter(name = "pContext", type = "OBJECT", qualified = "progress.lang.object", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character resolveToken(final character _pTokenGroup, final character _pTokenArg, final object<? extends _BaseObject_> _pContext)
       {
          character pTokenGroup = TypeFactory.initInput(_pTokenGroup);
          character pTokenArg = TypeFactory.initInput(_pTokenArg);
          object<? extends _BaseObject_> pContext = TypeFactory.initInput(_pContext);

          return function(TokenResolver.class, "ResolveToken", character.class, new Block());
       }

       @LegacySignature(type = Type.METHOD, name = "Parse", extent = -1, returns = "OBJECT", qualified = "openedge.core.util.token", parameters =
       {
          @LegacyParameter(name = "pBaseString", type = "CHARACTER", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static object<? extends Token>[] parse(final character _pBaseString)
       {
          character pBaseString = TypeFactory.initInput(_pBaseString);

          return extentFunction(TokenResolver.class, "Parse", object.class, new Block());
       }

       @LegacySignature(type = Type.METHOD, name = "Resolve", returns = "CHARACTER", parameters =
       {
          @LegacyParameter(name = "pcBaseString", type = "CHARACTER", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static character resolve(final character _pcBaseString)
       {
          character pcBaseString = TypeFactory.initInput(_pcBaseString);

          return function(TokenResolver.class, "Resolve", character.class, new Block());
       }

       @LegacySignature(type = Type.PUBLISH, name = "TokenResolved", parameters =
       {
          @LegacyParameter(name = "pSender", type = "OBJECT", qualified = "progress.lang.object", mode = "INPUT"),
          @LegacyParameter(name = "pArgs", type = "OBJECT", qualified = "openedge.core.util.tokenresolvereventargs", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       private static void publish_tokenResolved(object pSender, object pArgs)
       {
          tokenResolved.get().publish(pSender, pArgs);
       }

       @LegacySignature(type = Type.SUBSCRIBE, name = "TokenResolved", parameters =
       {
          @LegacyParameter(name = "p1", type = "handle", mode = "INPUT"),
          @LegacyParameter(name = "p2", type = "character", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void subscribe_tokenResolved(handle h, character procName)
       {
          ObjectOps.load(TokenResolver.class);
          tokenResolved.get().subscribe(h, procName);
       }

       @LegacySignature(type = Type.SUBSCRIBE, name = "TokenResolved", parameters =
       {
          @LegacyParameter(name = "p1", type = "object", mode = "INPUT", qualified = "progress.lang.object"),
          @LegacyParameter(name = "p2", type = "character", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void subscribe_tokenResolved(object<? extends _BaseObject_> ref, character methName)
       {
          ObjectOps.load(TokenResolver.class);
          tokenResolved.get().subscribe(ref, methName);
       }

       @LegacySignature(type = Type.UNSUBSCRIBE, name = "TokenResolved", parameters =
       {
          @LegacyParameter(name = "p1", type = "handle", mode = "INPUT"),
          @LegacyParameter(name = "p2", type = "character", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void unsubscribe_tokenResolved(handle h, character procName)
       {
          ObjectOps.load(TokenResolver.class);
          tokenResolved.get().unsubscribe(h, procName);
       }

       @LegacySignature(type = Type.UNSUBSCRIBE, name = "TokenResolved", parameters =
       {
          @LegacyParameter(name = "p1", type = "object", mode = "INPUT", qualified = "progress.lang.object"),
          @LegacyParameter(name = "p2", type = "character", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_STUB)
       public static void unsubscribe_tokenResolved(object<? extends _BaseObject_> ref, character methName)
       {
          ObjectOps.load(TokenResolver.class);
          tokenResolved.get().unsubscribe(ref, methName);
       }
    }