Class UniqueName

java.lang.Object
com._1c.g5.v8.dt.md.databinding.validation.UniqueName

public abstract class UniqueName extends Object
Helper class for generation and validation of the unique name.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static UniqueName
    create(org.eclipse.emf.ecore.EObject eObj, org.eclipse.emf.ecore.EStructuralFeature feature, String base)
    The default implementation based on the EObject and features
    org.eclipse.core.databinding.validation.IValidator
    Generates new validator.
    protected abstract Object
    find(String name, Object owner)
    Finds the object (not equal to the specified owner) with the specified name
    Generates new unique name using prefix.
    void
    Sets a prefix

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • base

      protected String base
  • Constructor Details

    • UniqueName

      protected UniqueName(String base)
      Constructor.
      Parameters:
      base - - a prefix
  • Method Details

    • setBase

      public void setBase(String base)
      Sets a prefix
      Parameters:
      base - a prefix
    • generate

      public String generate()
      Generates new unique name using prefix.
      Returns:
      a new unique name
      See Also:
    • createValidator

      public org.eclipse.core.databinding.validation.IValidator createValidator(Object owner)
      Generates new validator.
      Parameters:
      owner - - a owner of the name
      Returns:
      a new validator
    • find

      protected abstract Object find(String name, Object owner)
      Finds the object (not equal to the specified owner) with the specified name
      Parameters:
      name - a unique name
      owner - a owner
      Returns:
      the object (not equal to the specified owner) with the specified name
    • create

      public static UniqueName create(org.eclipse.emf.ecore.EObject eObj, org.eclipse.emf.ecore.EStructuralFeature feature, String base)
      The default implementation based on the EObject and features
      Parameters:
      eObj - a owner of the collection of object with unique name
      feature - a owner of the collection of object with unique name
      base - a prefix
      Returns:
      new instance of this class