com.kero.security.lang.parsers.metaline.MetalineParserBase 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.
The newest version!
package com.kero.security.lang.parsers.metaline;
import com.kero.security.lang.collections.TokenSequence;
import com.kero.security.lang.nodes.metaline.MetalineNode;
import com.kero.security.lang.parsers.KsdlNodeParserBase;
import com.kero.security.lang.tokens.KeyWordToken;
import com.kero.security.lang.tokens.NameToken;
public abstract class MetalineParserBase extends KsdlNodeParserBase implements MetalineParser {
protected String name;
public MetalineParserBase(String name) {
this.name = name;
}
public boolean isMatch(TokenSequence tokens) {
if(!tokens.isToken(0, KeyWordToken.METALINE)) return false;
if(!tokens.isToken(1, NameToken.class)) return false;
if(!((NameToken) tokens.get(1)).getRaw().equals(name)) return false;
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy