public MaxFunction(Object parent, String functionName, Class args[]) {
		this.parent = parent;
		this.parentClass = parent.getClass();
		
		this.functionName = functionName;
			
		try {
			// find the setter method -- it's parameter type should be the
			// same as the field type
			this.function = parentClass.getDeclaredMethod(functionName, args);
		
		// catch all nasty exceptions
		} catch (SecurityException e1) {
			System.err.println("MaxLink :: couldn't access function '" + functionName + "'. Is it public?");
			e1.printStackTrace();
		} catch (NoSuchMethodException e1) {
			System.err.println("MaxLink :: couldn't find function '" + functionName + "'");
			e1.printStackTrace();
		}
	}