Class AbstractUObjectConverter
- java.lang.Object
-
- com._1c.g5.v8.dt.platform.core.uconverter.AbstractUObjectConverter
-
- All Implemented Interfaces:
IUObjectConverter
- Direct Known Subclasses:
AbstractUObjectConverterForDynamicTypes
,ConstantsObjectConverter
,StdChildStructureConverter
,ValueTreeConverter
,ValueTreeRowCollectionConverter
public abstract class AbstractUObjectConverter extends Object implements IUObjectConverter
Default abstract implementation ofIUObjectConverter
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<Version>
allowedRuntimeVersion
protected Set<String>
allowedTypeNames
protected IUObjectConverterServiceProvider
converterServiceProvider
-
Constructor Summary
Constructors Constructor Description AbstractUObjectConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAllowedruntimeVersion(Version version)
Add allowed runtime version for this convertervoid
addAllowedTypeName(String typeName)
Add allowed type name for this converterList<String>
getAllAllowedTypeNames()
Gets type name of allTypeItem
which can be converted to universal type by this converterboolean
isAppropriate(String typeName, Version version)
Checks that this converter can convertTypeItem
with nametypeName
protected void
recomputePropertyTypes(String typeName, Version version, Map<String,TypeItem> earlierComputedUTypes, Type uType, org.eclipse.emf.ecore.resource.Resource resource)
Converts all types for properties-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.platform.core.uconverter.IUObjectConverter
convert
-
-
-
-
Field Detail
-
converterServiceProvider
@Inject protected IUObjectConverterServiceProvider converterServiceProvider
-
-
Method Detail
-
isAppropriate
public boolean isAppropriate(String typeName, Version version)
Description copied from interface:IUObjectConverter
Checks that this converter can convertTypeItem
with nametypeName
- Specified by:
isAppropriate
in interfaceIUObjectConverter
- Parameters:
typeName
- name of candidateTypeItem
for converting to universal type, can't benull
version
- actual runtime version, can't benull
- Returns:
true
if type corresponding totypeName
can be converted to universal type by this converter,false
otherwise
-
addAllowedTypeName
public void addAllowedTypeName(String typeName)
Add allowed type name for this converter- Parameters:
typeName
- new type name, can't benull
or empty
-
addAllowedruntimeVersion
public void addAllowedruntimeVersion(Version version)
Add allowed runtime version for this converter- Parameters:
version
- new version, can't benull
-
getAllAllowedTypeNames
public List<String> getAllAllowedTypeNames()
Description copied from interface:IUObjectConverter
Gets type name of allTypeItem
which can be converted to universal type by this converter- Specified by:
getAllAllowedTypeNames
in interfaceIUObjectConverter
- Returns:
- list of type name or empty list, if this converter can't convert nothing
-
recomputePropertyTypes
protected void recomputePropertyTypes(String typeName, Version version, Map<String,TypeItem> earlierComputedUTypes, Type uType, org.eclipse.emf.ecore.resource.Resource resource)
Converts all types for properties- Parameters:
typeName
- name of initial type, can't benull
version
- actualVersion
of configuration, can't benull
earlierComputedUTypes
- map - (type name; its universal type), can benull
if universal types weren't computed earlieruType
- created converting type, can't benull
resource
- actualResource
for resolving, can't benull
-
-