Class ChannelFilter
java.lang.Object
io.github.douira.glsl_transformer.print.filter.ChannelFilter
- All Implemented Interfaces:
TokenFilter
The channel filter accepts all tokens that are not from a lexer channel that
is on the given list of disallowed channels.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.douira.glsl_transformer.print.filter.TokenFilter
TokenFilter.TokenChannel -
Constructor Summary
ConstructorsConstructorDescriptionChannelFilter(TokenFilter.TokenChannel disallowedChannel) Creates a new channel filter with a single disallowed channel.ChannelFilter(EnumSet<TokenFilter.TokenChannel> disallowedChannels) Creates a new channel filter with the given disallowed channels. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisTokenAllowed(Token token) Checks if the token should be printed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.douira.glsl_transformer.print.filter.TokenFilter
resetState
-
Constructor Details
-
ChannelFilter
Creates a new channel filter with the given disallowed channels.- Parameters:
disallowedChannels- The disallowed channels
-
ChannelFilter
Creates a new channel filter with a single disallowed channel.- Parameters:
disallowedChannel- The disallowed channel
-
-
Method Details
-
isTokenAllowed
Description copied from interface:TokenFilterChecks if the token should be printed.- Specified by:
isTokenAllowedin interfaceTokenFilter- Parameters:
token- The token to check- Returns:
trueif the given token should be printed
-