<commit_before>package org.nasdanika.webtest;

import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.openqa.selenium.phantomjs.PhantomJSDriver;

/**
 * If a method or type is annotated with this annotation and the web driver is an instance of {@link SketchWebDriver}, the framework uses
 * sketches as screenshots. Applying the annotation to a type has the same semantic as applying it to all type constructors. 
 * 
 * @author <NAME>
 *
 */
@Repeatable(Sketches.class)
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Sketch {

	/**
	 * Value is an alias for <code>after</code> sketch. If both <code>value</code> and <code>after</code> attributes are specified, <code>after</code> takes precedence. 
	 * @return
	 */
	String value() default ""; 
	
	/**
	 * Location of a sketch for the before screenshot. The location is resolved relative to the annotated method's declaring class, i.e. a sketch can be loaded from 
	 * a classloader resource, if the location is relative, or from a regular URL. If the location ends with <code>.png</code> then it is treated as a PNG file and 
	 * loaded AS-IS. If the location ends with <code>.plantuml</code> it is treated as a <a href="http://plantuml.com/">PlantUML</a> diagram specification, e.g. 
	 * a <a href="http://plantuml.com/salt.html">Salt</a> wireframe. The specification gets rendered to a PNG file. Otherwise the location is treated as a web browser URL which is
	 * retrieved using {@link PhantomJSDriver} behind the scenes. In this case classloader resources cannot be used as locations. 
	 * @return
	 */
	String before() default "";
	
	/**
	 * Location of a sketch for the after screenshot.
	 * @return
	 */
	String after() default "";
	
	/**
	 * Location of a sketch for the exception screenshot.
	 * @return
	 */
	String exception() default "";
	
	/**
	 * Optional window size. It is applicable only to locations retrieved by {@link PhantomJSDriver}. The attribute value shall be a two-dimensional array with the first element 
	 * specifying the window width, and the last - window height.
	 * @return
	 */
	int[] windowSize() default {};
	
	/**
	 * Selector to match {@link SketchWebDriver} selector. Blank selector matches any SketchWebDriver selector. 
	 * @return
	 */
	String selector() default "";
		
}<commit_msg>JavaDoc clarification.<commit_after>package org.nasdanika.webtest;

import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.openqa.selenium.phantomjs.PhantomJSDriver;

/**
 * If a method or type is annotated with this annotation and the web driver is an instance of {@link SketchWebDriver}, the framework uses
 * sketches as screenshots. Applying the annotation to a type has the same semantic as applying it to all type constructors. 
 * 
 * @author <NAME>
 *
 */
@Repeatable(Sketches.class)
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Sketch {

	/**
	 * Value is an alias for <code>after</code> sketch. If both <code>value</code> and <code>after</code> attributes are specified, <code>after</code> takes precedence. 
	 * @return
	 */
	String value() default ""; 
	
	/**
	 * Location of a sketch for the before screenshot. The location is resolved relative to the annotated method's declaring class, i.e. a sketch can be loaded from 
	 * a classloader resource, if the location is relative, or from a regular URL. If the location ends with <code>.png</code> then it is treated as a PNG file and 
	 * loaded AS-IS. If the location ends with <code>.plantuml</code> it is treated as a <a href="http://plantuml.com/">PlantUML</a> diagram specification, e.g. 
	 * a <a href="http://plantuml.com/salt.html">Salt</a> wireframe. The specification gets rendered to a PNG file. Otherwise the location is treated as a web browser URL which is
	 * retrieved using {@link PhantomJSDriver} behind the scenes. In this case classloader resources cannot be used as locations. 
	 * @return
	 */
	String before() default "";
	
	/**
	 * Location of a sketch for the after screenshot.
	 * @return
	 */
	String after() default "";
	
	/**
	 * Location of a sketch for the exception screenshot.
	 * @return
	 */
	String exception() default "";
	
	/**
	 * Optional window size. It is applicable only to locations retrieved by {@link PhantomJSDriver}. The attribute value shall be a two-dimensional array with the first element 
	 * specifying the window width, and the last - window height.
	 * @return
	 */
	int[] windowSize() default {};
	
	/**
	 * Selector to match {@link SketchWebDriver} selector. Blank selector matches any SketchWebDriver selector. Sketch annotations are matched in the order of definition. 
	 * @return
	 */
	String selector() default "";
		
}
{'fraction_non_alphanumeric': 0.1001980198019802, 'fraction_numerical': 0.0, 'mean_word_length': 3.976354679802956, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7148502', 'n_tokens_mistral': 1490, 'n_tokens_neox': 1330, 'n_words': 578}