org.obe.xpdl.model.data
Class DeclaredType

java.lang.Object
  extended byorg.obe.util.AbstractBean
      extended byorg.obe.xpdl.model.data.DeclaredType
All Implemented Interfaces:
java.beans.beancontext.BeanContextChild, java.io.Serializable, Type

public final class DeclaredType
extends AbstractBean
implements Type

Refers to a previously declared package-level data type.

Author:
Adrian Price
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.obe.xpdl.model.data.Type
ARRAY_TYPE, BOOLEAN_TYPE, DATETIME_TYPE, DECLARED_TYPE, DEFAULT_TYPE, ENUMERATION_TYPE, EXTERNAL_REFERENCE_TYPE, FLOAT_TYPE, INTEGER_TYPE, LIST_TYPE, PERFORMER_TYPE, RECORD_TYPE, REFERENCE_TYPE, SCHEMA_TYPE, STRING_TYPE, UNDEFINED_TYPE, UNION_TYPE
 
Constructor Summary
DeclaredType()
           
DeclaredType(TypeDeclaration decl)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getId()
           
 Type getImpliedType()
          Returns the actual type implied by this type.
 TypeDeclaration getTypeDeclaration()
           
 int hashCode()
           
 boolean isAssignableFrom(Type fromType)
          Checks type compatibility in an assignment.
 void setTypeDeclaration(TypeDeclaration typeDecl)
           
 java.lang.String toString()
           
 int value()
          The data type's ordinal value.
 
Methods inherited from class org.obe.util.AbstractBean
add, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clear, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, get, get, getBeanContext, getListModel, hasChangeListeners, hasVetoListeners, remove, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener, set, set, setBeanContext
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeclaredType

public DeclaredType()

DeclaredType

public DeclaredType(TypeDeclaration decl)
Method Detail

value

public int value()
Description copied from interface: Type
The data type's ordinal value.

Specified by:
value in interface Type
Returns:
Ordinal value: Type.STRING_TYPE, Type.FLOAT_TYPE, Type.INTEGER_TYPE, Type.REFERENCE_TYPE, Type.DATETIME_TYPE, Type.BOOLEAN_TYPE, Type.PERFORMER_TYPE, Type.DECLARED_TYPE, Type.SCHEMA_TYPE, Type.EXTERNAL_REFERENCE_TYPE, Type.RECORD_TYPE, Type.UNION_TYPE, Type.ENUMERATION_TYPE, Type.ARRAY_TYPE, Type.LIST_TYPE

getId

public java.lang.String getId()

getImpliedType

public Type getImpliedType()
Description copied from interface: Type
Returns the actual type implied by this type. Some types behave as references to other types.

Specified by:
getImpliedType in interface Type
Returns:
The implied type.

getTypeDeclaration

public TypeDeclaration getTypeDeclaration()

setTypeDeclaration

public void setTypeDeclaration(TypeDeclaration typeDecl)

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()

isAssignableFrom

public boolean isAssignableFrom(Type fromType)
Description copied from interface: Type
Checks type compatibility in an assignment.

Specified by:
isAssignableFrom in interface Type
Parameters:
fromType - The type of the 'rvalue'.
Returns:
true if a value of type fromType can be assigned or converted to a value of type toType.

toString

public java.lang.String toString()


SourceForge.net Logo OBE-1.0 Copyright (c) 2002-2006 Adrian Price. All Rights Reserved.