public static <T extends Annotation> T getProxy(Class<T> propertySet, PropertyMap propertyMap)
    {
        assert propertySet != null && propertyMap != null;

        if (!propertySet.isAnnotation())
            throw new IllegalArgumentException(propertySet + " is not an annotation type");

        return (T)Proxy.newProxyInstance(propertySet.getClassLoader(),
                                         new Class [] {propertySet },
                                         new PropertySetProxy(propertySet, propertyMap));
    }
public static < T extends Annotation > T getProxy ( Class < T > propertySet , PropertyMap propertyMap ) { assert propertySet != null && propertyMap != null ; if ( ! propertySet . isAnnotation ( ) ) throw new IllegalArgumentException ( propertySet + " is not an annotation type" ) ; return ( T ) Proxy . newProxyInstance ( propertySet . getClassLoader ( ) , new Class [ ] { propertySet } , new PropertySetProxy ( propertySet , propertyMap ) ) ; }
Creates a new proxy instance implementing the PropertySet interface and backed
by the data from the property map.

@param propertySet an annotation type that has the PropertySet meta-annotation
@param propertyMap the PropertyMap containing property values backing the proxy
@return proxy that implements the PropertySet interface