src/main/java/de/unixwork/uwproj/Flags.java

Sat, 03 Aug 2019 17:45:03 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 03 Aug 2019 17:45:03 +0200
changeset 8
82cd9f1d94cb
parent 0
38775db5fdf5
permissions
-rw-r--r--

add c++ compiler detection

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package de.unixwork.uwproj;

import org.w3c.dom.Element;

/**
 *
 * @author olaf
 */
public class Flags {
    private String varName;
    private String value;
    private boolean exec = false;
    
    public static Flags parse(Element e) {
        Flags f = new Flags();
        f.varName = e.getNodeName().toUpperCase();
        String value = Xml.getContent(e);
        f.value = value == null ? "" : value;
        
        String type = e.getAttribute("type");
        if(type != null && type.equals("exec")) {
            f.exec = true;
        }
        
        return f;
    }
    
    public String getVarName() {
        return varName;
    }

    public void setVarName(String varName) {
        this.varName = varName;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public boolean isExec() {
        return exec;
    }

    public void setExec(boolean exec) {
        this.exec = exec;
    }
}

mercurial