public final class FacetUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static EClass |
findExtendedEClass(Facet facet) |
static java.util.Set<EPackage> |
getAllExtendedEPackage(FacetSet facetSet) |
static java.util.List<Facet> |
getAllFacet(FacetSet facetSet) |
static java.util.Map<java.lang.String,Facet> |
getAllFacetsByName(FacetSet parent)
Return all the facets of the model.
|
static java.util.Map<java.lang.String,FacetSet> |
getAllFacetSetsByName(EPackage parent)
Return all the facets of the model.
|
static java.util.Map<java.lang.String,FacetOperation> |
getAllOperationsByName(FacetSet parent)
Return all the operations of the model.
|
static DerivedTypedElement |
getContainingDerivedTypedElement(EObject eObject) |
static FacetSet |
getContainingFacetSet(EObject eObject)
Return the main facetSet.
|
static <T extends ETypedElement> |
getETypedElement(Facet facet,
java.lang.String name,
java.lang.Class<T> classs) |
static java.util.List<ETypedElement> |
getETypedElements(EClassifier eClassifier) |
static <T extends ETypedElement> |
getETypedElements(EObject eObject,
java.lang.Class<T> classs,
IFacetManager facetManager) |
static java.util.List<ETypedElement> |
getETypedElements(EPackage ePackage) |
static java.util.Set<? extends ETypedElement> |
getETypedElements(ResourceSet resourceSet)
This methods returns all the known (registered) eTypedElements.
|
static EPackage |
getExtendedEPackage(FacetSet facetSet) |
static EClass |
getExtendedMetaclass(Facet facet) |
static Facet |
getFacet(java.util.Collection<Facet> facets,
java.lang.String name)
Find a Facet with the given name among the given list of Facets.
|
static Facet |
getFacet(FacetSet facetSet,
java.lang.String facetName)
Find a Facet in a FacetSet
|
static java.util.Set<? extends ETypedElement> |
getFacetETypedElements(ResourceSet resourceSet) |
static java.util.List<Facet> |
getFacets(FacetSet facetSet) |
static FacetSet |
getFacetSet(java.util.Collection<FacetSet> facetSets,
java.lang.String name)
Find a FacetSet with the given name among the given list of FacetSets.
|
static FacetSet |
getFacetSet(ETypedElement eTypedElement) |
static FacetSet |
getFacetSet(Facet facet) |
static java.util.List<FacetSet> |
getFacetSets(java.util.Collection<FacetSet> facetSets,
java.lang.String name)
Find all FacetSets with the given name among the given list of FacetSets.
|
static java.util.List<FacetSet> |
getFacetSetsByPath(java.util.Collection<FacetSet> rootFacetSets,
java.lang.String... path)
Find all the FacetSets with the given path among the given list of root
FacetSets.
|
static java.lang.Object |
getResultValue(ETypedElementResult eTEresult) |
static FacetSet |
getRootFacetSet(Facet facet) |
static FacetSet |
getRootFacetSet(FacetSet facetSet) |
static DerivedTypedElement |
getSignature(FacetOperation facetOperation) |
static <T extends DerivedTypedElement> |
getTopOverrideFeature(T feature)
Find the top level feature in the override chain
|
static java.lang.String |
toString(DerivedTypedElement feature) |
public static Facet getFacet(FacetSet facetSet, java.lang.String facetName)
facetSet
- the FacetSetfacetName
- the name of the Facet to look forpublic static <T extends ETypedElement> T getETypedElement(Facet facet, java.lang.String name, java.lang.Class<T> classs)
public static java.lang.Object getResultValue(ETypedElementResult eTEresult)
public static FacetSet getFacetSet(java.util.Collection<FacetSet> facetSets, java.lang.String name)
facetSets
- where to look forname
- the name of the FacetSet to findnull
if not found in the given listpublic static java.util.List<FacetSet> getFacetSets(java.util.Collection<FacetSet> facetSets, java.lang.String name)
facetSets
- where to look forname
- the name of the FacetSets to findpublic static java.util.Set<EPackage> getAllExtendedEPackage(FacetSet facetSet)
facetSet
- a facetSetpublic static java.util.List<FacetSet> getFacetSetsByPath(java.util.Collection<FacetSet> rootFacetSets, java.lang.String... path)
getFacetSetsByPath("a", "b", "c")
returns a FacetSet named "c", contained in a FacetSet named "b",
contained in a registered FacetSet named "a".path
- a list of FacetSet names, starting from the root registered
FacetSets, and leading to the wanted FacetSet(s)public static Facet getFacet(java.util.Collection<Facet> facets, java.lang.String name)
facets
- where to lookname
- the name of the Facet that is being looked forFacet
with this name, or null
if
nonepublic static java.util.Set<? extends ETypedElement> getETypedElements(ResourceSet resourceSet)
resourceSet
- the eTypedElement search will be done in/using this resourceSetpublic static java.util.Set<? extends ETypedElement> getFacetETypedElements(ResourceSet resourceSet)
public static java.util.List<ETypedElement> getETypedElements(EPackage ePackage)
public static java.util.List<ETypedElement> getETypedElements(EClassifier eClassifier)
public static EPackage getExtendedEPackage(FacetSet facetSet)
public static <T extends ETypedElement> java.util.Set<T> getETypedElements(EObject eObject, java.lang.Class<T> classs, IFacetManager facetManager) throws FacetManagerException
FacetManagerException
public static FacetSet getFacetSet(ETypedElement eTypedElement)
eTypedElement
- public static DerivedTypedElement getSignature(FacetOperation facetOperation)
facetOperation
- public static EClass getExtendedMetaclass(Facet facet)
facet
- public static <T extends DerivedTypedElement> T getTopOverrideFeature(T feature) throws FacetManagerException
feature
- FacetManagerException
public static EClass findExtendedEClass(Facet facet)
public static DerivedTypedElement getContainingDerivedTypedElement(EObject eObject)
public static FacetSet getContainingFacetSet(EObject eObject)
eObject
- the element in the model selected.public static java.util.Map<java.lang.String,FacetOperation> getAllOperationsByName(FacetSet parent)
parent
- the first FacetSet of the model.public static java.util.Map<java.lang.String,Facet> getAllFacetsByName(FacetSet parent)
parent
- the first FacetSet of the model.public static java.util.Map<java.lang.String,FacetSet> getAllFacetSetsByName(EPackage parent)
parent
- the first FacetSet of the model.public static java.lang.String toString(DerivedTypedElement feature)