All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.search.util.BinderHelper Maven / Gradle / Ivy

There is a newer version: 3.5.6-Final
Show newest version
//$Id: $
package org.hibernate.search.util;

import org.hibernate.reflection.XMember;
import org.hibernate.util.StringHelper;

/**
 * @author Emmanuel Bernard
 */
public abstract class BinderHelper {

	private BinderHelper() {
	}

	/**
	 * Get attribute name out of member unless overriden by name
	 */
	public static String getAttributeName(XMember member, String name) {
		return StringHelper.isNotEmpty( name ) ?
				name :
				member.getName(); //explicit field name
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy