com.kero.security.lang.lexems.DefaultRuleLexem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kero-security Show documentation
Show all versions of kero-security Show documentation
Kero-Security is a library for statically controlling access to properties of objects / classes.
package com.kero.security.lang.lexems;
import com.kero.security.lang.tokens.DefaultAccessToken;
public class DefaultRuleLexem extends KsdlLexemBase {
public DefaultRuleLexem() {
super("\\([GD]\\)");
}
@Override
public DefaultAccessToken tokenize(String data) {
if(data.charAt(1) == 'G') {
return DefaultAccessToken.GRANT;
}
else {
return DefaultAccessToken.DENY;
}
}
}