Adding get declaration

As described in #62 we implement a method getDeclarationAsString for constructors and methods.