public class ElementHandlerImpl extends java.lang.Object implements XMLResource.ElementHandler
XMLResource.OPTION_ELEMENT_HANDLER| Modifier and Type | Field and Description |
|---|---|
protected boolean |
considerSubtypes |
protected java.util.Collection<? extends EPackage> |
ePackages |
| Constructor and Description |
|---|
ElementHandlerImpl(boolean considerSubtypes)
Creates a default instances.
|
ElementHandlerImpl(boolean considerSubtypes,
java.util.Collection<? extends EPackage> ePackages)
Creates an instance that will search the given packages for candidate features.
|
| Modifier and Type | Method and Description |
|---|---|
EStructuralFeature |
getRoot(ExtendedMetaData extendedMetaData,
EClassifier eClassifier)
Returns an appropriate feature for serializing a value of the give type.
|
protected EStructuralFeature |
getSubstitutionGroup(ExtendedMetaData extendedMetaData,
EPackage ePackage,
EClass eContainingClass,
EStructuralFeature eStructuralFeature,
EClassifier eClassifier)
Searches the document root object package for a changeable (non-abstract) element
that is affiliated with the given feature in the given class
and a classifier that exactly matches the given classifier
|
EStructuralFeature |
getSubstitutionGroup(ExtendedMetaData extendedMetaData,
EStructuralFeature eStructuralFeature,
EClassifier eClassifier)
Returns an feature, related by
substitution group affiliation to the given feature,
for serializing a value of the give type. |
protected EClassifier |
getSuperType(ExtendedMetaData extendedMetaData,
EClassifier eClassifier)
Returns the
base type or first super type of the classifier,
depending on there it is a data type or a class. |
protected boolean considerSubtypes
protected java.util.Collection<? extends EPackage> ePackages
public ElementHandlerImpl(boolean considerSubtypes)
considerSubtypes - whether to consider base types or super types
when finding a substitution group.public ElementHandlerImpl(boolean considerSubtypes,
java.util.Collection<? extends EPackage> ePackages)
considerSubtypes - whether to consider base types or super types
when finding a substitution group.ePackages - the packages to search for candidates.public EStructuralFeature getRoot(ExtendedMetaData extendedMetaData,
EClassifier eClassifier)
XMLResource.ElementHandlergetRoot in interface XMLResource.ElementHandlerextendedMetaData - the extended meta data in which to look up type information.eClassifier - the type of value to serialize.null.protected EClassifier getSuperType(ExtendedMetaData extendedMetaData,
EClassifier eClassifier)
base type or first super type of the classifier,
depending on there it is a data type or a class.extendedMetaData - the extended meta data in which to look up type information.eClassifier - the classifier in question.base type, the first super type of the classifier, or null.public EStructuralFeature getSubstitutionGroup(ExtendedMetaData extendedMetaData,
EStructuralFeature eStructuralFeature,
EClassifier eClassifier)
XMLResource.ElementHandlersubstitution group affiliation to the given feature,
for serializing a value of the give type.getSubstitutionGroup in interface XMLResource.ElementHandlerextendedMetaData - the extended meta data in which to look up type information.eStructuralFeature - the feature that will be used if this method returns null.eClassifier - the type of value to serialize.null.protected EStructuralFeature getSubstitutionGroup(ExtendedMetaData extendedMetaData,
EPackage ePackage,
EClass eContainingClass,
EStructuralFeature eStructuralFeature,
EClassifier eClassifier)
extendedMetaData - the extended meta data in which to look up type information.ePackage - the package whose document root to search.eContainingClass - the containing class of the feature.eStructuralFeature - the target feature.eClassifier - the type of object being matched.null.Copyright © 2018. Licensed under the Eclipse Public License v1.0. All rights reserved.
Submit a bug or feature