edu.ksu.cis.cadena.core.adapter.property
Class Util

java.lang.Object
  extended by edu.ksu.cis.cadena.core.adapter.property.Util

public class Util
extends java.lang.Object


Field Summary
static java.lang.String NULL_TYPE_REF_ERROR
           
static java.lang.String UNRESOLVED_TYPE_ERROR
           
static java.lang.String UNRESOLVED_TYPE_REF_ERROR
           
static java.lang.String UNSET_TYPE_ERROR
           
static java.lang.String VALUE_NULL_TYPE_REF_ERROR
           
static java.lang.String VALUE_TYPE_MISMATCH_ERROR
           
static java.lang.String VALUE_UNRESOLVED_TYPE_ERROR
           
static java.lang.String VALUE_UNRESOLVED_TYPE_REF_ERROR
           
static java.lang.String VALUE_UNSET_TYPE_ERROR
           
 
Constructor Summary
Util()
           
 
Method Summary
static void checkType(java.lang.Object key, PropertyType propertyType)
           
static void checkTypeOfValue(PropertyValue value, java.lang.Class<? extends PropertyType> expectedType)
          Checks the PropertyType of a PropertyValue to make sure that it is valid.
static java.lang.String getFullyQualifiedName(java.lang.Object propertyValue)
          Returns the fully qualified name of the specified PropertyValue
static java.lang.Object getMarkerKey(EObject propertyValue)
           
static PropertyType getRealType(PropertyType propertyType)
          Returns the dereferenced PropertyType of the specified PropertyType
static PropertyType getRealType(PropertyValue value)
          Returns the dereferenced PropertyType of the specified PropertyValue
static PropertyType getRealType(TypeDef typeDef)
          Returns the dereferenced PropertyType of the specified TypeDef
static java.lang.String typeToString(java.lang.Class<? extends PropertyType> propertyType)
           
static java.lang.String typeToString(PropertyType propertyType)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNSET_TYPE_ERROR

public static final java.lang.String UNSET_TYPE_ERROR

UNRESOLVED_TYPE_ERROR

public static final java.lang.String UNRESOLVED_TYPE_ERROR

NULL_TYPE_REF_ERROR

public static final java.lang.String NULL_TYPE_REF_ERROR

UNRESOLVED_TYPE_REF_ERROR

public static final java.lang.String UNRESOLVED_TYPE_REF_ERROR

VALUE_UNSET_TYPE_ERROR

public static final java.lang.String VALUE_UNSET_TYPE_ERROR

VALUE_UNRESOLVED_TYPE_ERROR

public static final java.lang.String VALUE_UNRESOLVED_TYPE_ERROR

VALUE_NULL_TYPE_REF_ERROR

public static final java.lang.String VALUE_NULL_TYPE_REF_ERROR

VALUE_UNRESOLVED_TYPE_REF_ERROR

public static final java.lang.String VALUE_UNRESOLVED_TYPE_REF_ERROR

VALUE_TYPE_MISMATCH_ERROR

public static final java.lang.String VALUE_TYPE_MISMATCH_ERROR
Constructor Detail

Util

public Util()
Method Detail

getRealType

public static PropertyType getRealType(PropertyValue value)
Returns the dereferenced PropertyType of the specified PropertyValue

Parameters:
value - The PropertyValue to find the type for.
Returns:
The dereferenced PropertyType
Throws:
UnresolvedTypeException

getRealType

public static PropertyType getRealType(PropertyType propertyType)
Returns the dereferenced PropertyType of the specified PropertyType

Parameters:
propetyType - The PropertyType to find the type for.
Returns:
The dereferenced PropertyType

getRealType

public static PropertyType getRealType(TypeDef typeDef)
Returns the dereferenced PropertyType of the specified TypeDef

Parameters:
typeDef - The TypeDef to find the type for.
Returns:
The dereferenced PropertyType

getFullyQualifiedName

public static java.lang.String getFullyQualifiedName(java.lang.Object propertyValue)
Returns the fully qualified name of the specified PropertyValue

Parameters:
propertyValue - The property value to get the name for
Returns:
The fully qualified name

getMarkerKey

public static java.lang.Object getMarkerKey(EObject propertyValue)

checkType

public static void checkType(java.lang.Object key,
                             PropertyType propertyType)

checkTypeOfValue

public static void checkTypeOfValue(PropertyValue value,
                                    java.lang.Class<? extends PropertyType> expectedType)
Checks the PropertyType of a PropertyValue to make sure that it is valid. The following checks are performed:

Parameters:
value - The value to check the type of
expectedType - The expected class of the type

typeToString

public static java.lang.String typeToString(PropertyType propertyType)

typeToString

public static java.lang.String typeToString(java.lang.Class<? extends PropertyType> propertyType)