org.eclipse.xtend.backend.types
Class CompositeTypesystem

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

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

This is the "normal" implementation of a backend type system - it can recursively contain other type system implementations, and it contributes the built-in types.

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

Constructor Summary
CompositeTypesystem()
           
 
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 o)
          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.
 java.util.Collection<BackendTypesystem> getInner()
           
 BackendTypesystem getRootTypesystem()
           
 void register(BackendTypesystem ts)
           
 void setRootTypesystem(BackendTypesystem ts)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeTypesystem

public CompositeTypesystem()
Method Detail

getInner

public java.util.Collection<BackendTypesystem> getInner()

register

public void register(BackendTypesystem ts)

findType

public BackendType findType(java.lang.Object o)
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

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

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

getRootTypesystem

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

setRootTypesystem

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