Builds a {@code com.google.inject.Key} over a String type annotated
with {@code @}{@link Flag}(named)

@see <a href="https://github.com/google/guice/blob/master/core/src/com/google/inject/Key.java"></a>
425557
public static Key<String> key(String name) {
    return Key.get(String.class, Flags.named(name));
  }
459514
@Override
	protected Object customKey(Object key) {
		if (null != key && key instanceof CharSequence) {
			key = key.toString().toLowerCase();
		}
		return key;
	}
20822
@SuppressWarnings("unchecked")
    protected K createKey(QueryParameters params) throws MjdbcException {
        K result = null;

        if (columnName == null) {
            result = (K) params.getValue(params.getNameByPosition(columnIndex));
        } else {
            result = (K) params.getValue(columnName);
        }

        return result;
    }
1037229
@Override
  public String key() {
    return new StringBuilder().append(projectKey).append(":").append(projectRelativePath).toString();
  }
416291
public static String createKey(final String namespace, final Iterable<String> parts) {
        final List<String> list = new LinkedList<String>();
        if (!"".equals(namespace)) {
            list.add(namespace);
        }
        for (final String part : parts) {
            list.add(part);
        }
        return join(COLON, list);
    }
231549
public final NFastStringMap<V> put(final String key, final V value)
    {
        m_jso.put(NUtils.doKeyRepair(key), value);

        return this;
    }
882260
@Override
    public InjectionBinding<WebServiceRef> createOverrideInjectionBinding(Class<?> instanceClass, Member member,
                                                                          Resource resource, String jndiName) throws InjectionException {

        Class<?> typeClass = resource.type();

        if (member != null) {
            Class<?> inferredType = InjectionHelper.getTypeFromMember(member);
            if (typeClass.getName().equals(Object.class.getName())) { //default
                typeClass = inferredType;
//            } else {
//                if (!inferredType.isAssignableFrom(typeClass)) {
//                    Tr.error(tc, "error.service.ref.member.level.annotation.type.not.compatible",
//                             member.getName(), member.getDeclaringClass().getName(), typeClass.getName(), inferredType.getName());
//                    throw new InjectionException(Tr.formatMessage(tc, "error.service.ref.member.level.annotation.type.not.compatible",
//                                                                  member.getName(), member.getDeclaringClass().getName(), typeClass.getName(), inferredType.getName()));
//                }
            }
        }

        InjectionBinding<WebServiceRef> binding;

        //only service type injections are possible with the @Resource annotation
        if (Service.class.isAssignableFrom(typeClass)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "The @Resource annotation found has type=" + typeClass.getName() + " and is refers to a JAX-WS service reference");
            }
            binding = WebServiceRefBindingBuilder.createWebServiceRefBindingFromResource(resource, ivNameSpaceConfig, typeClass, jndiName);
        } else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "The @Resource annotation found did not refer to a web service reference type.");
            }
            binding = null;
        }

        return binding;
    }
1087195
@Override public Object invokeMethod(final String name, final Object arguments) {
    if (GantState.dryRun) {
      if (GantState.verbosity > GantState.SILENT) {
        final StringBuilder sb = new StringBuilder();
        int padding = 9 - name.length();
        if (padding < 0) { padding = 0; }
        sb.append("         ".substring(0, padding) + '[' + name + "] ");
        final Object[] args = (Object[]) arguments;
        if (args[0] instanceof Map<?,?>) {
          //////////////////////////////////////////////////////////////////////////////////////////////////////////
          // Eclipse and IntelliJ IDEA warn that (Map) is not a proper cast but using the
          // cast (Map<?,?>) causes a type check error due to the capture algorithm.
          //
          //  TODO : Fix this rather than use a SuppressWarnings.
          //////////////////////////////////////////////////////////////////////////////////////////////////////////
          @SuppressWarnings({ "unchecked", "rawtypes" } ) final Iterator<Map.Entry<?,?>> i =((Map) args[0]).entrySet().iterator();
          while (i.hasNext()) {
            final Map.Entry<?,?> e = i.next();
            sb.append(e.getKey() + " : '" + e.getValue() + '\'');
            if (i.hasNext()) { sb.append(", "); }
          }
          sb.append('\n');
          getProject().log(sb.toString());
          if (args.length == 2) {((Closure<?>) args[1]).call(); }
        }
        else if (args[0] instanceof Closure) { ((Closure<?>) args[0]).call(); }
        else { throw new RuntimeException("Unexpected type of parameter to method " + name); }
      }
      return null;
    }
    return super.invokeMethod(name, arguments);
  }
1164018
@Override
    public AliasType get(String key) {
        key = key.toUpperCase();
        AliasType type = super.get(key);

        if (type == null) {
            register(type = new AliasType(key));
        }

        return type;
    }
1297438
public Map<String, Object> build() {
        final ImmutableMap.Builder<String, Object> builder = ImmutableMap.builder();
        final int keyCode = ofNullable(this.keyCode)
                .orElseThrow(() -> new IllegalStateException("The key code must be set"));
        builder.put("keycode", keyCode);
        ofNullable(this.metaState).ifPresent(x -> builder.put("metastate", x));
        ofNullable(this.flags).ifPresent(x -> builder.put("flags", x));
        return builder.build();
    }
261865
public static Key create(String kind, Object key) {
		return create(null, kind, key);
	}
270952
public MessageBuilder varWithAnno(final String key, final Class<? extends Annotation> annoClass) {
        return var(key, "@" + annoClass.getSimpleName());
    }
38106
@Override
    public String get(String key) {
        Map<String, String> map = inheritableThreadLocal.get();
        if ((map != null) && (key != null)) {
            return map.get(key);
        } else {
            return null;
        }
    }
304356
private static final TagKey createTagKey(String name) throws TagContextDeserializationException {
    try {
      return TagKey.create(name);
    } catch (IllegalArgumentException e) {
      throw new TagContextDeserializationException("Invalid tag key: " + name, e);
    }
  }
257236
@Override
  public String getOrCreateForKey(String key) {
    return uuidsByKey.computeIfAbsent(key, k -> Uuids.create());
  }
331334
public MapUpdate removeFlag(String key)
    {
        BinaryValue k = BinaryValue.create(key);
        removes.add(new MapOp.MapField(MapOp.FieldType.FLAG, k));
        return this;
    }
741846
@NotNull
    public static Key<String> stringKey(@NotNull String name) {
        return create(name, String.class);
    }