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

com.kero.security.lang.provider.TextualProvider Maven / Gradle / Ivy

Go to download

Kero-Security is a library for statically controlling access to properties of objects / classes.

There is a newer version: 0.1.39
Show newest version
package com.kero.security.lang.provider;

import com.kero.security.lang.KsdlLexer;
import com.kero.security.lang.KsdlParser;
import com.kero.security.lang.collections.RootNodeList;
import com.kero.security.lang.collections.TokenSequence;
import com.kero.security.lang.provider.resource.KsdlTextResource;

public class TextualProvider extends KsdlProviderBase {

	private KsdlTextResource resource;
	
	public TextualProvider(KsdlTextResource resource) {
		
		this.resource = resource;
	}
	
	@Override
	public RootNodeList getRoots() {
		
		String text = resource.getRawText();
		
		TokenSequence tokens = KsdlLexer.getInstance().tokenize(text);
		RootNodeList roots = KsdlParser.getInstance().parse(tokens);
		
		return roots;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy