src/authoring/factories/ElementFactory.java
public Element buildElement(ElementType elementName, String text) throws Exception {
		String builderName = PACKAGE_NAME+elementName+ELEMENT;
		Class<?> elementClass = Class.forName(builderName);
		return (Element) elementClass.getConstructor(text.getClass()).newInstance(text);		
	}
/**
	 * Builds a non-clickable element of a specified type and contains the specified text.
	 * @param elementName Type of Element to be created
	 * @param text {@code String} text to be placed in the new Element
	 * @return Desired element
	 * @throws Exception
	 */
Builds a non-clickable element of a specified type and contains the specified text.
@param elementName Type of Element to be created
@param text  String text to be placed in the new Element
@return Desired element
@throws Exception
Builds a non - clickable element of a specified type and contains the specified text . @param elementName Type of Element to be created @param text String text to be placed in the new Element @return Desired element @throws Exception
public Element buildElement(ElementType elementName, String text) throws Exception {
		String builderName = PACKAGE_NAME+elementName+ELEMENT;
		Class<?> elementClass = Class.forName(builderName);
		return (Element) elementClass.getConstructor(text.getClass()).newInstance(text);		
	}
public Element buildElement ( ElementType elementName , String text ) throws Exception { String builderName = PACKAGE_NAME + elementName + ELEMENT ; Class < ? > elementClass = Class . forName ( builderName ) ; return ( Element ) elementClass . getConstructor ( text . getClass ( ) ) . newInstance ( text ) ; }
Builds a non-clickable element of a specified type and contains the specified text.
Builds a non - clickable element of a specified type and contains the specified text .