Package org.simpleframework.xml.core
Class Function
java.lang.Object
org.simpleframework.xml.core.Function
The
Function
object is used to encapsulated the method
that is called when serializing an object. This contains details
on the type of method represented and ensures that reflection is
not required each time the method is to be invoked.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
This is used to determine if the method takes the map.private final Method
This is the method that is to be invoked by the function. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
method
This is the method that is to be invoked by the function. -
contextual
private final boolean contextualThis is used to determine if the method takes the map.
-
-
Constructor Details
-
Function
Constructor for theFunction
object. This is used to create an object that wraps the provided method it ensures that no reflection is required when the method is to be called.- Parameters:
method
- this is the method that is to be wrapped by this
-
Function
Constructor for theFunction
object. This is used to create an object that wraps the provided method it ensures that no reflection is required when the method is to be called.- Parameters:
method
- this is the method that is to be wrapped by thiscontextual
- determines if the method is a contextual one
-
-
Method Details
-
call
This method used to invoke the callback method of the provided object. This will acquire the session map from the context. If the provided object is not null then this will return null.- Parameters:
context
- this is the context that contains the sessionsource
- this is the object to invoke the function on- Returns:
- this returns the result of the method invocation
- Throws:
Exception
-