|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.ecore.xmi.impl.ElementHandlerImpl
public class ElementHandlerImpl
An implementation of an element handler that includes support for searching for features in a specified collection of packages as well as optional support for searching for substitution group features for super types of the specified type.
XMLResource.OPTION_ELEMENT_HANDLER
Field Summary | |
---|---|
protected boolean |
considerSubtypes
|
protected java.util.Collection<? extends EPackage> |
ePackages
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean considerSubtypes
protected java.util.Collection<? extends EPackage> ePackages
Constructor Detail |
---|
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.Method Detail |
---|
public EStructuralFeature getRoot(ExtendedMetaData extendedMetaData, EClassifier eClassifier)
XMLResource.ElementHandler
getRoot
in interface XMLResource.ElementHandler
extendedMetaData
- 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.ElementHandler
substitution group affiliation
to the given feature,
for serializing a value of the give type.
getSubstitutionGroup
in interface XMLResource.ElementHandler
extendedMetaData
- 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 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |