forming methoddeclaration object from string (without function arguments)