question: void addRule ( String [ ] selector , AttributeSet declaration , boolean isLinked ) { int n = selector . length ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( selector [ 0 ] ) ; for ( int counter = 1 ; counter < n ; counter ++ ) { sb . append ( ' ' ) ; sb . append ( selector [ counter ] ) ; } String selectorName = sb . toString ( ) ; Style rule = getStyle ( selectorName ) ; if ( rule == null ) { Style altRule = addStyle ( selectorName , null ) ; synchronized ( this ) { SelectorMapping mapping = getRootSelectorMapping ( ) ; for ( int i = n - 1 ; i >= 0 ; i -- ) { mapping = mapping . getChildSelectorMapping ( selector [ i ] , true ) ; } rule = mapping . getStyle ( ) ; if ( rule == null ) { rule = altRule ; mapping . setStyle ( rule ) ; refreshResolvedRules ( selectorName , selector , rule , mapping . getSpecificity ( ) ) ; } } } if ( isLinked ) { rule = getLinkedStyle ( rule ) ; } rule . addAttributes ( declaration ) ; }
target:  Adds a rule into the StyleSheet.