package com.jxml.quick.util.qjml4;

import java.io.PrintWriter;
import java.util.ArrayList;

public class QMProperty extends QGBase implements QGBaseIntf, QMConnector {

    public String name;

    public String fClass;

    /** default = "false" */
    public boolean pAbstract = false;

    /** default = "true" */
    public boolean pRead = true;

    /** default = "true" */
    public boolean pWrite = true;

    public String initializer;
    

    public QMProperty() {
    }

    /** full constructor */
    public QMProperty(String name, String fClass, boolean pAbstract, boolean pRead, boolean pWrite, String initializer) {
        this.name = name;
        this.fClass = fClass;
        this.pAbstract = pAbstract;
        this.pRead = pRead;
        this.pWrite = pWrite;
        this.initializer = initializer;
    }

    public void print(PrintWriter pw, String indent) {
        pw.println(indent + "element property");
        if (name != null) {
            pw.println(indent + "name = " + name);
        } else
            pw.println(indent + "name = null");
        if (fClass != null) {
            pw.println(indent + "fClass = " + fClass);
        } else
            pw.println(indent + "fClass = null");
        pw.println(indent + "pAbstract = " + pAbstract);
        pw.println(indent + "pRead = " + pRead);
        pw.println(indent + "pWrite = " + pWrite);
        if (initializer != null) {
            pw.println(indent + "initializer = " + initializer);
        } else
            pw.println(indent + "initializer = null");
    }

}
