Method targetMethod = targetClass.getMethod("write", new Class [] {String.class});
Constructor constructor = targetClass.getConstructor(new Class [] {String.class});
//define method:
// String write(String message)
MethodDefinition targetMethodDef = new MethodDefinition();
ParameterDef inDef = new ParameterDef("message", Types.STRING);
ParameterDef outDef = new ParameterDef("output", Types.STRING);
targetMethodDef.setParameterDefs(new ParameterDef [] {inDef});
targetMethodDef.setReturnType(outDef);
//define constructor:
// TestClass(String prefix)
MethodDefinition constructorDef = new MethodDefinition();
ParameterDef prefixDef = new ParameterDef("prefix", Types.STRING);
constructorDef.setParameterDefs(new ParameterDef [] {prefixDef});
//define property bindings:
// void setSuffix(String suffix)
// String getValue()
PropertyBindingDef propertyDef = new PropertyBindingDef();