Share My Creation BuilderPattern creator

Hi to all! As i've been using the Builder Pattern a lot lately, i write a small utility in B4j that make the .bas file for B4A from the class instance with his property. B4J project is attached
This is the tutorial:

How to use it?
Simply write in Text Area the instance and click on Save. First line must be this:
Dim Object as Type
You should change Type with the type of the class (Label, custom type, etc..)
Second line must be the initialize method

Other lines are the properties of the object (NOT METHOD) that you want to write in Builder. A property line should be write like this
Object.Property = DefaultValue 'Type Of Property
If the property is an array, you should write () after the type, like this
Object.Property = Array as Type(default,default,default,default) 'Type()

A small example

    Dim b As Button
    b.Color = Colors.Transparent 'int
    b.Ellipsize = "NONE" 'string
    b.Enabled = True 'boolean
    b.Gravity = Gravity.CENTER 'int
    b.Height = 0 'int
    b.Left = 0 'int
    b.Padding = Array As Int(4dip,4dip,4dip,4dip) 'int()
    b.SingleLine = False 'boolean
    b.Text = "" 'string
    b.TextColor = Colors.White 'int
    b.TextSize = 14 'int
    b.Top = 0 'int
    b.Typeface = Typeface.DEFAULT 'typeface
    b.Visible = True 'boolean
    b.Width = 0 'int



    3.5 KB · Views: 184