org.eclipse.xtend.backend.types.builtin
Class StringType

java.lang.Object
  extended by org.eclipse.xtend.backend.types.AbstractType
      extended by org.eclipse.xtend.backend.types.builtin.StringType
All Implemented Interfaces:
BackendType

public final class StringType
extends AbstractType

The canonical, internal representation of a string object is "anything that implements CharSequence", i.e. a function that accepts a parameter of type string must accept any CharSequence. This is done to enable internal optimizations like lazy concatenation and streaming.

This has the consequence that functions may need to convert a given CharSequence to whatever more specific string representation they need internally.

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

Field Summary
static StringType INSTANCE
           
 
Method Summary
 java.lang.Object create()
           
 boolean equals(java.lang.Object other)
          every type *must* implement a valid equals method, otherwise the backend will break!
 boolean isAssignableFrom(BackendType other)
           
 
Methods inherited from class org.eclipse.xtend.backend.types.AbstractType
getBuiltinOperations, getName, getProperties, getProperty, getStaticProperties, getSuperTypes, getUniqueRepresentation, register, register, register, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final StringType INSTANCE
Method Detail

isAssignableFrom

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

create

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

equals

public boolean equals(java.lang.Object other)
Description copied from class: AbstractType
every type *must* implement a valid equals method, otherwise the backend will break!

Specified by:
equals in class AbstractType