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

com.hframework.beans.class0.MethodHelper Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package com.hframework.beans.class0;

public class MethodHelper {

	public static Method getGetMethod(Field field) {
		Method method = new Method();
		method.setName("get" + field.getUcName());
		method.setReturnType(field.getType());
		method.addCodeLn("return " + field.getName() + ";");
		return method;
	}

	public static Method getSetMethod(Field field) {
		Method method = new Method();
		method.setName("set" + field.getUcName());
		method.addParameter(field);
		method.addCodeLn("this." + field.getName() + " = " + field.getName() + ";");
		return method;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy