org.eclipse.xtend.typesystem.uml2.profile
Class EnumType
java.lang.Object
org.eclipse.xtend.typesystem.AbstractTypeImpl
org.eclipse.xtend.typesystem.uml2.profile.EnumType
- All Implemented Interfaces:
- Type
public class EnumType
- extends AbstractTypeImpl
Represents an enumeration within a profile.
- Since:
- 4.1
Constructor Summary |
EnumType(TypeSystem ts,
java.lang.String name,
org.eclipse.uml2.uml.Enumeration en)
|
Method Summary |
Feature[] |
getContributedFeatures()
An enumeration features its literals. |
org.eclipse.uml2.uml.Enumeration |
getEnumeration()
|
boolean |
isInstance(java.lang.Object o)
For enumerations the behaviour of isInstance() is slightly different. |
java.lang.Object |
newInstance()
Enums cannot be instantiated, thus an UnsupportedOperationException is thrown. |
Methods inherited from class org.eclipse.xtend.typesystem.AbstractTypeImpl |
convert, equals, getAllFeatures, getAllOperations, getAllProperties, getAllStaticProperties, getDocumentation, getFeature, getName, getOperation, getProperty, getStaticProperty, getSuperTypes, getTypeSystem, hashCode, internalGetSuperTypes, internalIsAssignableFrom, isAbstract, isAssignableFrom, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
EnumType
public EnumType(TypeSystem ts,
java.lang.String name,
org.eclipse.uml2.uml.Enumeration en)
getContributedFeatures
public Feature[] getContributedFeatures()
- An enumeration features its literals. Literals are represented by a
org.eclipse.internal.xtend.type.StaticProperty
.
- Specified by:
getContributedFeatures
in class AbstractTypeImpl
isInstance
public boolean isInstance(java.lang.Object o)
- For enumerations the behaviour of isInstance() is slightly different. Instances can only be instances of
EnumerationLiteral
.
A literal is of this instance if the referenced Enumeration is the same as the Enumeration represented by this type.
newInstance
public java.lang.Object newInstance()
- Enums cannot be instantiated, thus an
UnsupportedOperationException
is thrown.
getEnumeration
public org.eclipse.uml2.uml.Enumeration getEnumeration()