title: Clojure: accessing protected methods through proxy or other means?
body: <p>I'm using the SnakeYAML Java library in my Clojure project. I would like to to the equivalent of the following in Clojure:</p>
  
  <pre><code>class DiceConstructor extends SafeConstructor {
      public DiceConstructor() {
          this.yamlConstructors.put(new Tag("!dice"), new ConstructDice());
      }
  
      private class ConstructDice extends AbstractConstruct {
          public Object construct(Node node) {
              String val = (String) constructScalar((ScalarNode) node);
              int position = val.indexOf('d');
              Integer a = new Integer(val.substring(0, position));
              Integer b = new Integer(val.substring(position + 1));
              return new Dice(a, b);
          }
      }
  }
  </code></pre>
  
  <p>To explain: I would like to create a subclass of <code>SafeConstructor</code> that accesses the protected field <code>yamlConstructors</code> of its superclass, and adds some custom subclass of <code>AbstractConstruct</code> to <code>yamlConstructors</code>.</p>
  
  <p>I was thinking to use a <code>proxy</code> for this, but it seems proxies cannot access protected fields. Are there other possibilities?</p>