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.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedUniqueName(String base)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static UniqueNamecreate(org.eclipse.emf.ecore.EObject eObj, org.eclipse.emf.ecore.EStructuralFeature feature, String base)The default implementation based on the EObject and featuresorg.eclipse.core.databinding.validation.IValidatorcreateValidator(Object owner)Generates new validator.protected abstract Objectfind(String name, Object owner)Finds the object (not equal to the specifiedowner) with the specifiednameStringgenerate()Generates new unique name using prefix.voidsetBase(String base)Sets a prefix
-
-
-
Field Detail
-
base
protected String base
-
-
Constructor Detail
-
UniqueName
protected UniqueName(String base)
Constructor.- Parameters:
base- - a prefix
-
-
Method Detail
-
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:
setBase(String)
-
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 specifiedowner) with the specifiedname- Parameters:
name- a unique nameowner- a owner- Returns:
- the object (not equal to the specified
owner) with the specifiedname
-
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 namefeature- a owner of the collection of object with unique namebase- a prefix- Returns:
- new instance of this class
-
-