public static void generateJavaDocForContentProvider ( final SQLiteModelMethod method , MethodSpec . Builder methodBuilder ) { // javadoc String operation = method . jql . operationType . toString ( ) ; methodBuilder . addJavadoc ( "<h1>Content provider URI ($L operation):</h1>\n" , operation ) ; methodBuilder . addJavadoc ( "<pre>$L</pre>\n\n" , method . contentProviderUriTemplate . replace ( "*" , "[*]" ) ) ; methodBuilder . addJavadoc ( "<h2>JQL $L for Content Provider</h2>\n" , operation ) ; methodBuilder . addJavadoc ( "<pre>$L</pre>\n\n" , method . jql . value ) ; methodBuilder . addJavadoc ( "<h2>SQL $L for Content Provider</h2>\n" , operation ) ; String sql = JQLChecker . getInstance ( ) . replace ( method , method . jql , new JQLReplacerListenerImpl ( method ) { @ Override public String onColumnName ( String columnName ) { SQLProperty tempProperty = currentEntity . get ( columnName ) ; AssertKripton . assertTrueOrUnknownPropertyInJQLException ( tempProperty != null , method , columnName ) ; return tempProperty . columnName ; } @ Override public String onColumnAlias ( String alias ) { SQLProperty tempProperty = currentEntity . findPropertyByName ( alias ) ; AssertKripton . assertTrueOrUnknownPropertyInJQLException ( tempProperty != null , method , alias ) ; return tempProperty . columnName ; } } ) ; methodBuilder . addJavadoc ( "<pre>$L</pre>\n\n" , sql ) ; if ( method . contentProviderUriVariables . size ( ) > 0 ) { methodBuilder . addJavadoc ( "<h3>Path variables defined:</h3>\n<ul>\n" ) ; for ( ContentUriPlaceHolder variable : method . contentProviderUriVariables ) { methodBuilder . addJavadoc ( "<li><strong>" + SqlAnalyzer . PARAM_PREFIX + "$L" + SqlAnalyzer . PARAM_SUFFIX + "</strong> at path segment $L</li>\n" , variable . value , variable . pathSegmentIndex ) ; } methodBuilder . addJavadoc ( "</ul>\n\n" ) ; } if ( ! method . hasDynamicWhereConditions ( ) ) { methodBuilder . addJavadoc ( "<p><strong>Dynamic where statement is ignored, due no param with @$L was added.</strong></p>\n\n" , BindSqlDynamicWhere . class . getSimpleName ( ) ) ; } methodBuilder . addJavadoc ( "<p><strong>In URI, * is replaced with [*] for javadoc rapresentation</strong></p>\n\n" ) ; }
Generate java doc for content provider .