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

org.javabuilders.PropertyAsMethodInvocation Maven / Gradle / Ivy

The newest version!
package org.javabuilders;

import java.lang.reflect.Method;

/**
 * Represents those properties that should be automatically translated into object method invocations, e.g.:
 * size : packed means really frame.pack()
 * 
 * @author Jacek Furmankiewicz
 *
 */
public class PropertyAsMethodInvocation {

	private Method method;
	private String propertyName;
	private int valueArgumentIndex = 0; //by default the value from the YAML file is the first argument
	private Object[] arguments;
	public Method getMethod() {
		return method;
	}
	/**
	 * @param method Method
	 */
	public void setMethod(Method method) {
		this.method = method;
	}
	/**
	 * @return Method
	 */
	public String getPropertyName() {
		return propertyName;
	}
	/**
	 * @param propertyName Property name
	 */
	public void setPropertyName(String propertyName) {
		this.propertyName = propertyName;
	}
	/**
	 * @return Controls where the value from the YAML goes into the method signature (it's not always the first argument), e.g. JScrollPane.setCorner(String, Component)
	 */
	public int getValueArgumentIndex() {
		return valueArgumentIndex;
	}
	/**
	 * @param valueArgumentIndex  Controls where the value from the YAML goes into the method signature (it's not always the first argument), e.g. JScrollPane.setCorner(String, Component)
	 */
	public void setValueArgumentIndex(int valueArgumentIndex) {
		this.valueArgumentIndex = valueArgumentIndex;
	}
	/**
	 * @return Method arguments
	 */
	public Object[] getArguments() {
		return arguments;
	}
	/**
	 * @param arguments Method arguments
	 */
	public void setArguments(Object[] arguments) {
		this.arguments = arguments;
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy