org.eclipse.xtend.backend.types.emf
Class EmfTypesystem

java.lang.Object
  extended by org.eclipse.xtend.backend.types.emf.EmfTypesystem
All Implemented Interfaces:
BackendTypesystem

public final class EmfTypesystem
extends java.lang.Object
implements BackendTypesystem

Author:
Arno Haase (http://www.haase-consulting.com)

Field Summary
static java.lang.String UNIQUE_REPRESENTATION_PREFIX
           
 
Constructor Summary
EmfTypesystem()
           
 
Method Summary
 BackendType findType(java.lang.Class<?> cls)
          returns the type for instances of a given class or, if this type system does not feel responsible, null.
 BackendType findType(java.lang.Object obj)
          returns the type for a given object or, if this type system does not feel responsible, null.
 BackendType findType(java.lang.String uniqueRepresentation)
          returns the type corresponding with the unique representation.
static java.lang.String getFullyQualifiedName(org.eclipse.emf.ecore.ENamedElement ele)
           
 BackendTypesystem getRootTypesystem()
           
 BackendType getTypeForEClassifier(org.eclipse.emf.ecore.EClassifier cls)
          This method serves as the single point of access to the internal cache of types; all other methods that look up a type should go through this method.
 BackendType getTypeForETypedElement(org.eclipse.emf.ecore.ETypedElement typedElement)
           
static java.lang.String getUniqueIdentifier(org.eclipse.emf.ecore.EClassifier cls)
           
 void setRootTypesystem(BackendTypesystem ts)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIQUE_REPRESENTATION_PREFIX

public static final java.lang.String UNIQUE_REPRESENTATION_PREFIX
See Also:
Constant Field Values
Constructor Detail

EmfTypesystem

public EmfTypesystem()
Method Detail

getUniqueIdentifier

public static java.lang.String getUniqueIdentifier(org.eclipse.emf.ecore.EClassifier cls)

findType

public BackendType findType(java.lang.String uniqueRepresentation)
Description copied from interface: BackendTypesystem
returns the type corresponding with the unique representation. It is up to typesystem implementations to provide - and document - their respective naming schemes

Specified by:
findType in interface BackendTypesystem

getTypeForEClassifier

public BackendType getTypeForEClassifier(org.eclipse.emf.ecore.EClassifier cls)
This method serves as the single point of access to the internal cache of types; all other methods that look up a type should go through this method.


findType

public BackendType findType(java.lang.Object obj)
Description copied from interface: BackendTypesystem
returns the type for a given object or, if this type system does not feel responsible, null.

Specified by:
findType in interface BackendTypesystem

getTypeForETypedElement

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

getFullyQualifiedName

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

findType

public BackendType findType(java.lang.Class<?> cls)
Description copied from interface: BackendTypesystem
returns the type for instances of a given class or, if this type system does not feel responsible, null.

Specified by:
findType in interface BackendTypesystem

getRootTypesystem

public BackendTypesystem getRootTypesystem()
Specified by:
getRootTypesystem in interface BackendTypesystem

setRootTypesystem

public void setRootTypesystem(BackendTypesystem ts)
Specified by:
setRootTypesystem in interface BackendTypesystem