private void addReturnTypeIfMissing ( PolymerClassDefinition cls , String getterPropName , JSTypeExpression jsType ) { Node classMembers = NodeUtil . getClassMembers ( cls . definition ) ; Node getter = NodeUtil . getFirstGetterMatchingKey ( classMembers , getterPropName ) ; if ( getter != null ) { JSDocInfo info = NodeUtil . getBestJSDocInfo ( getter ) ; if ( info == null || ! info . hasReturnType ( ) ) { JSDocInfoBuilder builder = JSDocInfoBuilder . maybeCopyFrom ( info ) ; builder . recordReturnType ( jsType ) ; getter . setJSDocInfo ( builder . build ( ) ) ; } } }
Adds return type information to class getters