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");