checkName( element.getName( ) );
ElementDefn metaData = (ElementDefn) element.getDefn( );  if ( name == null ) {    if ( element.hasDerived( ) || element.hasReferences( ) ) throw new NameException( element, name, NameException.DESIGN_EXCEPTION_HAS_REFERENCES );    if ( metaData.getNameOption( ) == MetaDataConstants.REQUIRED_NAME ) throw new NameException( element, name, NameException.DESIGN_EXCEPTION_NAME_REQUIRED ); } else {   if ( metaData.getNameOption( ) == MetaDataConstants.NO_NAME ) throw new NameException( element, name, NameException.DESIGN_EXCEPTION_NAME_FORBIDDEN );     int ns = metaData.getNameSpaceID( ); if ( ns == Module.STYLE_NAME_SPACE && element instanceof StyleElement && getModule( ) instanceof Library ) { return; }      DesignElement existedElement = getModule( ).getNameSpace( ns ) .getElement( name );           if ( existedElement != null && existedElement != element ) throw new NameException( element, name, NameException.DESIGN_EXCEPTION_DUPLICATE ); }
	public void checkName( ) throws NameException	{		checkName( element.getName( ) );	}