// Path: asteroid-core/src/main/java/asteroid/A.java
// @SuppressWarnings("PMD.ShortClassName")
// public final class A {
// 
//     /**
//      * Entry point to get node builders.
//      *
//      * @since 0.1.0
//      */
//     public static final Nodes NODES = new Nodes();
// 
//     /**
//      * Entry point to access language modifiers
//      *
//      * @since 0.1.0
//      */
//     public static final Modifiers ACC = new Modifiers();
// 
//     /**
//      * Entry point to create statements.
//      *
//      * @since 0.1.0
//      */
//     public static final Statements STMT = new Statements();
// 
//     /**
//      * Entry point to create expressions
//      *
//      * @since 0.1.0
//      */
//     public static final Expressions EXPR = new Expressions();
// 
//     /**
//      * Entry point to get util functions
//      *
//      * @since 0.1.0
//      */
//     public static final Utils UTIL = new Utils();
// 
//     /**
//      * Entry point to get criterias
//      *
//      * @since 0.2.4
//      */
//     public static final Criterias CRITERIA = new Criterias();
// }


import asteroid.A;
import org.codehaus.groovy.ast.ClassNode;
import org.codehaus.groovy.ast.PropertyNode;
import org.codehaus.groovy.ast.expr.Expression;
package asteroid.nodes;


/**
 * Creates a new {@link PropertyNode} instance
 *
 * @since 0.1.4
 */
@SuppressWarnings("PMD.AvoidFieldNameMatchingMethodName")
final public class PropertyNodeBuilder {

    private final String name;
    private int modifiers;
    private ClassNode type;
    private ClassNode owner;
    private Expression initValueExpr;

    /* Private constructor */
    private PropertyNodeBuilder(final String name) {
        this.name = name;
    }

    /**
     * Creates a builder from the property name
     *
     * @param propertyName the name of the property
     * @return an instance of {@link PropertyNodeBuilder}
     * @since 0.1.4
     */
    public static PropertyNodeBuilder property(final String propertyName) {
        return new PropertyNodeBuilder(propertyName);
    }

    /**
     * Sets property modifiers: static/public/...
     * <br><br>
     *
     * <strong>AST</strong>
     * <pre><code>property('solution')
     * .modifiers(A.ACC.ACC_PUBLIC)
     * .build()</code></pre>
     *
     * <strong>Result</strong>
     * <pre><code>public Object solution</code></pre>
     *
     * @param modifiers use {@link A#ACC} to set property modifiers
     * @return current instance of {@link PropertyNodeBuilder}
     * @since 0.1.4
     */
    public PropertyNodeBuilder modifiers(final int modifiers) {
        this.modifiers = modifiers;
        return this;
    }

    /**
     * Sets the type of the property
     * <br><br>
     *
     * <strong>AST</strong>
     * <pre><code>property('solution')
     * .modifiers(A.ACC.ACC_PUBLIC)
     * .type(String)
     * .build()</code></pre>
     *
     * <strong>Result</strong>
     * <pre><code>public String solution</code></pre>
     *
     * @param type the {@link Class} of the property
     * @return current instance of {@link PropertyNodeBuilder}
     * @since 0.1.4
     */
    public PropertyNodeBuilder type(final Class type) {
// Path: asteroid-core/src/main/java/asteroid/A.java
// @SuppressWarnings("PMD.ShortClassName")
// public final class A {
// 
//     /**
//      * Entry point to get node builders.
//      *
//      * @since 0.1.0
//      */
//     public static final Nodes NODES = new Nodes();
// 
//     /**
//      * Entry point to access language modifiers
//      *
//      * @since 0.1.0
//      */
//     public static final Modifiers ACC = new Modifiers();
// 
//     /**
//      * Entry point to create statements.
//      *
//      * @since 0.1.0
//      */
//     public static final Statements STMT = new Statements();
// 
//     /**
//      * Entry point to create expressions
//      *
//      * @since 0.1.0
//      */
//     public static final Expressions EXPR = new Expressions();
// 
//     /**
//      * Entry point to get util functions
//      *
//      * @since 0.1.0
//      */
//     public static final Utils UTIL = new Utils();
// 
//     /**
//      * Entry point to get criterias
//      *
//      * @since 0.2.4
//      */
//     public static final Criterias CRITERIA = new Criterias();
// }


// Path: asteroid-core/src/main/java/asteroid/nodes/PropertyNodeBuilder.java
import asteroid.A;
import org.codehaus.groovy.ast.ClassNode;
import org.codehaus.groovy.ast.PropertyNode;
import org.codehaus.groovy.ast.expr.Expression;

package asteroid.nodes;


/**
 * Creates a new {@link PropertyNode} instance
 *
 * @since 0.1.4
 */
@SuppressWarnings("PMD.AvoidFieldNameMatchingMethodName")
final public class PropertyNodeBuilder {

    private final String name;
    private int modifiers;
    private ClassNode type;
    private ClassNode owner;
    private Expression initValueExpr;

    /* Private constructor */
    private PropertyNodeBuilder(final String name) {
        this.name = name;
    }

    /**
     * Creates a builder from the property name
     *
     * @param propertyName the name of the property
     * @return an instance of {@link PropertyNodeBuilder}
     * @since 0.1.4
     */
    public static PropertyNodeBuilder property(final String propertyName) {
        return new PropertyNodeBuilder(propertyName);
    }

    /**
     * Sets property modifiers: static/public/...
     * <br><br>
     *
     * <strong>AST</strong>
     * <pre><code>property('solution')
     * .modifiers(A.ACC.ACC_PUBLIC)
     * .build()</code></pre>
     *
     * <strong>Result</strong>
     * <pre><code>public Object solution</code></pre>
     *
     * @param modifiers use {@link A#ACC} to set property modifiers
     * @return current instance of {@link PropertyNodeBuilder}
     * @since 0.1.4
     */
    public PropertyNodeBuilder modifiers(final int modifiers) {
        this.modifiers = modifiers;
        return this;
    }

    /**
     * Sets the type of the property
     * <br><br>
     *
     * <strong>AST</strong>
     * <pre><code>property('solution')
     * .modifiers(A.ACC.ACC_PUBLIC)
     * .type(String)
     * .build()</code></pre>
     *
     * <strong>Result</strong>
     * <pre><code>public String solution</code></pre>
     *
     * @param type the {@link Class} of the property
     * @return current instance of {@link PropertyNodeBuilder}
     * @since 0.1.4
     */
    public PropertyNodeBuilder type(final Class type) {
        this.type = A.NODES.clazz(type).build();