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

refdiff.core.cst.TokenizedSource Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package refdiff.core.cst;

import java.util.List;

public class TokenizedSource {
	
	public static final int START = 0;
	public static final int END = 1;
	private final String file;
	private final int[][] tokens;
	
	public TokenizedSource(String file, List tokens) {
		this.file = file;
		this.tokens = new int[tokens.size()][2];
		for (int i = 0; i < tokens.size(); i++) {
			TokenPosition token = tokens.get(i);
			this.tokens[i][START] = token.getStart();
			this.tokens[i][END] = token.getEnd();
		}
	}
	
	public String getFile() {
		return file;
	}
	
	public int[][] getTokens() {
		return tokens;
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy