@Singleton @Named public class PojoPathNamedFunctionToString extends AbstractPojoPathFunction<Object,String> implements PojoPathNamedFunction<Object,String>
PojoPathNamedFunction
that performs a Object.toString()
on
the input-object.FUNCTION_NAME_PREFIX
Constructor and Description |
---|
PojoPathNamedFunctionToString()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
get(Object actual,
String functionName,
PojoPathContext context)
This method gets the value of this function.
|
Class<Object> |
getInputClass()
This method gets the input-type of this function.
|
String |
getName()
This method gets the name of this function.
|
Class<String> |
getValueClass()
This method gets the output-type (or return-type) of this function.
|
create, getFunctionDescription, isDeterministic, set, toString
createLogger, doInitialize, getLogger
doInitialized, getInitializationState, initialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
create, isDeterministic, set
public PojoPathNamedFunctionToString()
public Class<Object> getInputClass()
Pojo
s this function operates on.getInputClass
in interface PojoPathFunction<Object,String>
public Class<String> getValueClass()
input
-
Pojo
.getValueClass
in interface PojoPathFunction<Object,String>
public String getName()
PojoPathNavigator
implementation. segment
.getName
in interface PojoPathNamedFunction<Object,String>
PojoPathFunction.FUNCTION_NAME_PREFIX
.public String get(Object actual, String functionName, PojoPathContext context)
PojoPathNavigator
.
get
independent of the
PojoPathMode
. A regular implementation should only return what is already there. However in
specific cases this may NOT (initially) be available from the given Pojo
actual
and therefore be retrieved from somewhere else (e.g. a database using a primary key
given via a property
of the given context
). Further
it can be legal to modify the actual
Pojo
e.g. by attaching
the externally retrieved result.get
in interface PojoPathFunction<Object,String>
get
in class AbstractPojoPathFunction<Object,String>
actual
- is the actual Pojo
where this function is invoked on.
Typically the returned value should be retrieved via this object.functionName
- is the name under which this PojoPathFunction
was invoked via the
PojoPathNavigator
excluding the PojoPathFunction.FUNCTION_NAME_PREFIX
.context
- is the PojoPathContext
providing additional context information. Objects traversed
between actual
and the returned value should be
recognized
via the
recognizer
.null
if NOT available.Copyright © 2001–2014 mmm-Team. All rights reserved.