Interface NamingPolicy<T>

Type Parameters:
T - the type of object stored in the namespace

public interface NamingPolicy<T>
Generates names for namespace entries when none is provided. By specifying a NamingPolicy, a user can control the behavior of the NamespaceBuilder.add(Object) method. This does not necessarily guarantee success of the namespace operation; if the generated name collides with a name already in use, the collision policy is still in effect.

A number of common policies are defined in NamespaceBuilder. Refer to the Javadoc there for details.

  • Method Summary

    Modifier and Type
    Method
    Description
    generateName(T entry)
    Create a name to use for the specified entry.
  • Method Details

    • generateName

      String generateName(T entry)
      Create a name to use for the specified entry.
      Parameters:
      entry - the namespace entry for which to generate a name
      Returns:
      the name to associate with the namespace entry