Package com._1c.g5.v8.dt.xdto.validation
Class ValueTypeValidatorUnion
- java.lang.Object
-
- com._1c.g5.v8.dt.xdto.validation.ValueTypeValidatorUnion
-
- All Implemented Interfaces:
IValueTypeValidator
public class ValueTypeValidatorUnion extends Object implements IValueTypeValidator
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.xtext.naming.IQualifiedNameProvider
qualifiedNameProvider
protected org.eclipse.xtext.scoping.IScopeProvider
scopeProvider
protected ValueTypeValidatorProvider
valiatorProvider
protected com.google.inject.Provider<ValueTypeValidatorAtomic>
validatorForAtomicVariety
-
Constructor Summary
Constructors Constructor Description ValueTypeValidatorUnion()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkDefaultValue(String value, ValueType type, org.eclipse.xtext.scoping.IScope scope)
CheckingProperty.getDefault()
valueboolean
checkEnumerations(String value, ValueType type)
Checks value ofXdtoUtil.FacetKind.ENUMERATION
boolean
checkPatterns(String value, ValueType type)
Checks value ofXdtoUtil.FacetKind.ENUMERATION
boolean
checkValueSpace(String value)
Checks string representation of facet value forValueType
int
compare(String value, String otherValue)
Comparing facet values
-
-
-
Field Detail
-
valiatorProvider
@Inject protected ValueTypeValidatorProvider valiatorProvider
-
scopeProvider
@Inject protected org.eclipse.xtext.scoping.IScopeProvider scopeProvider
-
qualifiedNameProvider
@Inject protected org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider
-
validatorForAtomicVariety
@Inject protected com.google.inject.Provider<ValueTypeValidatorAtomic> validatorForAtomicVariety
-
-
Method Detail
-
checkDefaultValue
public boolean checkDefaultValue(String value, ValueType type, org.eclipse.xtext.scoping.IScope scope)
Description copied from interface:IValueTypeValidator
CheckingProperty.getDefault()
value- Specified by:
checkDefaultValue
in interfaceIValueTypeValidator
- Parameters:
value
- actual default value, can't benull
type
-ValueType
ofProperty
, can't benull
scope
-IScope
ofType
, can't benull
- Returns:
true
if default value is valid fortype
,false
otherwise
-
checkPatterns
public boolean checkPatterns(String value, ValueType type)
Description copied from interface:IValueTypeValidator
Checks value ofXdtoUtil.FacetKind.ENUMERATION
- Specified by:
checkPatterns
in interfaceIValueTypeValidator
- Parameters:
value
- checking value, can't benull
type
-ValueType
which value is checked, can't benull
- Returns:
true
if value is valid,false
otherwise
-
checkEnumerations
public boolean checkEnumerations(String value, ValueType type)
Description copied from interface:IValueTypeValidator
Checks value ofXdtoUtil.FacetKind.ENUMERATION
- Specified by:
checkEnumerations
in interfaceIValueTypeValidator
- Parameters:
value
- checking value, can't benull
type
-ValueType
which value is checked, can't benull
- Returns:
true
if value is valid,false
otherwise
-
checkValueSpace
public boolean checkValueSpace(String value)
Description copied from interface:IValueTypeValidator
Checks string representation of facet value forValueType
- Specified by:
checkValueSpace
in interfaceIValueTypeValidator
- Parameters:
value
- checking value, can't benull
- Returns:
true
ifvalue
is valid,false
otherwise
-
compare
public int compare(String value, String otherValue)
Description copied from interface:IValueTypeValidator
Comparing facet values- Specified by:
compare
in interfaceIValueTypeValidator
- Parameters:
value
- the first value for comparing, can't benull
otherValue
- the second value for comparing, can't benull
- Returns:
- the value 0 if arguments are equal ; a value less than 0 if the first value less that the second; and a value greater than 0 if the first value greater that the second.
-
-