org.eclipse.internal.xpand2.type
Class XpandTypesMetaModel

java.lang.Object
  extended by org.eclipse.internal.xpand2.type.XpandTypesMetaModel
All Implemented Interfaces:
MetaModel

public class XpandTypesMetaModel
extends java.lang.Object
implements MetaModel


Constructor Summary
XpandTypesMetaModel(TypeSystem ts)
           
 
Method Summary
 boolean equals(java.lang.Object arg0)
           
 java.util.Set<? extends Type> getKnownTypes()
          returns all types this metamodel is responsible for
 java.lang.String getName()
          Returns the name of the metamodel.
 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 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.
 int hashCode()
           
 void setTypeSystem(TypeSystem typeSystem)
          Sets the underlying typesystem.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XpandTypesMetaModel

public XpandTypesMetaModel(TypeSystem ts)
Method Detail

getTypeSystem

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

Specified by:
getTypeSystem in interface MetaModel
Returns:
the typesystem
See Also:
MetaModel.getTypeSystem()

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
See Also:
MetaModel.setTypeSystem(org.eclipse.xtend.expression.TypeSystem)

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
See Also:
MetaModel.getTypeForName(java.lang.String)

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
See Also:
MetaModel.getType(java.lang.Object)

getKnownTypes

public java.util.Set<? extends 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
See Also:
MetaModel.getKnownTypes()

getName

public java.lang.String getName()
Returns the name of the metamodel.

Returns:
name of metamodel

equals

public boolean equals(java.lang.Object arg0)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

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.
See Also:
MetaModel.getNamespaces()