Class StringFilter<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.StringFilter<T>
- All Implemented Interfaces:
LifecycleUser<T>
The string token filter disallows tokens that are matched against a set of
disallowed strings.
-
Constructor Summary
ConstructorsConstructorDescriptionStringFilter(String disallowed) Creates a new string token filter with a single disallowed string.StringFilter(String... disallowed) Creates a new string token filter with an array of disallowed strings.StringFilter(Set<String> disallowed) Creates a new string token filter with a set of disallowed strings. -
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
-
StringFilter
Creates a new string token filter with a set of disallowed strings.- Parameters:
disallowed- The strings to match
-
StringFilter
Creates a new string token filter with a single disallowed string.- Parameters:
disallowed- The string to match
-
StringFilter
Creates a new string token filter with an array of disallowed strings.- Parameters:
disallowed- The stirngs to match
-
-
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
-