private boolean verifySetCssNameMapping ( Node methodName , Node firstArg ) { DiagnosticType diagnostic = null ; if ( firstArg == null ) { diagnostic = NULL_ARGUMENT_ERROR ; } else if ( ! firstArg . isObjectLit ( ) ) { diagnostic = EXPECTED_OBJECTLIT_ERROR ; } else if ( firstArg . getNext ( ) != null ) { Node secondArg = firstArg . getNext ( ) ; if ( ! secondArg . isString ( ) ) { diagnostic = EXPECTED_STRING_ERROR ; } else if ( secondArg . getNext ( ) != null ) { diagnostic = TOO_MANY_ARGUMENTS_ERROR ; } } if ( diagnostic != null ) { compiler . report ( JSError . make ( methodName , diagnostic , methodName . getQualifiedName ( ) ) ) ; return false ; } return true ; }
Verifies that setCssNameMapping is called with the correct methods .