public RelationProxyMethodService(SessionContext<?, Entity, ?, ?, ?, Relation, ?, ?> sessionContext) {
for (TypeMetadata typeMetadata : sessionContext.getMetadataProvider().getRegisteredMetadata()) {
for (MethodMetadata methodMetadata : typeMetadata.getProperties()) {
AnnotatedMethod typeMethod = methodMetadata.getAnnotatedMethod();
if (methodMetadata instanceof UnsupportedOperationMethodMetadata) {
addProxyMethod(new UnsupportedOperationMethod((UnsupportedOperationMethodMetadata) methodMetadata), typeMethod.getAnnotatedElement());
} else if (methodMetadata instanceof ImplementedByMethodMetadata) {
ImplementedByMethodMetadata implementedByMethodMetadata = (ImplementedByMethodMetadata) methodMetadata;
Class<? extends ProxyMethod> proxyMethodType = implementedByMethodMetadata.getProxyMethodType();
try {
addProxyMethod(proxyMethodType.newInstance(), typeMethod.getAnnotatedElement());