Collection<AnnotatedMethod> typeMethodsOfType = beanMethodProvider.getMethods(type);
for (AnnotatedMethod typeMethod : typeMethodsOfType) {
if (!(typeMethod instanceof GetPropertyMethod)) {
throw new XOException("Only get methods are supported for projections: '" + typeMethod.getAnnotatedElement().getName() + "'.");
}
PropertyMethod propertyMethod = (PropertyMethod) typeMethod;
GetMethod proxyMethod = new GetMethod(propertyMethod.getName(), propertyMethod.getType());
addProxyMethod(proxyMethod, propertyMethod.getAnnotatedElement());
}
}
addMethod(new AsMethod(), CompositeObject.class, "as", Class.class);
addMethod(new GetDelegateMethod<Map<String, Object>>(), CompositeObject.class, "getDelegate");
addMethod(new com.buschmais.xo.impl.proxy.query.row.GetMethod(), CompositeRowObject.class, "get", String.class, Class.class);