All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kohsuke.rngom.digested.DDefine Maven / Gradle / Ivy

Go to download

Old JAXB Binding Compiler. Contains source code needed for binding customization files into java sources. In other words: the *tool* to generate java classes for the given xml representation.

There is a newer version: 4.0.5
Show newest version
package org.kohsuke.rngom.digested;

/**
 * @author Kohsuke Kawaguchi ([email protected])
 */
public class DDefine {
    private final String name;

    private DPattern pattern;
    private Boolean nullable;
    DAnnotation annotation;

    public DDefine(String name) {
        this.name = name;
    }

    public DPattern getPattern() {
        return pattern;
    }

    public DAnnotation getAnnotation() {
        if(annotation==null)
            return DAnnotation.EMPTY;
        return annotation;
    }

    public void setPattern(DPattern pattern) {
        this.pattern = pattern;
        this.nullable = null;
    }

    /**
     * Gets the name of the pattern block.
     */
    public String getName() {
        return name;
    }

    public boolean isNullable() {
        if(nullable==null)
            nullable = pattern.isNullable()?Boolean.TRUE:Boolean.FALSE;
        return nullable.booleanValue();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy