private String registerTypesPackageName(final Token token, final Ir ir)
    {
        if (!shouldSupportTypesPackageNames)
        {
            return ir.applicableNamespace();
        }

        if (token.packageName() != null)
        {
            packageNameByTypes.add(token.packageName());
            outputManager.setPackageName(token.packageName());
            return token.packageName();
        }

        return ir.applicableNamespace();
    }
Register the types explicit package - if set and should be supported.

@param token the 0-th token of the type.
@param ir    the intermediate representation.
@return the overridden package name of the type if set and supported, or {@link Ir#applicableNamespace()}.
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/java/JavaGenerator.java