public void setName ( String fieldName ) { if ( m_name != null ) { throw new IllegalArgumentException ( "Field name is already set: " + m_name ) ; } if ( ! isValidFieldName ( fieldName ) ) { throw new IllegalArgumentException ( "Invalid field name: " + fieldName ) ; } m_name = fieldName ; }
Set this field s name to the given valid . An IllegalArgumentException is thrown if the name is already assigned or is not valid .