@ SuppressWarnings ( "static-method" ) protected Collection < DynamicValidationComponent > createRemoteReferenceValidatorComponents ( Link it , URL url , int lineno , File currentFile , DynamicValidationContext context ) { return Collections . singleton ( new DynamicValidationComponent ( ) { @ Override public String functionName ( ) { return "Web_reference_test_" + lineno + "_" ; //$NON-NLS-1$ //$NON-NLS-2$ } @ Override public void generateValidationCode ( ITreeAppendable it ) { it . append ( "assertURLAccessibility(" ) . append ( Integer . toString ( lineno ) ) ; //$NON-NLS-1$ it . append ( ", new " ) ; //$NON-NLS-1$ it . append ( URL . class ) . append ( "(\"" ) ; //$NON-NLS-1$ it . append ( Strings . convertToJavaString ( url . toExternalForm ( ) ) ) ; it . append ( "\"));" ) ; //$NON-NLS-1$ } } ) ; }
Create a validation component for an hyper reference to a remote Internet page .