private Object construct(Class baseClass, String methodName, Messages messages)
{
Location l = newLocation();
ComponentSpecification spec = new ComponentSpecification();
EnhancementOperationImpl op = new EnhancementOperationImpl(getClassResolver(), spec,
baseClass, new ClassFactoryImpl(), null);
op.addInjectedField("_messages", Messages.class, messages);
EnhanceUtils.createSimpleAccessor(op, "_messages", "messages", Messages.class, l);
Method method = findMethod(baseClass, methodName);
new MessageAnnotationWorker().performEnhancement(op, spec, method, l);
ComponentConstructor cc = op.getConstructor();
return cc.newInstance();
}