- java.lang.Object
-
- io.github.mmm.bean.generator.BeanMethod
-
- io.github.mmm.bean.generator.BeanMethodSetter
-
public class BeanMethodSetter extends BeanMethod
BeanMethodfor a regular setter method.- Since:
- 1.0.0
-
-
Field Summary
-
Fields inherited from class io.github.mmm.bean.generator.BeanMethod
method, propertyName
-
-
Constructor Summary
Constructors Constructor Description BeanMethodSetter(Method method, String propertyName)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>getPropertyType()protected voidwriteBody(Writer writer)Writes the method body (implementation).protected voidwriteParameters(Writer writer)Writes the method parameters.-
Methods inherited from class io.github.mmm.bean.generator.BeanMethod
getMethod, getParameterName, getPropertyName, isSpecialized, of, write
-
-
-
-
Constructor Detail
-
BeanMethodSetter
public BeanMethodSetter(Method method, String propertyName)
The constructor.- Parameters:
method- themethod.propertyName- theproperty name.
-
-
Method Detail
-
writeBody
protected void writeBody(Writer writer) throws IOException
Description copied from class:BeanMethodWrites the method body (implementation).- Specified by:
writeBodyin classBeanMethod- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeParameters
protected void writeParameters(Writer writer) throws IOException
Description copied from class:BeanMethodWrites the method parameters.- Overrides:
writeParametersin classBeanMethod- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
getPropertyType
public Class<?> getPropertyType()
- Specified by:
getPropertyTypein classBeanMethod- Returns:
- the
Classreflecting the {ReadablePropertytype of the property value(and not thepropertyitself).
-
-