Add basic metaclass support for clamping

Requires Jim's metaclass patch in Jython