private static void addAttribute ( Element element , Set < Attr > attributes , Object value ) { Attr attr = ( Attr ) value ; if ( ! attributes . add ( attr ) ) { throw new TemplateException ( "Invalid element |%s|. It has both static attribute |%s| and attribute operator." , element , attr . getName ( ) ) ; } }
Helper method to add an attribute to a set .