
org.xmlet.regexapi.NamedSubExpression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of regexApi Show documentation
Show all versions of regexApi Show documentation
Uses XsdAsmFaster to generate a fluent API that allows the manipulation of the regex language.
The newest version!
package org.xmlet.regexapi;
import java.util.function.Consumer;
public final class NamedSubExpression implements CustomAttributeGroup, Z>, TextGroup, Z> {
protected final Z parent;
protected final ElementVisitor visitor;
public NamedSubExpression(ElementVisitor visitor) {
this.visitor = visitor;
this.parent = null;
visitor.visitElementNamedSubExpression(this);
}
public NamedSubExpression(Z parent) {
this.parent = parent;
this.visitor = parent.getVisitor();
this.visitor.visitElementNamedSubExpression(this);
}
protected NamedSubExpression(Z parent, ElementVisitor visitor, boolean shouldVisit) {
this.parent = parent;
this.visitor = visitor;
if (shouldVisit) {
visitor.visitElementNamedSubExpression(this);
}
}
public Z __() {
this.visitor.visitParentNamedSubExpression(this);
return this.parent;
}
public final NamedSubExpression dynamic(Consumer> consumer) {
this.visitor.visitOpenDynamic();
consumer.accept(this);
this.visitor.visitCloseDynamic();
return this;
}
public final NamedSubExpression of(Consumer> consumer) {
consumer.accept(this);
return this;
}
public Z getParent() {
return this.parent;
}
public final ElementVisitor getVisitor() {
return this.visitor;
}
public String getName() {
return "namedSubExpression";
}
public final NamedSubExpression self() {
return this;
}
public NamedSubExpressionNameFirst nameFirst(String nameFirst) {
((NameFirst)(new NameFirst(this, this.visitor, true)).text(nameFirst)).__();
return new NamedSubExpressionNameFirst(this.parent, this.visitor, true);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy