org.eclipse.xtend.backend.types
Class AbstractType

java.lang.Object
  extended by org.eclipse.xtend.backend.types.AbstractType
All Implemented Interfaces:
BackendType
Direct Known Subclasses:
BooleanType, CollectionType, DoubleType, EClassType, EDataTypeType, EEnumType, EFeatureMapEntryType, EFeatureMapType, EFeatureType, EMapEntryType, EMapType, EnumType, EObjectType, FunctionType, JavaBeansType, ListType, LongType, MapType, MultipleStereotypeType, PropertyType, QNameType, SetType, StaticPropertyType, StereotypeType, StringType, TypeType, VoidType, XMLEClassType

public abstract class AbstractType
extends java.lang.Object
implements BackendType

Author:
Arno Haase (http://www.haase-consulting.com), André Arnold

Constructor Summary
AbstractType(java.lang.String name, java.lang.String uniqueRepresentation, BackendType... superTypes)
           
AbstractType(java.lang.String name, java.lang.String uniqueRepresentation, java.util.Collection<? extends BackendType> superTypes)
           
 
Method Summary
 java.lang.Object create()
           
abstract  boolean equals(java.lang.Object other)
          every type *must* implement a valid equals method, otherwise the backend will break!
 java.util.Collection<? extends NamedFunction> getBuiltinOperations()
           
 java.lang.String getName()
           
 java.util.Map<java.lang.String,? extends Property> getProperties(ExecutionContext ctx)
           
 java.lang.Object getProperty(ExecutionContext ctx, java.lang.Object o, java.lang.String name)
           
 java.util.Map<java.lang.String,? extends StaticProperty> getStaticProperties()
           
 java.util.Collection<? extends BackendType> getSuperTypes()
           
 java.lang.String getUniqueRepresentation()
           
 boolean isAssignableFrom(BackendType other)
           
protected  void register(Property p, BackendType type)
           
protected  void register(QualifiedName name, Function f)
           
protected  void register(StaticProperty p)
           
 void setProperty(ExecutionContext ctx, java.lang.Object o, java.lang.String name, java.lang.Object value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractType

public AbstractType(java.lang.String name,
                    java.lang.String uniqueRepresentation,
                    BackendType... superTypes)

AbstractType

public AbstractType(java.lang.String name,
                    java.lang.String uniqueRepresentation,
                    java.util.Collection<? extends BackendType> superTypes)
Method Detail

register

protected void register(Property p,
                        BackendType type)

register

protected void register(StaticProperty p)

register

protected void register(QualifiedName name,
                        Function f)

getBuiltinOperations

public final java.util.Collection<? extends NamedFunction> getBuiltinOperations()
Specified by:
getBuiltinOperations in interface BackendType

getName

public java.lang.String getName()
Specified by:
getName in interface BackendType

getProperty

public final java.lang.Object getProperty(ExecutionContext ctx,
                                          java.lang.Object o,
                                          java.lang.String name)
Specified by:
getProperty in interface BackendType

setProperty

public final void setProperty(ExecutionContext ctx,
                              java.lang.Object o,
                              java.lang.String name,
                              java.lang.Object value)
Specified by:
setProperty in interface BackendType

getSuperTypes

public final java.util.Collection<? extends BackendType> getSuperTypes()
Specified by:
getSuperTypes in interface BackendType

create

public java.lang.Object create()
Specified by:
create in interface BackendType

getProperties

public final java.util.Map<java.lang.String,? extends Property> getProperties(ExecutionContext ctx)
Specified by:
getProperties in interface BackendType

getStaticProperties

public final java.util.Map<java.lang.String,? extends StaticProperty> getStaticProperties()
Specified by:
getStaticProperties in interface BackendType

getUniqueRepresentation

public java.lang.String getUniqueRepresentation()
Specified by:
getUniqueRepresentation in interface BackendType

isAssignableFrom

public boolean isAssignableFrom(BackendType other)
Specified by:
isAssignableFrom in interface BackendType

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public abstract boolean equals(java.lang.Object other)
every type *must* implement a valid equals method, otherwise the backend will break!

Overrides:
equals in class java.lang.Object