public class MethodHelper extends Object implements Helper<Object>
Handlebars.registerHelpers(Object)
,
Handlebars.registerHelpers(Class)
Constructor and Description |
---|
MethodHelper(Method method,
Object source)
Creates a new
MethodHelper . |
Modifier and Type | Method and Description |
---|---|
Object |
apply(Object context,
Options options)
Apply the helper to the context.
|
public MethodHelper(Method method, Object source)
MethodHelper
.method
- The method to invoke. Required.source
- The source or instance object. Might be null.public Object apply(Object context, Options options) throws IOException
Helper
apply
in interface Helper<Object>
context
- The context object.options
- The options object.IOException
- If a template cannot be loaded.Copyright © 2021. All rights reserved.