private List < Node > addComputedPropertiesReflectionCalls ( final PolymerClassDefinition cls ) { List < Node > propertySinkStatements = new ArrayList <> ( ) ; for ( MemberDefinition prop : cls . props ) { if ( prop . value . isObjectLit ( ) ) { Node computed = NodeUtil . getFirstPropMatchingKey ( prop . value , "computed" ) ; if ( computed != null && computed . isString ( ) ) { propertySinkStatements . addAll ( replaceMethodStringWithReflectedCalls ( cls . target , computed ) ) ; } } } return propertySinkStatements ; }
For any property in the Polymer property configuration object with a computed key parse the method call and path arguments and replace them with property reflection calls .