src/authoring/forms/EntityComponentForm.java
public Object[] buildComponent() {
		if (!validComponent()) { 
			return null;
		}
		String fullName =  COMPONENT_PREFIX + this.name;
		Object[] params = new Object[fields.size()];
		try {
			Class<?> clazz = Class.forName(fullName);
			Constructor<?> cons = clazz.getDeclaredConstructors()[0];
			Class<?>[] types = cons.getParameterTypes();
			for (int i = 0; i < types.length-1; i++) {
				String text = fields.get(i).getText();
				params[i] = cast(types[i+1], text);
			}
			Object[] p = new Object[2];
			p[0] = this.getName().replace(COMPONENT_PREFIX, "");
			p[1] = params;
			return p;
		} catch (Exception e) {
			LOGGER.log(java.util.logging.Level.SEVERE, e.toString(), e);
		}
		return null;
	}
/**
	 * Builds the necessary Object Array to build a component based upon the data that is inside of the text fields.
	 * Should be performed only when the user clicks the submit button.
	 * @return a component that accurately represents the data in this wrapper class
	 */
Builds the necessary Object Array to build a component based upon the data that is inside of the text fields.
Should be performed only when the user clicks the submit button.
@return a component that accurately represents the data in this wrapper class
Builds the necessary Object Array to build a component based upon the data that is inside of the text fields . Should be performed only when the user clicks the submit button . @return a component that accurately represents the data in this wrapper class
public Object[] buildComponent() {
		if (!validComponent()) { 
			return null;
		}
		String fullName =  COMPONENT_PREFIX + this.name;
		Object[] params = new Object[fields.size()];
		try {
			Class<?> clazz = Class.forName(fullName);
			Constructor<?> cons = clazz.getDeclaredConstructors()[0];
			Class<?>[] types = cons.getParameterTypes();
			for (int i = 0; i < types.length-1; i++) {
				String text = fields.get(i).getText();
				params[i] = cast(types[i+1], text);
			}
			Object[] p = new Object[2];
			p[0] = this.getName().replace(COMPONENT_PREFIX, "");
			p[1] = params;
			return p;
		} catch (Exception e) {
			LOGGER.log(java.util.logging.Level.SEVERE, e.toString(), e);
		}
		return null;
	}
public Object [ ] buildComponent ( ) { if ( ! validComponent ( ) ) { return null ; } String fullName = COMPONENT_PREFIX + this . name ; Object [ ] params = new Object [ fields . size ( ) ] ; try { Class < ? > clazz = Class . forName ( fullName ) ; Constructor < ? > cons = clazz . getDeclaredConstructors ( ) [ 0 ] ; Class < ? > [ ] types = cons . getParameterTypes ( ) ; for ( int i = 0 ; i < types . length - 1 ; i ++ ) { String text = fields . get ( i ) . getText ( ) ; params [ i ] = cast ( types [ i + 1 ] , text ) ; } Object [ ] p = new Object [ 2 ] ; p [ 0 ] = this . getName ( ) . replace ( COMPONENT_PREFIX , "" ) ; p [ 1 ] = params ; return p ; } catch ( Exception e ) { LOGGER . log ( java . util . logging . Level . SEVERE , e . toString ( ) , e ) ; } return null ; }
Builds the necessary Object Array to build a component based upon the data that is inside of the text fields.
Builds the necessary Object Array to build a component based upon the data that is inside of the text fields .