By default every Groovy class has a Map constructor, e.g.

```
class Foo {
  def a
  def b
}

// this works
new Foo(a: '1', b: '2')

```

However, it seems that as soon as you add a constructor of your own, this default constructor is not available

```
class Foo {

  Foo(Integer x) {
    println 'my constructor was called'  
  }

  def a
  def b
}

// this works
new Foo(1)

// now this doesn't work, I get the error: groovy.lang.GroovyRuntimeException: 
// failed to invoke constructor
new Foo(a: '1', b: '2')

```

**Is it possible to add your own constructor without losing the default map constructor?** I tried annotating the class with `@TupleConstructor` but it made no difference. I realise I could add the map constructor myself, e.g.

```
public Foo(Map map) {    
  map?.each { k, v -> this[k] = v }  
}

```

Though the constructor above is not identical to the default map constructor because a key in the map that does not have a corresponding property in the class will cause an exception.