org.eclipse.xtend.typesystem.emf
Class EmfRegistryMetaModel

java.lang.Object
  extended by org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel
All Implemented Interfaces:
MetaModel
Direct Known Subclasses:
EmfMetaModel, UML2MetaModelBase, XSDMetaModel

public class EmfRegistryMetaModel
extends java.lang.Object
implements MetaModel


Constructor Summary
EmfRegistryMetaModel()
           
 
Method Summary
 void addResourceSet(org.eclipse.emf.ecore.resource.ResourceSet rs)
           
protected  org.eclipse.emf.ecore.EPackage[] allPackages()
          returns the managed packages.
protected  java.lang.String getElementName(org.eclipse.emf.ecore.ENamedElement ele)
           
 EObjectType getEobjectType()
           
protected  java.lang.String getFqnRec(org.eclipse.emf.ecore.EObject ele, java.lang.String suffix)
           
 java.lang.String getFullyQualifiedName(org.eclipse.emf.ecore.ENamedElement ele)
           
 java.util.Set<Type> getKnownTypes()
          returns all types this metamodel is responsible for
 java.util.Set<java.lang.String> getNamespaces()
          Returns all namespaces provided by this metamodel.
 Type getType(java.lang.Object obj)
          if this metamodel is responsible for a types which are responsible for the given object, it returns the corresponding type.
 Type getTypeForEClassifier(org.eclipse.emf.ecore.EClassifier element)
           
 Type getTypeForEClassifier(org.eclipse.emf.ecore.EGenericType element)
           
 Type getTypeForETypedElement(org.eclipse.emf.ecore.ETypedElement typedElement)
           
 Type getTypeForName(java.lang.String typeName)
          if this metamodel is responsible for a type with the given name, it returns the corresponding type.
 TypeSystem getTypeSystem()
          Returns the underlying typesystem.
 void setTypeSystem(TypeSystem typeSystem)
          Sets the underlying typesystem.
 void setUseSingleGlobalResourceSet(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmfRegistryMetaModel

public EmfRegistryMetaModel()
Method Detail

getEobjectType

public EObjectType getEobjectType()

setUseSingleGlobalResourceSet

public void setUseSingleGlobalResourceSet(boolean b)

setTypeSystem

public void setTypeSystem(TypeSystem typeSystem)
Description copied from interface: MetaModel
Sets the underlying typesystem.

Specified by:
setTypeSystem in interface MetaModel
Parameters:
typeSystem - the typesystem

allPackages

protected org.eclipse.emf.ecore.EPackage[] allPackages()
returns the managed packages. Uses the global EPackage Registry.

Returns:

addResourceSet

public void addResourceSet(org.eclipse.emf.ecore.resource.ResourceSet rs)

getTypeForName

public Type getTypeForName(java.lang.String typeName)
Description copied from interface: MetaModel
if this metamodel is responsible for a type with the given name, it returns the corresponding type. Otherwise returns null

Specified by:
getTypeForName in interface MetaModel
Parameters:
typeName - name of type
Returns:
the corresponding type

getType

public Type getType(java.lang.Object obj)
Description copied from interface: MetaModel
if this metamodel is responsible for a types which are responsible for the given object, it returns the corresponding type. Otherwise returns null

Specified by:
getType in interface MetaModel
Parameters:
obj - object for which a corresponding object is requested
Returns:
the corresponding type

getKnownTypes

public java.util.Set<Type> getKnownTypes()
Description copied from interface: MetaModel
returns all types this metamodel is responsible for

Specified by:
getKnownTypes in interface MetaModel
Returns:
set of known types

getTypeForEClassifier

public Type getTypeForEClassifier(org.eclipse.emf.ecore.EClassifier element)

getTypeForEClassifier

public Type getTypeForEClassifier(org.eclipse.emf.ecore.EGenericType element)

getTypeForETypedElement

public Type getTypeForETypedElement(org.eclipse.emf.ecore.ETypedElement typedElement)

getTypeSystem

public TypeSystem getTypeSystem()
Description copied from interface: MetaModel
Returns the underlying typesystem.

Specified by:
getTypeSystem in interface MetaModel
Returns:
the typesystem

getFullyQualifiedName

public java.lang.String getFullyQualifiedName(org.eclipse.emf.ecore.ENamedElement ele)

getFqnRec

protected java.lang.String getFqnRec(org.eclipse.emf.ecore.EObject ele,
                                     java.lang.String suffix)

getNamespaces

public java.util.Set<java.lang.String> getNamespaces()
Description copied from interface: MetaModel
Returns all namespaces provided by this metamodel.

Specified by:
getNamespaces in interface MetaModel
Returns:
A Set containing the names of all namespaces provided by this metamodel.

getElementName

protected java.lang.String getElementName(org.eclipse.emf.ecore.ENamedElement ele)