ST-Developer Java Reference

com.steptools.stdev
Class Domain

java.lang.Object
  extended by com.steptools.stdev.Domain
Direct Known Subclasses:
AggregateDomain, EntityDomain, EnumerationDomain, PrimitiveDomain, SelectDomain

public abstract class Domain
extends Object

Representation of an EXPRESS type.


Method Summary
 Object convert(Object obj)
          Try to convert an object to a corresponding object of this type.
abstract  Class domainClass()
           
static Domain forClass(Class cls)
           
 String getName()
          Gets the name of the Domain.
 boolean isAggregate()
           
 boolean isBoolean()
           
 boolean isEntity()
           
 boolean isEnumeration()
           
 boolean isInteger()
           
 boolean isLogical()
           
 boolean isReal()
           
 boolean isSelect()
           
 boolean isString()
           
abstract  boolean typeIsa(Domain other)
          Tests if this Domain is assignable to the other Domain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

forClass

public static Domain forClass(Class cls)
                       throws DomainNotFoundException
Throws:
DomainNotFoundException

domainClass

public abstract Class domainClass()

typeIsa

public abstract boolean typeIsa(Domain other)
Tests if this Domain is assignable to the other Domain.

Parameters:
other - The domain to compare to
Returns:
true If this domain is equal to or a subtype of the other Domain.

getName

public String getName()
Gets the name of the Domain. The name is the EXPRESS symbol, converted to uppercase.

Returns:
The name for the domain.

convert

public Object convert(Object obj)
Try to convert an object to a corresponding object of this type. Note that this is not a typecast method, instead, it is intended to provide a fallback to convert objects of the wrong type to the correct one. (This could be used, for example, after Attribute.setValue() throws a TypeException.)

Parameters:
obj - The object to convert.
Returns:
The other object converted to one of this domain. If the conversion is not possible, or not implemented, returns null.

isBoolean

public boolean isBoolean()

isLogical

public boolean isLogical()

isEntity

public boolean isEntity()

isEnumeration

public boolean isEnumeration()

isSelect

public boolean isSelect()

isAggregate

public boolean isAggregate()

isReal

public boolean isReal()

isInteger

public boolean isInteger()

isString

public boolean isString()

ST-Developer Java Reference