Class FormThemeReference.DefaultMatcher<R, E extends Throwable>
java.lang.Object
de.xima.fc.form.common.models.FormThemeReference.DefaultMatcher<R,E>
- Type Parameters:
R- The return type of the matcher functions.E- The type of exception that the matcher functions may throw.
- All Implemented Interfaces:
FormThemeReference.Matcher<R,E>
- Enclosing class:
FormThemeReference
public static class FormThemeReference.DefaultMatcher<R, E extends Throwable>
extends Object
implements FormThemeReference.Matcher<R,E>
A special type of
FormThemeReference.Matcher for a form theme that returns a given default value for each type of theme. You
can override each method as needed to return a different value.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultMatcher(R defaultValue) Creates a new default matcher that returns the given default value for each non-overridden method. -
Method Summary
Modifier and TypeMethodDescriptionCalled when the theme reference is aFormThemeReference.ClientFormTheme.Called when the theme reference is aFormThemeReference.FormThemePlugin.system(FormThemeReference.System theme) Called when the theme reference is aFormThemeReference.System.
-
Constructor Details
-
DefaultMatcher
Creates a new default matcher that returns the given default value for each non-overridden method.- Parameters:
defaultValue- The default value to return.
-
-
Method Details
-
clientFormTheme
Description copied from interface:FormThemeReference.MatcherCalled when the theme reference is aFormThemeReference.ClientFormTheme.- Specified by:
clientFormThemein interfaceFormThemeReference.Matcher<R, E extends Throwable>- Parameters:
theme- The client form theme reference.- Returns:
- The result of the function.
- Throws:
E
-
formThemePlugin
Description copied from interface:FormThemeReference.MatcherCalled when the theme reference is aFormThemeReference.FormThemePlugin.- Specified by:
formThemePluginin interfaceFormThemeReference.Matcher<R, E extends Throwable>- Parameters:
theme- The form theme plugin reference.- Returns:
- The result of the function.
- Throws:
E
-
system
Description copied from interface:FormThemeReference.MatcherCalled when the theme reference is aFormThemeReference.System.- Specified by:
systemin interfaceFormThemeReference.Matcher<R, E extends Throwable>- Parameters:
theme- The system form theme reference.- Returns:
- The result of the function.
- Throws:
E
-