THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
public void configure(InstanceManager im, Element metadata, Dictionary configuration) { ... ManipulationMetadata manip = new ManipulationMetadata(metadata); ... } |
Getting Metadata
From the manipulation metadata, you can query manipulation information by using following methods:
...
You often need to invoke method on the POJO objects. iPOJO provides an helper class, named Callback, allow you to manage this invocation easily. You can obtain a Callback object from the Method Metadata. By this way, you are sure that the method exists in the implementation. To create the callback, use the following code:
Code Block |
---|
ManipulationMetadata manip = new ManipulationMetadata(metadata); MethodMetadata method = manip.getMethod("your_method_name"); Callback cb = new Callback(method, im); |
Then you can directly invoke your method:
Code Block |
---|
... Object[] args = ...; // Build your argument array cb.call(args); ... |
Types & Reflective Types
...