private void checkName( String name ) throws NameException
public void checkName( String name ) throws NameException
	private void checkName( String name ) throws NameException	{		ElementDefn metaData = (ElementDefn) element.getDefn( );		if ( name == null )		{			// Cannot clear the name when there are references. It would leave			// the dependents with no way to identify this element.			if ( element.hasDerived( ) || element.hasReferences( ) )				throw new NameException( element, name,						NameException.DESIGN_EXCEPTION_HAS_REFERENCES );			// Cannot clear the name of an element when the name is required.			if ( metaData.getNameOption( ) == MetaDataConstants.REQUIRED_NAME )				throw new NameException( element, name,						NameException.DESIGN_EXCEPTION_NAME_REQUIRED );		}		else		{			// Cannot set the name of an element when the name is not allowed.			if ( metaData.getNameOption( ) == MetaDataConstants.NO_NAME )				throw new NameException( element, name,						NameException.DESIGN_EXCEPTION_NAME_FORBIDDEN );			// Ensure that the name is not a duplicate.			int ns = metaData.getNameSpaceID( );			// if ( getModule( ).getNameSpace( ns ).getElement( name ) != null )			if ( !getModule( ).getModuleNameSpace( ns ).canContain( name ) )				throw new NameException( element, name,						NameException.DESIGN_EXCEPTION_DUPLICATE );		}	}