|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.ext.beans.ScalarModel freemarker.ext.beans.NumberModel
freemarker.ext.beans2
package
public final class NumberModel
A class that will wrap a reflected parameterless method call into a
TemplateNumberModel
interface. It can be used directly, and is
heavily used by ObjectModel
to wrap properties of primitive
types.
Constructor Summary | |
---|---|
NumberModel(java.lang.Object object,
java.lang.reflect.Method getter)
Deprecated. Creates a new model. |
Method Summary | |
---|---|
long |
getAsNumber()
Deprecated. Calls the wrapped method, and calls longValue() on its return value. |
Methods inherited from class freemarker.ext.beans.ScalarModel |
---|
getAsObject, getAsString, isEmpty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface freemarker.template.TemplateModel |
---|
isEmpty |
Constructor Detail |
---|
public NumberModel(java.lang.Object object, java.lang.reflect.Method getter)
object
- the object on which the method will be called.
Can be null
for static methods.getter
- the method that will be called to obtain
the value of the model.Method Detail |
---|
public long getAsNumber() throws TemplateModelException
getAsNumber
in interface TemplateNumberModel
long
value of this scalar.
TemplateModelException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |