com.github.paulosalonso.spel.builder.common.Expression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spel-builder Show documentation
Show all versions of spel-builder Show documentation
A facilitator for creating Spring expressions (SpEL).
The newest version!
package com.github.paulosalonso.spel.builder.common;
public abstract class Expression {
protected abstract String getPrefix();
protected abstract String getSuffix();
protected abstract String getName();
public Logical and(Expression expression) {
return And.and(this, expression);
}
public Logical or(Expression expression) {
return Or.or(this, expression);
}
public Group group() {
return Group.group(this);
}
public String build() {
return String.format("%s%s%s", getPrefix(), getName(), getSuffix());
}
@Override
public String toString() {
return build();
}
}