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

com.ociweb.pronghorn.code.Literal Maven / Gradle / Ivy

The newest version!
package com.ociweb.pronghorn.code;

import java.io.IOException;

import com.ociweb.pronghorn.util.Appendables;

public class Literal extends Code implements SingleResult {

    private final CharSequence literal;
    
    public Literal(CharSequence literal) {
        super(null,1,true);//IdGen is not used.
        this.literal = literal;
    }
    
    public Literal(int literal) throws IOException {
        super(null);//IdGen is not used.
        this.literal = Appendables.appendValue(new StringBuilder(), literal);
    }

    @Override
    protected void upFrontDefinition(Appendable target) throws IOException {
        //Nothing should be done for this.
    }

    @Override
    protected void singleResult(Appendable target) throws IOException {
       target.append(literal);
    }
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy