title: Using default methods as a base for properties of beans declared in XML?
body: <p>I have default methods, such as <code>setXxx(X x)</code> and <code>X getXxx()</code>, but spring won't recoginze those as properties. Is it possible to somehow avoid method duplication if I want to use this interface in different classes?</p>
  
  <p>Example:</p>
  
  <pre><code>public class Type {... }
  
  public interface TypeSupport {
      Type getType();
      default String getTypeName(){ 
          return getType().getName(); 
      }
      default void setTypeName(String name){
          getType().setName(name);
      }
  }
  
  public class TypedVariable implements TypeSupport {
      private Type type = new Type();
      @Override public Type getType() {
          return type;
      }
  }
  </code></pre>
  
  <p>I want to define <code>TypedVariable</code> bean in xml configuration:</p>
  
  <pre><code>&lt;bean id="typedVariable" class="com.example.TypedVariable"&gt;
      &lt;property name="typeName" value="string"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>When running, Spring fails with an error indicating that <code>TypedVariable</code> has no writeable property <code>typeName</code>.</p>