Class ChannelFilter<T extends JobParameters>
java.lang.Object
io.github.douira.glsl_transformer.transform.LifecycleUserImpl<T>
io.github.douira.glsl_transformer.print.filter.TokenFilter<T>
io.github.douira.glsl_transformer.print.filter.ChannelFilter<T>
- All Implemented Interfaces:
LifecycleUser<T>
The channel filter accepts all tokens that are not from a lexer channel that
is on the given list of disallowed channels.
-
Constructor Summary
ConstructorsConstructorDescriptionChannelFilter(TokenChannel disallowedChannel) Creates a new channel filter with a single disallowed channel.ChannelFilter(EnumSet<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 io.github.douira.glsl_transformer.print.filter.TokenFilter
join, resetStateMethods inherited from class io.github.douira.glsl_transformer.transform.LifecycleUserImpl
getPlanner, isInitialized, setInitialized, setPlannerMethods 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.transform.LifecycleUser
getJobParameters, getLexer, getParser, getRootNode, init, initOnce
-
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 class:TokenFilterChecks if the token should be printed.- Specified by:
isTokenAllowedin classTokenFilter<T extends JobParameters>- Parameters:
token- The token to check- Returns:
trueif the given token should be printed
-