org.openprovenance.prov.template.emitter.minilanguage.Constant Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of prov-template-compiler Show documentation
Show all versions of prov-template-compiler Show documentation
A template system for PROV bundles.
The newest version!
package org.openprovenance.prov.template.emitter.minilanguage;
import org.openprovenance.prov.template.emitter.Element;
import org.openprovenance.prov.template.emitter.minilanguage.emitters.Python;
import java.util.List;
public class Constant extends Expression {
private final String string;
public Constant(String string, List elements) {
super(elements);
this.string=string;
}
@Override
public String toString() {
return "Constant{" +
"string='" + string + '\'' +
'}';
}
public void emit(Python emitter, List classVariables, List instanceVariables) {
emit(emitter, false, classVariables, instanceVariables);
}
public void emit(Python emitter, boolean continueLine, List classVariables, List instanceVariables) {
emitter.emitLine("'" + string + "'",continueLine);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy