package org.ajax4jsf.builder.config;

/**
 * Simple holder for test class name and test superclass name 
 * @author dbiatenia
 *
 */
public class TestClassHolder {

	private String _classname;
	
	private String _superclassname = "org.ajax4jsf.tests.AbstractAjax4JsfTestCase";

	public String getClassname() {
		return _classname;
	}

	public void setClassname(String classname) {
		this._classname = classname;
	}

	public String getSuperclassname() {
		return _superclassname;
	}

	public void setSuperclassname(String superclassname) {
		this._superclassname = superclassname;
	}
	
	/**
	 * Convert full class name to simple.
	 * @return class name without package name. 
	 */
	public String getSimpleClassName() {
		int lastPoint = getClassname().lastIndexOf('.');
		if (lastPoint>0) {
			return getClassname().substring(lastPoint+1);
		}
		return getClassname();
	}
	
	
}
