org.eclipse.xtend.typesystem
Class AbstractTypeImpl

java.lang.Object
  extended by org.eclipse.xtend.typesystem.AbstractTypeImpl
All Implemented Interfaces:
Type
Direct Known Subclasses:
AdviceContextType, BuiltinBaseType, DefinitionType, EClassType, EDataTypeType, EEnumType, EFeatureMapEntryTypeImpl, EFeatureMapTypeImpl, EFeatureType, EMapEntryType, EMapType, EnumType, EObjectType, IteratorType, JavaTypeImpl, JdtTypeImpl, QNameType, StereotypeType, VoidType

public abstract class AbstractTypeImpl
extends java.lang.Object
implements Type


Constructor Summary
AbstractTypeImpl(TypeSystem typeSystem, java.lang.String name)
           
 
Method Summary
 java.lang.Object convert(java.lang.Object src, java.lang.Class<?> targetType)
          converts the given Object to an instance of the given Class, if this type is responsible for java objects of the given Class and the given Object
 boolean equals(java.lang.Object obj)
           
 java.util.Set<Callable> getAllFeatures()
          Return all features defined by the type
 java.util.Set<? extends Operation> getAllOperations()
           
 java.util.Set<? extends Property> getAllProperties()
           
 java.util.Set<? extends StaticProperty> getAllStaticProperties()
           
abstract  Feature[] getContributedFeatures()
           
 java.lang.String getDocumentation()
           
 Callable getFeature(java.lang.String name, Type[] parameterTypes)
          finds a feature with the given name on the given type with respect to the given parametertypes this method handles polymorphistic resolution for parameter types
 java.lang.String getName()
           
 Operation getOperation(java.lang.String name, Type[] parameterTypes)
          finds an operation with the given name on the given type with respect to the given parametertypes this method handles polymorphistic resolution for parameter types
 Property getProperty(java.lang.String name)
          finds a property with the given name
 StaticProperty getStaticProperty(java.lang.String name)
          finds a static property with the given name
 java.util.Set<? extends Type> getSuperTypes()
           
 TypeSystem getTypeSystem()
           
 int hashCode()
           
protected  java.util.Set<? extends Type> internalGetSuperTypes()
           
protected  boolean internalIsAssignableFrom(Type t)
           
 boolean isAbstract()
           
 boolean isAssignableFrom(Type t)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.xtend.typesystem.Type
isInstance, newInstance
 

Constructor Detail

AbstractTypeImpl

public AbstractTypeImpl(TypeSystem typeSystem,
                        java.lang.String name)
Method Detail

getTypeSystem

public final TypeSystem getTypeSystem()
Specified by:
getTypeSystem in interface Type

getName

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

getContributedFeatures

public abstract Feature[] getContributedFeatures()

getAllFeatures

public final java.util.Set<Callable> getAllFeatures()
Return all features defined by the type

Specified by:
getAllFeatures in interface Type

getStaticProperty

public StaticProperty getStaticProperty(java.lang.String name)
Description copied from interface: Type
finds a static property with the given name

Specified by:
getStaticProperty in interface Type
Returns:

getProperty

public Property getProperty(java.lang.String name)
Description copied from interface: Type
finds a property with the given name

Specified by:
getProperty in interface Type
Returns:

getFeature

public Callable getFeature(java.lang.String name,
                           Type[] parameterTypes)
Description copied from interface: Type
finds a feature with the given name on the given type with respect to the given parametertypes this method handles polymorphistic resolution for parameter types

Specified by:
getFeature in interface Type
Returns:

getOperation

public Operation getOperation(java.lang.String name,
                              Type[] parameterTypes)
Description copied from interface: Type
finds an operation with the given name on the given type with respect to the given parametertypes this method handles polymorphistic resolution for parameter types

Specified by:
getOperation in interface Type
Returns:

getAllStaticProperties

public java.util.Set<? extends StaticProperty> getAllStaticProperties()
Specified by:
getAllStaticProperties in interface Type

getAllProperties

public java.util.Set<? extends Property> getAllProperties()
Specified by:
getAllProperties in interface Type

getAllOperations

public java.util.Set<? extends Operation> getAllOperations()
Specified by:
getAllOperations in interface Type

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

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

toString

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

isAssignableFrom

public final boolean isAssignableFrom(Type t)
Specified by:
isAssignableFrom in interface Type

internalIsAssignableFrom

protected boolean internalIsAssignableFrom(Type t)

convert

public java.lang.Object convert(java.lang.Object src,
                                java.lang.Class<?> targetType)
Description copied from interface: Type
converts the given Object to an instance of the given Class, if this type is responsible for java objects of the given Class and the given Object

Specified by:
convert in interface Type
Returns:

getDocumentation

public java.lang.String getDocumentation()
Specified by:
getDocumentation in interface Type

getSuperTypes

public java.util.Set<? extends Type> getSuperTypes()
Specified by:
getSuperTypes in interface Type

internalGetSuperTypes

protected java.util.Set<? extends Type> internalGetSuperTypes()

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in interface Type