public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Class<?> declaringClass = method.getDeclaringClass(); if (Object.class.equals(declaringClass)) return handleObjectInvocation(method.getName(), args); Type returnType = method.getGenericReturnType(); // size if(method.getName().equals("size")) return compositeValue.values().size(); MetaValue value = compositeValue.get(getCompositeDataKey(method)); return factory.unwrap(value, returnType); }