org.eclipse.internal.xtend.type.baseimpl
Class BuiltinMetaModel

java.lang.Object
  extended by org.eclipse.internal.xtend.type.baseimpl.BuiltinMetaModel
All Implemented Interfaces:
MetaModel

public final class BuiltinMetaModel
extends java.lang.Object
implements MetaModel

Author:
Sven Efftinge (http://www.efftinge.de), Arno Haase

Field Summary
static java.lang.String BOOLEAN
           
static java.lang.String COLLECTION
           
static java.lang.String FEATURE
           
static java.lang.String INTEGER
           
static java.lang.String LIST
           
static java.lang.String OBJECT
           
static java.lang.String OPERATION
           
static java.lang.String PROPERTY
           
static java.lang.String REAL
           
static java.lang.String SET
           
static java.lang.String STRING
           
static java.lang.String TYPE
           
static java.lang.String VOID
           
 
Constructor Summary
BuiltinMetaModel(TypeSystem typeSystem)
           
 
Method Summary
 Type getBooleanType()
          Returns the type for boolean objects.
 ParameterizedType getCollectionType(Type innerType)
          Returns the type for collection objects.
 Type getFeatureType()
          Returns the type for feature objects.
 Type getIntegerType()
          Returns the type for integer objects.
 java.util.Set<Type> getKnownTypes()
          returns all types this metamodel is responsible for
 ParameterizedType getListType(Type innerType)
          Returns the type for list objects.
 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 getObjectType()
          Returns the type for objects.
 Type getOperationType()
          Returns the type for operation objects.
 Type getPropertyType()
          Returns the type for property objects.
 Type getRealType()
          Returns the type for real objects.
 ParameterizedType getSetType(Type innerType)
          Returns the type for set objects.
 Type getStaticPropertyType()
          Returns the type for static property objects.
 Type getStringType()
          Returns the type for string objects.
 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.
 Type getTypeType()
          Returns the type for type objects.
 Type getVoidType()
          Returns the type for void objects.
 void setTypeSystem(TypeSystem typeSystem)
          Sets the underlying typesystem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJECT

public static final java.lang.String OBJECT
See Also:
Constant Field Values

STRING

public static final java.lang.String STRING
See Also:
Constant Field Values

BOOLEAN

public static final java.lang.String BOOLEAN
See Also:
Constant Field Values

INTEGER

public static final java.lang.String INTEGER
See Also:
Constant Field Values

REAL

public static final java.lang.String REAL
See Also:
Constant Field Values

COLLECTION

public static final java.lang.String COLLECTION
See Also:
Constant Field Values

SET

public static final java.lang.String SET
See Also:
Constant Field Values

LIST

public static final java.lang.String LIST
See Also:
Constant Field Values

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

FEATURE

public static final java.lang.String FEATURE
See Also:
Constant Field Values

PROPERTY

public static final java.lang.String PROPERTY
See Also:
Constant Field Values

OPERATION

public static final java.lang.String OPERATION
See Also:
Constant Field Values

VOID

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

BuiltinMetaModel

public BuiltinMetaModel(TypeSystem typeSystem)
Method Detail

getTypeSystem

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

Specified by:
getTypeSystem in interface MetaModel
Returns:
the typesystem

getName

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

Returns:
name of metamodel

getObjectType

public final Type getObjectType()
Returns the type for objects.

Returns:
type for objects

getBooleanType

public final Type getBooleanType()
Returns the type for boolean objects.

Returns:
type for boolean objects

getIntegerType

public final Type getIntegerType()
Returns the type for integer objects.

Returns:
type for integer objects

getRealType

public Type getRealType()
Returns the type for real objects.

Returns:
type for real objects

getStringType

public final Type getStringType()
Returns the type for string objects.

Returns:
type for string objects

getTypeType

public final Type getTypeType()
Returns the type for type objects.

Returns:
type for type objects

getFeatureType

public final Type getFeatureType()
Returns the type for feature objects.

Returns:
type for feature objects

getPropertyType

public final Type getPropertyType()
Returns the type for property objects.

Returns:
type for property objects

getOperationType

public final Type getOperationType()
Returns the type for operation objects.

Returns:
type for operation objects

getStaticPropertyType

public Type getStaticPropertyType()
Returns the type for static property objects.

Returns:
type for static property objects

getCollectionType

public final ParameterizedType getCollectionType(Type innerType)
Returns the type for collection objects.

Returns:
type for collection objects

getListType

public final ParameterizedType getListType(Type innerType)
Returns the type for list objects.

Returns:
type for list objects

getSetType

public final ParameterizedType getSetType(Type innerType)
Returns the type for set objects.

Returns:
type for set objects

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)

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)

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

getVoidType

public Type getVoidType()
Returns the type for void objects.

Returns:
type for void objects

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)

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()