- java.lang.Object
-
- io.github.mmm.bean.generator.BeanProperty
-
public class BeanProperty extends Object
Container for aBeanProperty.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description BeanProperty(String name)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(BeanMethod method)BeanMethodGettergetGetterMethod()StringgetName()BeanMethodPropertygetPropertyMethod()StringgetPropertyType()BeanMethodSettergetSetterMethod()Class<?>getType()StringtoString()voidwriteField(Writer writer)Writes the property field declaration.voidwriteFieldInitializer(Writer writer)Writes the property field initializer statement for constructor.voidwriteMethods(Writer writer)Writes the methods.
-
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the name of the property.
-
getPropertyMethod
public BeanMethodProperty getPropertyMethod()
- Returns:
- propertyMethod
-
getGetterMethod
public BeanMethodGetter getGetterMethod()
- Returns:
- getterMethod
-
getSetterMethod
public BeanMethodSetter getSetterMethod()
- Returns:
- setterMethod
-
add
public void add(BeanMethod method)
- Parameters:
method- theBeanMethodto register in thisBeanProperty.
-
getType
public Class<?> getType()
- Returns:
- type
-
getPropertyType
public String getPropertyType()
- Returns:
- propertyType
-
writeField
public void writeField(Writer writer) throws IOException
Writes the property field declaration.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeFieldInitializer
public void writeFieldInitializer(Writer writer) throws IOException
Writes the property field initializer statement for constructor.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
writeMethods
public void writeMethods(Writer writer) throws IOException
Writes the methods.- Parameters:
writer- theWriter.- Throws:
IOException- on error.
-
-