if ( prop.getTypeCode( ) != PropertyType.CHOICE_TYPE )
if ( prop.getTypeCode( ) != IPropertyType.CHOICE_TYPE )
	private void checkUserPropertyDefn( UserPropertyDefn prop )			throws UserPropertyException	{		// Does the element allow user properties?		String name = prop.getName( );		if ( !element.getDefn( ).allowsUserProperties( ) )			throw new UserPropertyException( element, name,					UserPropertyException.DESIGN_EXCEPTION_USER_PROP_DISALLOWED );		// Validate the name.		if ( StringUtil.isBlank( name ) )			throw new UserPropertyException( element, name,					UserPropertyException.DESIGN_EXCEPTION_NAME_REQUIRED );		MetaDataDictionary dd = MetaDataDictionary.getInstance( );		List supportedTypes = UserPropertyDefn.getAllowedTypes( );		assert supportedTypes != null;		if ( !supportedTypes				.contains( dd.getPropertyType( prop.getTypeCode( ) ) ) )			throw new UserPropertyException( element, name,					UserPropertyException.DESIGN_EXCEPTION_INVALID_TYPE );		// Check the display name or id.		String msgID = prop.getDisplayNameID( );		String displayName = prop.getDisplayName( );		if ( !StringUtil.isBlank( msgID ) )		{			displayName = module.getMessage( msgID );			if ( StringUtil.isBlank( displayName ) )				throw new UserPropertyException(						element,						name,						UserPropertyException.DESIGN_EXCEPTION_INVALID_DISPLAY_ID );		}		// Ensure choices exist if this is a choice typeCode.		if ( prop.getTypeCode( ) == PropertyType.CHOICE_TYPE )		{			IChoiceSet choices = prop.getChoices( );			if ( choices == null || choices.getChoices( ).length == 0 )				throw new UserPropertyException( element, name,						UserPropertyException.DESIGN_EXCEPTION_MISSING_CHOICES );		}		// if the user-defined property has choices and its type is not		// "choice", validate the value of the user choice according to the		// type.		if ( prop.hasChoices( ) )		{			IChoiceSet choiceSet = prop.getChoices( );			IChoice[] choices = choiceSet.getChoices( );			for ( int i = 0; i < choices.length; i++ )			{				UserChoice choice = (UserChoice) choices[i];				Object value = choice.getValue( );				if ( StringUtil.isBlank( choice.getName( ) ) )				{					throw new UserPropertyException(							element,							name,							UserPropertyException.DESIGN_EXCEPTION_CHOICE_NAME_REQUIRED );				}				if ( value == null )					throw new UserPropertyException(							element,							name,							UserPropertyException.DESIGN_EXCEPTION_CHOICE_VALUE_REQUIRED );				if ( prop.getTypeCode( ) != PropertyType.CHOICE_TYPE )				{					try					{						value = prop.validateValue( module, value );					}					catch ( PropertyValueException e )					{						throw new UserPropertyException(								element,								name,								UserPropertyException.DESIGN_EXCEPTION_INVALID_CHOICE_VALUE );					}				}			}		}		// build the default value		Object defaultValue = prop.getDefault( );		if ( defaultValue != null )		{			try			{				prop.validateValue( getModule( ), defaultValue );			}			catch ( PropertyValueException e )			{				throw new UserPropertyException(						element,						name,						UserPropertyException.DESIGN_EXCEPTION_INVALID_DEFAULT_VALUE,						e, new String[]{defaultValue.toString( ), prop.getType().getName()} );			}		}		// Build the cached semantic data.		try		{			prop.build( );		}		catch ( MetaDataException e )		{			throw new UserPropertyException( element, name,					UserPropertyException.DESIGN_EXCEPTION_INVALID_DEFINITION,					e );		}	}