Package de.xima.fc.form.common.models
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 ofFormThemeReference.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
Constructors Constructor Description DefaultMatcher(R defaultValue)
Creates a new default matcher that returns the given default value for each non-overridden method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description R
clientFormTheme(FormThemeReference.ClientFormTheme theme)
Called when the theme reference is aFormThemeReference.ClientFormTheme
.R
formThemePlugin(FormThemeReference.FormThemePlugin theme)
Called when the theme reference is aFormThemeReference.FormThemePlugin
.R
system(FormThemeReference.System theme)
Called when the theme reference is aFormThemeReference.System
.
-
-
-
Constructor Detail
-
DefaultMatcher
public DefaultMatcher(R defaultValue)
Creates a new default matcher that returns the given default value for each non-overridden method.- Parameters:
defaultValue
- The default value to return.
-
-
Method Detail
-
clientFormTheme
public R clientFormTheme(FormThemeReference.ClientFormTheme theme) throws E extends Throwable
Description copied from interface:FormThemeReference.Matcher
Called when the theme reference is aFormThemeReference.ClientFormTheme
.- Specified by:
clientFormTheme
in interfaceFormThemeReference.Matcher<R,E extends Throwable>
- Parameters:
theme
- The client form theme reference.- Returns:
- The result of the function.
- Throws:
E
- The exception that may be thrown by the function.E extends Throwable
-
formThemePlugin
public R formThemePlugin(FormThemeReference.FormThemePlugin theme) throws E extends Throwable
Description copied from interface:FormThemeReference.Matcher
Called when the theme reference is aFormThemeReference.FormThemePlugin
.- Specified by:
formThemePlugin
in interfaceFormThemeReference.Matcher<R,E extends Throwable>
- Parameters:
theme
- The form theme plugin reference.- Returns:
- The result of the function.
- Throws:
E
- The exception that may be thrown by the function.E extends Throwable
-
system
public R system(FormThemeReference.System theme) throws E extends Throwable
Description copied from interface:FormThemeReference.Matcher
Called when the theme reference is aFormThemeReference.System
.
-
-