Added support for java7 setAttribtues