text
stringlengths 30
1.67M
|
|---|
<s> package cuke4duke . internal . jvmclass ; public class CantTransform extends RuntimeException { public CantTransform ( Object arg , Class < ? > parameterType ) { super ( "<STR_LIT>" + arg + "<STR_LIT:U+0020(>" + arg . getClass ( ) + "<STR_LIT>" + parameterType + "<STR_LIT>" ) ; } } </s>
|
<s> package cuke4duke . internal . jvmclass ; import cuke4duke . internal . language . LanguageMixin ; public interface ClassLanguageMixin extends LanguageMixin { void activate ( ClassAnalyzer analyzer ) ; } </s>
|
<s> package cuke4duke . internal . jvmclass ; import cuke4duke . StepMother ; import org . picocontainer . MutablePicoContainer ; import org . picocontainer . PicoBuilder ; import java . util . ArrayList ; import java . util . List ; import java . lang . reflect . Modifier ; public class PicoFactory implements ObjectFactory { private MutablePicoContainer pico ; private final List < Class < ? > > classes = new ArrayList < Class < ? > > ( ) ; private final List < Object > instances = new ArrayList < Object > ( ) ; public void createObjects ( ) { pico = new PicoBuilder ( ) . withCaching ( ) . build ( ) ; for ( Class < ? > clazz : classes ) { pico . addComponent ( clazz ) ; } for ( Object instance : instances ) { pico . addComponent ( instance ) ; } pico . start ( ) ; } public void disposeObjects ( ) { pico . stop ( ) ; pico . dispose ( ) ; } public boolean canHandle ( Class < ? > clazz ) { return true ; } public void addClass ( Class < ? > clazz ) { classes . add ( clazz ) ; } public void addStepMother ( StepMother instance ) { instances . add ( instance ) ; } public < T > T getComponent ( Class < T > type ) { return pico . getComponent ( type ) ; } public List < Class < ? > > getClasses ( ) { return classes ; } } </s>
|
<s> package cuke4duke . internal . jvmclass ; import com . google . inject . * ; import cuke4duke . StepMother ; import java . util . ArrayList ; import java . util . HashMap ; import java . util . List ; import java . util . Map ; import java . lang . reflect . Modifier ; public class GuiceFactory implements ObjectFactory { private static final String CONFIG_GUICE_MODULE = "<STR_LIT>" ; private final List < Module > modules = new ArrayList < Module > ( ) ; private final List < Class < ? > > classes = new ArrayList < Class < ? > > ( ) ; private final Map < Class < ? > , Object > instances = new HashMap < Class < ? > , Object > ( ) ; public GuiceFactory ( ) throws Throwable { this ( System . getProperty ( CONFIG_GUICE_MODULE , null ) ) ; } public GuiceFactory ( String moduleClassName ) throws Throwable { modules . add ( ( Module ) Class . forName ( moduleClassName ) . newInstance ( ) ) ; } public boolean canHandle ( Class < ? > clazz ) { return Modifier . isStatic ( clazz . getModifiers ( ) ) || clazz . getEnclosingClass ( ) == null ; } public void addClass ( Class < ? > clazz ) { classes . add ( clazz ) ; } public void addStepMother ( StepMother stepMother ) { modules . add ( new StepMotherModule ( stepMother ) ) ; } public void createObjects ( ) { Injector injector = Guice . createInjector ( modules ) ; for ( Class < ? > clazz : classes ) { try { instances . put ( clazz , injector . getInstance ( clazz ) ) ; } catch ( ConfigurationException e ) { System . err . println ( "<STR_LIT>" + clazz . getCanonicalName ( ) + "<STR_LIT>" + e . getLocalizedMessage ( ) ) ; } } } public void disposeObjects ( ) { instances . clear ( ) ; } @ SuppressWarnings ( "<STR_LIT:unchecked>" ) public < T > T getComponent ( Class < T > clazz ) { return ( T ) instances . get ( clazz ) ; } public List < Class < ? > > getClasses ( ) { return classes ; } class StepMotherModule extends AbstractModule { private Provider < ? extends StepMother > stepMotherProvider ; public StepMotherModule ( StepMother stepMother ) { stepMotherProvider = new StepMotherProvider ( stepMother ) ; } @ Override protected void configure ( ) { bind ( StepMother . class ) . toProvider ( stepMotherProvider ) ; } } class StepMotherProvider implements Provider < StepMother > { private StepMother stepMother ; public StepMotherProvider ( StepMother stepMother ) { this . stepMother = stepMother ; } public StepMother get ( ) { return stepMother ; } } } </s>
|
<s> package cuke4duke . internal . jvmclass ; import cuke4duke . Scenario ; import cuke4duke . StepMother ; import cuke4duke . internal . language . AbstractProgrammingLanguage ; import cuke4duke . internal . language . Transformable ; import cuke4duke . spi . ExceptionFactory ; import cuke4duke . spi . jruby . JRuby ; import java . lang . reflect . Constructor ; import java . lang . reflect . InvocationTargetException ; import java . lang . reflect . Method ; import java . lang . reflect . Modifier ; import java . util . HashMap ; import java . util . List ; import java . util . Locale ; import java . util . Map ; public class ClassLanguage extends AbstractProgrammingLanguage { private final ObjectFactory objectFactory ; private final List < ClassAnalyzer > analyzers ; private final Map < Class < ? > , Transformable > transformers = new HashMap < Class < ? > , Transformable > ( ) ; public ClassLanguage ( ClassLanguageMixin languageMixin , ExceptionFactory exceptionFactory , StepMother stepMother , List < ClassAnalyzer > analyzers ) throws Throwable { this ( languageMixin , exceptionFactory , stepMother , analyzers , createObjectFactory ( ) ) ; } public ClassLanguage ( ClassLanguageMixin languageMixin , ExceptionFactory exceptionFactory , StepMother stepMother , List < ClassAnalyzer > analyzers , ObjectFactory objectFactory ) throws Throwable { super ( languageMixin , exceptionFactory ) ; this . analyzers = analyzers ; this . objectFactory = objectFactory ; objectFactory . addStepMother ( stepMother ) ; for ( ClassAnalyzer analyzer : analyzers ) { for ( Class < ? > clazz : analyzer . alwaysLoad ( ) ) { if ( objectFactory . canHandle ( clazz ) ) { objectFactory . addClass ( clazz ) ; } } } } public void addTransform ( Class < ? > returnType , Transformable javaTransform ) { transformers . put ( returnType , javaTransform ) ; } @ Override protected Object customTransform ( Object arg , Class < ? > parameterType , Locale locale ) throws Throwable { Transformable transformer = transformers . get ( parameterType ) ; return transformer == null ? null : transformer . transform ( arg , locale ) ; } @ Override public void load_code_file ( String classFile ) throws Throwable { Class < ? > clazz = loadClass ( classFile ) ; addClass ( clazz ) ; } public void addClass ( Class < ? > clazz ) { if ( ! Modifier . isAbstract ( clazz . getModifiers ( ) ) && objectFactory . canHandle ( clazz ) ) { objectFactory . addClass ( clazz ) ; } } @ Override public void begin_scenario ( Scenario scenario ) throws Throwable { clearHooksAndStepDefinitions ( ) ; objectFactory . createObjects ( ) ; for ( ClassAnalyzer analyzer : analyzers ) { analyzer . populateStepDefinitionsAndHooks ( objectFactory , this ) ; } } @ Override public void end_scenario ( ) throws Throwable { objectFactory . disposeObjects ( ) ; } private Class < ? > loadClass ( String classFile ) throws ClassNotFoundException { String withoutExt = classFile . substring ( <NUM_LIT:0> , classFile . length ( ) - "<STR_LIT:.class>" . length ( ) ) ; String [ ] pathElements = withoutExt . split ( "<STR_LIT>" ) ; String className = null ; for ( int i = pathElements . length - <NUM_LIT:1> ; i >= <NUM_LIT:0> ; i -- ) { if ( className == null ) { className = pathElements [ i ] ; } else { className = pathElements [ i ] + "<STR_LIT:.>" + className ; } try { return JRuby . getRuntime ( ) . getJRubyClassLoader ( ) . loadClass ( className ) ; } catch ( ClassNotFoundException ignore ) { } } throw new ClassNotFoundException ( "<STR_LIT>" + classFile ) ; } private static ObjectFactory createObjectFactory ( ) throws Throwable { String objectFactoryClassName = System . getProperty ( "<STR_LIT>" , "<STR_LIT>" ) ; Class < ? > ofc = JRuby . getRuntime ( ) . getJRubyClassLoader ( ) . loadClass ( objectFactoryClassName ) ; Constructor < ? > ctor = ofc . getConstructor ( ) ; try { return ( ObjectFactory ) ctor . newInstance ( ) ; } catch ( InvocationTargetException e ) { throw e . getTargetException ( ) ; } } public Object invokeHook ( Method method , Scenario scenario ) throws Throwable { Object [ ] args = new Object [ <NUM_LIT:0> ] ; if ( method . getParameterTypes ( ) . length == <NUM_LIT:1> ) { args = new Object [ ] { scenario } ; } else if ( method . getParameterTypes ( ) . length > <NUM_LIT:1> ) { throw cucumberArityMismatchError ( "<STR_LIT>" + method ) ; } return invoke ( method , args , Locale . getDefault ( ) ) ; } public Object invoke ( Method method , Object [ ] args , Locale locale ) throws Throwable { Object target = objectFactory . getComponent ( method . getDeclaringClass ( ) ) ; Object [ ] transformedArgs = transform ( args , method . getParameterTypes ( ) , locale ) ; return methodInvoker . invoke ( method , target , transformedArgs ) ; } public List < Class < ? > > getClasses ( ) { return objectFactory . getClasses ( ) ; } } </s>
|
<s> package cuke4duke . internal . jvmclass ; import cuke4duke . StepMother ; import org . springframework . beans . factory . FactoryBean ; import org . springframework . beans . factory . InitializingBean ; import org . springframework . context . support . AbstractApplicationContext ; import org . springframework . context . support . ClassPathXmlApplicationContext ; import org . springframework . context . support . StaticApplicationContext ; import java . util . ArrayList ; import java . util . List ; import java . lang . reflect . Modifier ; public class SpringFactory implements ObjectFactory { private final List < Class < ? > > classes = new ArrayList < Class < ? > > ( ) ; private AbstractApplicationContext appContext ; private static ThreadLocal < StepMother > mother = new ThreadLocal < StepMother > ( ) ; public void createObjects ( ) { appContext . refresh ( ) ; } public void disposeObjects ( ) { } public boolean canHandle ( Class < ? > clazz ) { return true ; } public void addClass ( Class < ? > clazz ) { classes . add ( clazz ) ; } public void addStepMother ( StepMother instance ) { if ( appContext == null ) { mother . set ( instance ) ; StaticApplicationContext parent = new StaticApplicationContext ( ) ; parent . registerSingleton ( "<STR_LIT>" , StepMotherFactory . class ) ; parent . refresh ( ) ; String springXml = System . getProperty ( "<STR_LIT>" , "<STR_LIT>" ) ; appContext = new ClassPathXmlApplicationContext ( new String [ ] { springXml } , parent ) ; if ( mother . get ( ) != null ) { throw new IllegalStateException ( "<STR_LIT>" ) ; } } } @ SuppressWarnings ( "<STR_LIT:unchecked>" ) public < T > T getComponent ( Class < T > type ) { List beans = new ArrayList ( appContext . getBeansOfType ( type ) . values ( ) ) ; if ( beans . size ( ) == <NUM_LIT:1> ) { return ( T ) beans . get ( <NUM_LIT:0> ) ; } else { throw new RuntimeException ( "<STR_LIT>" + beans . size ( ) + "<STR_LIT>" + type + "<STR_LIT>" ) ; } } public List < Class < ? > > getClasses ( ) { return classes ; } static class StepMotherFactory implements FactoryBean , InitializingBean { private StepMother mother ; public void afterPropertiesSet ( ) throws Exception { this . mother = SpringFactory . mother . get ( ) ; SpringFactory . mother . set ( null ) ; } public Object getObject ( ) throws Exception { return mother ; } public Class < StepMother > getObjectType ( ) { return StepMother . class ; } public boolean isSingleton ( ) { return true ; } } } </s>
|
<s> package cuke4duke . internal . jvmclass ; public interface ClassAnalyzer { void populateStepDefinitionsAndHooks ( ObjectFactory objectFactory , ClassLanguage classLanguage ) throws Throwable ; Class < ? > [ ] alwaysLoad ( ) ; } </s>
|
<s> package cuke4duke . internal . jvmclass ; import java . math . BigDecimal ; import java . math . BigInteger ; import java . text . NumberFormat ; import java . text . ParseException ; import java . util . Locale ; public class DefaultJvmTransforms { public static Object transformStringToObject ( String argument , Locale locale ) { return argument ; } public static int transformStringToInt ( String argument , Locale locale ) throws ParseException { return NumberFormat . getInstance ( locale ) . parse ( argument ) . intValue ( ) ; } public static Integer transformStringToInteger ( String argument , Locale locale ) throws ParseException { return transformStringToInt ( argument , locale ) ; } public static long transformStringToLongPrimitive ( String argument , Locale locale ) throws ParseException { return NumberFormat . getInstance ( locale ) . parse ( argument ) . longValue ( ) ; } public static Long transformStringToLong ( String argument , Locale locale ) throws ParseException { return transformStringToLongPrimitive ( argument , locale ) ; } public static double transformStringToDoublePrimitive ( String argument , Locale locale ) throws ParseException { return NumberFormat . getInstance ( locale ) . parse ( argument ) . doubleValue ( ) ; } public static Double transformStringToDouble ( String argument , Locale locale ) throws ParseException { return transformStringToDoublePrimitive ( argument , locale ) ; } public static float transformStringToFloatPrimitive ( String argument , Locale locale ) throws ParseException { return NumberFormat . getInstance ( locale ) . parse ( argument ) . floatValue ( ) ; } public static Float transformStringToFloat ( String argument , Locale locale ) throws ParseException { return transformStringToFloatPrimitive ( argument , locale ) ; } public static short transformStringToShortPrimitive ( String argument , Locale locale ) throws ParseException { return NumberFormat . getInstance ( locale ) . parse ( argument ) . shortValue ( ) ; } public static Short transformStringToShort ( String argument , Locale locale ) throws ParseException { return transformStringToShortPrimitive ( argument , locale ) ; } public static byte transformStringToBytePrimitive ( String argument , Locale locale ) throws ParseException { return NumberFormat . getInstance ( locale ) . parse ( argument ) . byteValue ( ) ; } public static Byte transformStringToByte ( String argument , Locale locale ) throws ParseException { return transformStringToBytePrimitive ( argument , locale ) ; } public static char transformStringToChar ( String argument , Locale locale ) { return argument . charAt ( <NUM_LIT:0> ) ; } public static Character transformStringToCharacters ( String argument , Locale locale ) { return argument . charAt ( <NUM_LIT:0> ) ; } public static BigDecimal transformStringToBigDecimal ( String argument , Locale locale ) throws ParseException { return BigDecimal . valueOf ( transformStringToDoublePrimitive ( argument , locale ) ) ; } public static BigInteger transformStringToBigInteger ( String argument , Locale locale ) throws ParseException { return BigInteger . valueOf ( transformStringToLongPrimitive ( argument , locale ) ) ; } public static boolean transformStringToBooleanPrimitive ( String argument , Locale locale ) { return Boolean . valueOf ( argument ) ; } public static Boolean transformStringToBoolean ( String argument , Locale locale ) { return Boolean . valueOf ( argument ) ; } } </s>
|
<s> package cuke4duke . internal . jvmclass ; import cuke4duke . StepMother ; import java . util . List ; public interface ObjectFactory { void createObjects ( ) ; void disposeObjects ( ) ; boolean canHandle ( Class < ? > clazz ) ; void addClass ( Class < ? > clazz ) ; void addStepMother ( StepMother mother ) ; < T > T getComponent ( Class < T > type ) ; List < Class < ? > > getClasses ( ) ; } </s>
|
<s> package cuke4duke . internal . java ; import cuke4duke . annotation . After ; import cuke4duke . annotation . Before ; import cuke4duke . annotation . Order ; import cuke4duke . annotation . Transform ; import cuke4duke . internal . Utils ; import cuke4duke . internal . java . annotation . StepDef ; import cuke4duke . internal . jvmclass . ClassAnalyzer ; import cuke4duke . internal . jvmclass . ClassLanguage ; import cuke4duke . internal . jvmclass . ObjectFactory ; import java . lang . annotation . Annotation ; import java . lang . reflect . Method ; import java . util . * ; import java . util . regex . Pattern ; public class JavaAnalyzer implements ClassAnalyzer { private final MethodFormat methodFormat ; private static final String [ ] NO_TAGS = new String [ <NUM_LIT:0> ] ; public JavaAnalyzer ( ) { this . methodFormat = new MethodFormat ( System . getProperty ( "<STR_LIT>" , "<STR_LIT>" ) ) ; } public void populateStepDefinitionsAndHooks ( ObjectFactory objectFactory , ClassLanguage classLanguage ) throws Throwable { for ( Method method : getOrderedMethods ( classLanguage ) ) { registerBeforeMaybe ( method , classLanguage ) ; registerAfterMaybe ( method , classLanguage ) ; registerStepDefinitionsFromAnnotations ( method , classLanguage ) ; registerTransformMaybe ( method , classLanguage ) ; } } private void registerTransformMaybe ( Method method , ClassLanguage classLanguage ) { if ( method . isAnnotationPresent ( Transform . class ) ) { classLanguage . addTransform ( method . getReturnType ( ) , new JavaTransform ( classLanguage , method ) ) ; } } public Class < ? > [ ] alwaysLoad ( ) { return new Class < ? > [ <NUM_LIT:0> ] ; } private List < Method > getOrderedMethods ( ClassLanguage classLanguage ) { Set < Method > methods = new HashSet < Method > ( ) ; for ( Class < ? > clazz : classLanguage . getClasses ( ) ) { methods . addAll ( Arrays . asList ( clazz . getMethods ( ) ) ) ; } List < Method > sortedMethods = new ArrayList < Method > ( methods ) ; Collections . sort ( sortedMethods , new Comparator < Method > ( ) { public int compare ( Method m1 , Method m2 ) { return order ( m1 ) - order ( m2 ) ; } private int order ( Method m ) { Order order = m . getAnnotation ( Order . class ) ; return ( order == null ) ? Integer . MAX_VALUE : order . value ( ) ; } } ) ; return sortedMethods ; } private void registerBeforeMaybe ( Method method , ClassLanguage classLanguage ) { if ( method . isAnnotationPresent ( Before . class ) ) { String [ ] tagExpressions = method . getAnnotation ( Before . class ) . value ( ) ; if ( "<STR_LIT>" . equals ( tagExpressions [ <NUM_LIT:0> ] ) ) { tagExpressions = NO_TAGS ; } classLanguage . addBeforeHook ( new JavaHook ( classLanguage , method , Arrays . asList ( tagExpressions ) ) ) ; } } private void registerAfterMaybe ( Method method , ClassLanguage classLanguage ) { if ( method . isAnnotationPresent ( After . class ) ) { String [ ] tagExpressions = method . getAnnotation ( After . class ) . value ( ) ; if ( "<STR_LIT>" . equals ( tagExpressions [ <NUM_LIT:0> ] ) ) { tagExpressions = NO_TAGS ; } classLanguage . addAfterHook ( new JavaHook ( classLanguage , method , Arrays . asList ( tagExpressions ) ) ) ; } } private void registerStepDefinitionsFromAnnotations ( Method method , ClassLanguage classLanguage ) throws Throwable { for ( Annotation annotation : method . getAnnotations ( ) ) { if ( annotation . annotationType ( ) . isAnnotationPresent ( StepDef . class ) ) { Locale locale = Utils . localeFor ( annotation . annotationType ( ) . getAnnotation ( StepDef . class ) . value ( ) ) ; Method regexpMethod = annotation . getClass ( ) . getMethod ( "<STR_LIT:value>" ) ; String regexpString = ( String ) regexpMethod . invoke ( annotation ) ; if ( regexpString != null ) { Pattern regexp = Pattern . compile ( regexpString ) ; classLanguage . addStepDefinition ( new JavaStepDefinition ( classLanguage , method , regexp , methodFormat , locale ) ) ; } } } } } </s>
|
<s> package cuke4duke . internal . java ; import cuke4duke . Scenario ; import cuke4duke . internal . jvmclass . ClassLanguage ; import cuke4duke . internal . language . AbstractHook ; import java . lang . reflect . Method ; import java . util . List ; public class JavaHook extends AbstractHook { private final ClassLanguage classLanguage ; private final Method method ; public JavaHook ( ClassLanguage classLanguage , Method method , List < String > tagExpressions ) { super ( tagExpressions ) ; this . classLanguage = classLanguage ; this . method = method ; } public void invoke ( String location , Scenario scenario ) throws Throwable { classLanguage . invokeHook ( method , scenario ) ; } public Method getMethod ( ) { return method ; } } </s>
|
<s> package cuke4duke . internal . java ; import java . lang . reflect . Method ; import java . text . MessageFormat ; import java . util . regex . Matcher ; import java . util . regex . Pattern ; public class MethodFormat { private static final Pattern METHOD_PATTERN = Pattern . compile ( "<STR_LIT>" ) ; private static final String PACKAGE_PATTERN = "<STR_LIT>" ; private final MessageFormat format ; public MethodFormat ( String format ) { String pattern = format . replaceAll ( "<STR_LIT>" , "<STR_LIT>" ) . replaceAll ( "<STR_LIT>" , "<STR_LIT>" ) . replaceAll ( "<STR_LIT>" , "<STR_LIT>" ) . replaceAll ( "<STR_LIT>" , "<STR_LIT>" ) . replaceAll ( "<STR_LIT>" , "<STR_LIT>" ) . replaceAll ( "<STR_LIT>" , "<STR_LIT>" ) . replaceAll ( "<STR_LIT>" , "<STR_LIT>" ) . replaceAll ( "<STR_LIT>" , "<STR_LIT>" ) . replaceAll ( "<STR_LIT>" , "<STR_LIT>" ) ; this . format = new MessageFormat ( pattern ) ; } public String format ( Method method ) { String signature = method . toGenericString ( ) ; Matcher matcher = METHOD_PATTERN . matcher ( signature ) ; if ( matcher . find ( ) ) { String M = matcher . group ( <NUM_LIT:1> ) ; String r = matcher . group ( <NUM_LIT:2> ) ; String qc = matcher . group ( <NUM_LIT:3> ) ; String m = matcher . group ( <NUM_LIT:4> ) ; String qa = matcher . group ( <NUM_LIT:5> ) ; String qe = matcher . group ( <NUM_LIT:6> ) ; String c = qc . replaceAll ( PACKAGE_PATTERN , "<STR_LIT>" ) ; String a = qa . replaceAll ( PACKAGE_PATTERN , "<STR_LIT>" ) ; String e = qe . replaceAll ( PACKAGE_PATTERN , "<STR_LIT>" ) ; return format . format ( new Object [ ] { M , r , qc , m , qa , qe , c , a , e } ) ; } else { throw new RuntimeException ( "<STR_LIT>" + signature ) ; } } } </s>
|
<s> package cuke4duke . internal . java ; import cuke4duke . internal . jvmclass . ClassLanguage ; import cuke4duke . internal . language . Transformable ; import java . lang . reflect . Method ; import java . util . Locale ; public class JavaTransform implements Transformable { private final ClassLanguage classLanguage ; private final Method method ; public JavaTransform ( ClassLanguage classLanguage , Method method ) { this . classLanguage = classLanguage ; this . method = method ; } @ SuppressWarnings ( "<STR_LIT:unchecked>" ) public < T > T transform ( Object arg , Locale locale ) throws Throwable { return ( T ) classLanguage . invoke ( method , new Object [ ] { arg } , locale ) ; } } </s>
|
<s> package cuke4duke . internal . java ; import cuke4duke . annotation . Pending ; import cuke4duke . spi . ExceptionFactory ; import java . lang . reflect . InvocationTargetException ; import java . lang . reflect . Method ; public class MethodInvoker { private final ExceptionFactory exceptionFactory ; public MethodInvoker ( ExceptionFactory exceptionFactory ) { this . exceptionFactory = exceptionFactory ; } public Object invoke ( Method method , Object target , Object [ ] javaArgs ) throws Throwable { try { if ( method . isAnnotationPresent ( Pending . class ) ) { throw exceptionFactory . cucumberPending ( method . getAnnotation ( Pending . class ) . value ( ) ) ; } else { return method . invoke ( target , javaArgs ) ; } } catch ( IllegalArgumentException e ) { String m = "<STR_LIT>" + method . toGenericString ( ) + "<STR_LIT>" + cuke4duke . internal . Utils . join ( javaArgs , "<STR_LIT:U+002C>" ) ; throw exceptionFactory . cucumberArityMismatchError ( m ) ; } catch ( InvocationTargetException e ) { throw e . getTargetException ( ) ; } } } </s>
|
<s> package cuke4duke . internal . java ; import cuke4duke . internal . jvmclass . ClassLanguage ; import cuke4duke . internal . language . AbstractStepDefinition ; import cuke4duke . internal . language . JdkPatternArgumentMatcher ; import cuke4duke . internal . language . StepArgument ; import java . io . UnsupportedEncodingException ; import java . lang . reflect . Method ; import java . util . List ; import java . util . Locale ; import java . util . regex . Pattern ; public class JavaStepDefinition extends AbstractStepDefinition { private final ClassLanguage classLanguage ; private final Method method ; private final Pattern regexp ; private final MethodFormat methodFormat ; private final Locale locale ; public JavaStepDefinition ( ClassLanguage programmingLanguage , Method method , Pattern regexp , MethodFormat methodFormat , Locale locale ) throws Throwable { super ( programmingLanguage ) ; this . classLanguage = programmingLanguage ; this . method = method ; this . regexp = regexp ; this . methodFormat = methodFormat ; this . locale = locale ; register ( ) ; } public String regexp_source ( ) { return regexp . pattern ( ) ; } public List < StepArgument > arguments_from ( String stepName ) throws UnsupportedEncodingException { return JdkPatternArgumentMatcher . argumentsFrom ( regexp , stepName ) ; } public String file_colon_line ( ) { return methodFormat . format ( method ) ; } public Object invokeWithArgs ( Object [ ] args ) throws Throwable { return classLanguage . invoke ( method , args , locale ) ; } } </s>
|
<s> package cuke4duke . internal . java . annotation ; import java . lang . annotation . ElementType ; import java . lang . annotation . Retention ; import java . lang . annotation . RetentionPolicy ; import java . lang . annotation . Target ; @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . ANNOTATION_TYPE ) public @ interface StepDef { public abstract String value ( ) ; } </s>
|
<s> package cuke4duke . internal . language ; import cuke4duke . spi . jruby . StepMatch ; import java . util . List ; public interface LanguageMixin { void add_hook ( String phase , Hook hook ) ; void clear_hooks ( ) ; StepMatch create_step_match ( StepDefinition step_definition , String step_name , String formatted_step_name , List < StepArgument > step_arguments ) ; void available_step_definition ( String regexp_source , String file_colon_line ) ; void invoked_step_definition ( String regexp_source , String file_colon_line ) ; } </s>
|
<s> package cuke4duke . internal . language ; import cuke4duke . Scenario ; import java . util . List ; public interface Hook { public List < String > getTagExpressions ( ) ; void invoke ( String location , Scenario scenario ) throws Throwable ; } </s>
|
<s> package cuke4duke . internal . language ; import java . util . List ; public abstract class AbstractStepDefinition implements StepDefinition { private final AbstractProgrammingLanguage programmingLanguage ; public AbstractStepDefinition ( AbstractProgrammingLanguage programmingLanguage ) { this . programmingLanguage = programmingLanguage ; } protected void register ( ) throws Throwable { programmingLanguage . availableStepDefinition ( regexp_source ( ) , file_colon_line ( ) ) ; } public final void invoke ( List < Object > arguments ) throws Throwable { programmingLanguage . invoked ( regexp_source ( ) , file_colon_line ( ) ) ; invokeWithArgs ( arguments . toArray ( ) ) ; } public abstract Object invokeWithArgs ( Object [ ] args ) throws Throwable ; } </s>
|
<s> package cuke4duke . internal . language ; import cuke4duke . PyString ; import cuke4duke . Scenario ; import cuke4duke . internal . java . MethodInvoker ; import cuke4duke . internal . jvmclass . CantTransform ; import cuke4duke . internal . jvmclass . DefaultJvmTransforms ; import cuke4duke . spi . ExceptionFactory ; import cuke4duke . spi . jruby . StepMatch ; import java . lang . reflect . Method ; import java . util . * ; public abstract class AbstractProgrammingLanguage implements ProgrammingLanguage { protected final LanguageMixin languageMixin ; protected final MethodInvoker methodInvoker ; private final ExceptionFactory exceptionFactory ; private final Map < Class < ? > , Method > transformMethods = new HashMap < Class < ? > , Method > ( ) ; private List < StepDefinition > stepDefinitions ; public AbstractProgrammingLanguage ( LanguageMixin languageMixin , ExceptionFactory exceptionFactory ) { this . languageMixin = languageMixin ; this . exceptionFactory = exceptionFactory ; this . methodInvoker = new MethodInvoker ( this . exceptionFactory ) ; for ( Method method : DefaultJvmTransforms . class . getDeclaredMethods ( ) ) { transformMethods . put ( method . getReturnType ( ) , method ) ; } } final public List < StepMatch > step_matches ( String step_name , String formatted_step_name ) throws Throwable { return step_match_list ( step_name , formatted_step_name ) ; } public abstract void load_code_file ( String file ) throws Throwable ; public final List < StepMatch > step_match_list ( String step_name , String formatted_step_name ) throws Throwable { List < StepMatch > matches = new ArrayList < StepMatch > ( ) ; for ( StepDefinition stepDefinition : stepDefinitions ) { List < StepArgument > arguments = stepDefinition . arguments_from ( step_name ) ; if ( arguments != null ) { matches . add ( languageMixin . create_step_match ( stepDefinition , step_name , formatted_step_name , arguments ) ) ; } } return matches ; } protected void clearHooksAndStepDefinitions ( ) { languageMixin . clear_hooks ( ) ; stepDefinitions = new ArrayList < StepDefinition > ( ) ; } public void addBeforeHook ( Hook before ) { languageMixin . add_hook ( "<STR_LIT>" , before ) ; } public void addStepDefinition ( StepDefinition stepDefinition ) { stepDefinitions . add ( stepDefinition ) ; } public List < StepDefinition > getStepDefinitions ( ) { return stepDefinitions ; } public void addAfterHook ( Hook after ) { languageMixin . add_hook ( "<STR_LIT>" , after ) ; } protected abstract void begin_scenario ( Scenario scenario ) throws Throwable ; public abstract void end_scenario ( ) throws Throwable ; public void availableStepDefinition ( String regexp_source , String file_colon_line ) { languageMixin . available_step_definition ( regexp_source , file_colon_line ) ; } public void invoked ( String regexp_source , String file_colon_line ) { languageMixin . invoked_step_definition ( regexp_source , file_colon_line ) ; } protected Object [ ] transform ( Object [ ] args , Class < ? > [ ] parameterTypes , Locale locale ) throws Throwable { Object [ ] transformed = new Object [ args . length ] ; for ( int i = <NUM_LIT:0> ; i < transformed . length ; i ++ ) { transformed [ i ] = transformOne ( args [ i ] , parameterTypes [ i ] , locale ) ; } return transformed ; } public Object transformOne ( Object arg , Class < ? > parameterType , Locale locale ) throws Throwable { if ( PyString . class . isAssignableFrom ( arg . getClass ( ) ) ) { arg = ( ( PyString ) arg ) . to_s ( ) ; } if ( parameterType . isAssignableFrom ( arg . getClass ( ) ) ) { return arg ; } Object customTransform = customTransform ( arg , parameterType , null ) ; if ( customTransform != null ) { return customTransform ; } else { return defaultTransform ( arg , parameterType , locale ) ; } } private Object defaultTransform ( Object arg , Class < ? > parameterType , Locale locale ) throws Throwable { Method transformMethod = transformMethods . get ( parameterType ) ; if ( transformMethod == null ) { throw new CantTransform ( arg , parameterType ) ; } return methodInvoker . invoke ( transformMethod , null , new Object [ ] { arg , locale } ) ; } protected abstract Object customTransform ( Object arg , Class < ? > parameterType , Locale locale ) throws Throwable ; public Exception cucumberArityMismatchError ( String message ) { return exceptionFactory . cucumberArityMismatchError ( message ) ; } public Exception cucumberPending ( String message ) { return exceptionFactory . cucumberPending ( message ) ; } public Exception error ( String type , String message ) { return exceptionFactory . error ( type , message ) ; } } </s>
|
<s> package cuke4duke . internal . language ; import java . util . Locale ; public interface Transformable { public < T > T transform ( Object argument , Locale locale ) throws Throwable ; } </s>
|
<s> package cuke4duke . internal . language ; import java . io . UnsupportedEncodingException ; import java . util . ArrayList ; import java . util . List ; import java . util . regex . Matcher ; import java . util . regex . Pattern ; public class JdkPatternArgumentMatcher { public static List < StepArgument > argumentsFrom ( Pattern regexp , String stepName ) throws UnsupportedEncodingException { Matcher matcher = regexp . matcher ( stepName ) ; if ( matcher . matches ( ) ) { List < StepArgument > arguments = new ArrayList < StepArgument > ( ) ; for ( int i = <NUM_LIT:1> ; i <= matcher . groupCount ( ) ; i ++ ) { arguments . add ( new StepArgument ( matcher . group ( i ) , matcher . start ( i ) , stepName ) ) ; } return arguments ; } else { return null ; } } } </s>
|
<s> package cuke4duke . internal . language ; import java . util . List ; public abstract class AbstractHook implements Hook { private final List < String > tagExpressions ; public AbstractHook ( List < String > tagExpressions ) { this . tagExpressions = tagExpressions ; } public final List < String > getTagExpressions ( ) { return tagExpressions ; } } </s>
|
<s> package cuke4duke . internal . language ; import java . util . List ; public interface StepDefinition { String regexp_source ( ) throws Throwable ; String file_colon_line ( ) throws Throwable ; List < StepArgument > arguments_from ( String stepName ) throws Throwable ; void invoke ( List < Object > arguments ) throws Throwable ; } </s>
|
<s> package cuke4duke . internal . language ; import java . io . UnsupportedEncodingException ; public class StepArgument { private final String val ; private final int byteOffset ; public StepArgument ( String val , int charOffset , String stepName ) throws UnsupportedEncodingException { this . byteOffset = stepName . substring ( <NUM_LIT:0> , charOffset ) . getBytes ( "<STR_LIT:UTF-8>" ) . length ; this . val = val ; } public String getVal ( ) { return val ; } public int getByteOffset ( ) { return byteOffset ; } } </s>
|
<s> package cuke4duke . internal . language ; import cuke4duke . spi . jruby . StepMatch ; import java . util . List ; public interface ProgrammingLanguage { void load_code_file ( String file ) throws Throwable ; List < StepMatch > step_matches ( String step_name , String formatted_step_name ) throws Throwable ; Exception cucumberPending ( String message ) ; Exception cucumberArityMismatchError ( String message ) ; Exception error ( String type , String message ) ; } </s>
|
<s> package cuke4duke . internal . groovy ; import cuke4duke . internal . language . AbstractStepDefinition ; import cuke4duke . internal . language . JdkPatternArgumentMatcher ; import cuke4duke . internal . language . StepArgument ; import groovy . lang . Closure ; import java . io . UnsupportedEncodingException ; import java . util . List ; import java . util . Locale ; import java . util . regex . Pattern ; public class GroovyStepDefinition extends AbstractStepDefinition { private final GroovyLanguage groovyLanguage ; private final Pattern regexp ; private final Closure body ; public GroovyStepDefinition ( GroovyLanguage groovyLanguage , Pattern regexp , Closure body ) throws Throwable { super ( groovyLanguage ) ; this . groovyLanguage = groovyLanguage ; this . regexp = regexp ; this . body = body ; register ( ) ; } public String regexp_source ( ) { return regexp . pattern ( ) ; } public String file_colon_line ( ) { return body . toString ( ) ; } public Object invokeWithArgs ( Object [ ] args ) throws Throwable { return groovyLanguage . invokeClosure ( body , args , Locale . getDefault ( ) ) ; } public List < StepArgument > arguments_from ( String stepName ) throws UnsupportedEncodingException { return JdkPatternArgumentMatcher . argumentsFrom ( regexp , stepName ) ; } } </s>
|
<s> package cuke4duke . internal . groovy ; import cuke4duke . Scenario ; import cuke4duke . internal . language . AbstractHook ; import groovy . lang . Closure ; import java . util . List ; import java . util . Locale ; public class GroovyHook extends AbstractHook { private final GroovyLanguage groovyLanguage ; private final Closure body ; public GroovyHook ( List < String > tagExpressions , Closure body , GroovyLanguage groovyLanguage ) { super ( tagExpressions ) ; this . groovyLanguage = groovyLanguage ; this . body = body ; } public void invoke ( String location , Scenario scenario ) throws Throwable { groovyLanguage . invokeClosure ( body , new Object [ ] { scenario } , Locale . getDefault ( ) ) ; } } </s>
|
<s> package cuke4duke . internal . groovy ; import cuke4duke . GroovyDsl ; import cuke4duke . Scenario ; import cuke4duke . internal . language . AbstractProgrammingLanguage ; import cuke4duke . internal . language . LanguageMixin ; import cuke4duke . spi . ExceptionFactory ; import groovy . lang . Binding ; import groovy . lang . Closure ; import groovy . lang . GroovyShell ; import java . io . File ; import java . io . IOException ; import java . util . ArrayList ; import java . util . List ; import java . util . Locale ; public class GroovyLanguage extends AbstractProgrammingLanguage { private final List < String > groovyFiles = new ArrayList < String > ( ) ; private Object currentWorld ; private Closure worldFactory ; public GroovyLanguage ( LanguageMixin languageMixin , ExceptionFactory exceptionFactory ) { super ( languageMixin , exceptionFactory ) ; GroovyDsl . groovyLanguage = this ; GroovyDsl . languageMixin = languageMixin ; } Object invokeClosure ( Closure body , Object [ ] args , Locale locale ) throws Throwable { body . setDelegate ( currentWorld ) ; Class [ ] classes = body . getParameterTypes ( ) ; Object [ ] transformedArgs = transform ( args , classes , locale ) ; return body . call ( transformedArgs ) ; } public void begin_scenario ( Scenario scenario ) throws IOException { clearHooksAndStepDefinitions ( ) ; worldFactory = null ; GroovyShell shell = new GroovyShell ( new Binding ( ) ) ; for ( String groovyFile : groovyFiles ) { shell . evaluate ( new File ( groovyFile ) ) ; } currentWorld = worldFactory == null ? new Object ( ) : worldFactory . call ( ) ; } public void end_scenario ( ) { } @ Override protected Object customTransform ( Object arg , Class < ? > parameterType , Locale locale ) { return null ; } public void load_code_file ( String groovyFile ) throws ClassNotFoundException , IOException { groovyFiles . add ( groovyFile ) ; } public void registerWorldFactory ( Closure worldFactory ) { if ( this . worldFactory != null ) { throw new RuntimeException ( "<STR_LIT>" ) ; } this . worldFactory = worldFactory ; } } </s>
|
<s> package cuke4duke ; public interface PyString { public String to_s ( ) ; } </s>
|
<s> package cuke4duke . annotation ; import java . lang . annotation . ElementType ; import java . lang . annotation . Retention ; import java . lang . annotation . RetentionPolicy ; import java . lang . annotation . Target ; @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) public @ interface Pending { String value ( ) default "<STR_LIT>" ; } </s>
|
<s> package cuke4duke . annotation ; import java . lang . annotation . ElementType ; import java . lang . annotation . Retention ; import java . lang . annotation . RetentionPolicy ; import java . lang . annotation . Target ; @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) public @ interface Transform { } </s>
|
<s> package cuke4duke . annotation ; import java . lang . annotation . ElementType ; import java . lang . annotation . Retention ; import java . lang . annotation . RetentionPolicy ; import java . lang . annotation . Target ; @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) public @ interface After { String [ ] value ( ) default "<STR_LIT>" ; } </s>
|
<s> package cuke4duke . annotation ; import cuke4duke . internal . java . annotation . StepDef ; import java . lang . annotation . ElementType ; import java . lang . annotation . Retention ; import java . lang . annotation . RetentionPolicy ; import java . lang . annotation . Target ; public interface I18n { public class AR { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } } public class BG { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } } public class CA { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Aleshores { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Atesa { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface At - UNK - s { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Cal { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Donada { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Donat { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface I { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Per - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Quan { public abstract String value ( ) ; } } public class CS { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface A { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Atak - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ale { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Kdy - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Pak { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Pokud { public abstract String value ( ) ; } } public class CY_GB { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface A { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Anrhegediga { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ond { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Pryd { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Yna { public abstract String value ( ) ; } } public class DA { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Givet { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Men { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface N - UNK - r { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Og { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface S - UNK - { public abstract String value ( ) ; } } public class DE { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Aber { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Angenommen { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Dann { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Gegebensei { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Und { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Wenn { public abstract String value ( ) ; } } public class EN { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT:en>" ) public static @ interface And { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT:en>" ) public static @ interface But { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT:en>" ) public static @ interface Given { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT:en>" ) public static @ interface Then { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT:en>" ) public static @ interface When { public abstract String value ( ) ; } } public class EN_SCOUSE { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface An { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Buh { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Denyousegotta { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Dun { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Givun { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Wun { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Youseknowlikewhen { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Youseknowwhenyousegot { public abstract String value ( ) ; } } public class EN_AU { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Cept { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface N { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface When { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Yagotta { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Yaknowhow { public abstract String value ( ) ; } } public class EN_LOL { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface AN { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface BUT { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface DEN { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface ICANHAZ { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface WEN { public abstract String value ( ) ; } } public class EN_PIRATE { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Avast { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Aye { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Blimey { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Gangway { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Letgoandhaul { public abstract String value ( ) ; } } public class EN_TX { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Andyall { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Butyall { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Givenyall { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Thenyall { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Whenyall { public abstract String value ( ) ; } } public class EO { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Do { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Donita - UNK - o { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Kaj { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Se { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Sed { public abstract String value ( ) ; } } public class ES { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Cuando { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Dado { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Entonces { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Pero { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Y { public abstract String value ( ) ; } } public class ET { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Eeldades { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ja { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Kui { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Kuid { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Siis { public abstract String value ( ) ; } } public class FI { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ja { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Kun { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Mutta { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Niin { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Oletetaan { public abstract String value ( ) ; } } public class FR { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Alors { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Et { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Etantdonn - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Lorsqu { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Lorsque { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Mais { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Quand { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Soit { public abstract String value ( ) ; } } public class HE { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } } public class HR { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ali { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface I { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Kad { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Kada { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Onda { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Zadan { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Zadani { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Zadano { public abstract String value ( ) ; } } public class HU { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Adott { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Akkor { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Amennyiben { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Amikor { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface De { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ha { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Majd { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - s { public abstract String value ( ) ; } } public class ID { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT:id>" ) public static @ interface Dan { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT:id>" ) public static @ interface Dengan { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT:id>" ) public static @ interface Ketika { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT:id>" ) public static @ interface Maka { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT:id>" ) public static @ interface Tapi { public abstract String value ( ) ; } } public class IT { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Allora { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Dato { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface E { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ma { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Quando { public abstract String value ( ) ; } } public class JA { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } } public class KO { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } } public class LT { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Bet { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Duota { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ir { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Kai { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Tada { public abstract String value ( ) ; } } public class LU { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface a { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface an { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface awer { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface dann { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface m - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface ugeholl { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface wann { public abstract String value ( ) ; } } public class LV { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Bet { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ja { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Kad { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Tad { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Un { public abstract String value ( ) ; } } public class NL { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Als { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Dan { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface En { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Gegeven { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Maar { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Stel { public abstract String value ( ) ; } } public class NO { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Gitt { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Men { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface N - UNK - r { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Og { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface S - UNK - { public abstract String value ( ) ; } } public class PL { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ale { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface I { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Je - UNK - li { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Je - UNK - eli { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Maj - UNK - c { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Oraz { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Wtedy { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Zak - UNK - adaj - UNK - c { public abstract String value ( ) ; } } public class PT { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Dado { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface E { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Entao { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ent - UNK - o { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Mas { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Quando { public abstract String value ( ) ; } } public class RO { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Atunci { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Cand { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface C - UNK - nd { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Dar { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Datfiind { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Datefiind { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Datifiind { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Da - UNK - ifiind { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Da - UNK - ifiind { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Si { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - i { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - i { public abstract String value ( ) ; } } public class RU { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } } public class SK { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface A { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ale { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ke - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Pokia - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Tak { public abstract String value ( ) ; } } public class SR_CYRL { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } } public class SR_LATN { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ali { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface I { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Kad { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Kada { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Onda { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Zadate { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Zadato { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Zatati { public abstract String value ( ) ; } } public class SV { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Givet { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Men { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface N - UNK - r { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Och { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface S - UNK - { public abstract String value ( ) ; } } public class TR { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ama { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Diyelimki { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface E - UNK - erki { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Fakat { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ozaman { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Ve { public abstract String value ( ) ; } } public class UK { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } } public class UZ { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } } public class VI { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Bi - UNK - t { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Cho { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Khi { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Nh - UNK - ng { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface Th - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface V - UNK - { public abstract String value ( ) ; } } public class ZH_CN { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } } public class ZH_TW { @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) @ StepDef ( "<STR_LIT>" ) public static @ interface - UNK - { public abstract String value ( ) ; } } } </s>
|
<s> package cuke4duke . annotation ; import java . lang . annotation . ElementType ; import java . lang . annotation . Retention ; import java . lang . annotation . RetentionPolicy ; import java . lang . annotation . Target ; @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) public @ interface Order { int value ( ) ; } </s>
|
<s> package cuke4duke . annotation ; import java . lang . annotation . ElementType ; import java . lang . annotation . Retention ; import java . lang . annotation . RetentionPolicy ; import java . lang . annotation . Target ; @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . METHOD ) public @ interface Before { String [ ] value ( ) default "<STR_LIT>" ; } </s>
|
<s> package cuke4duke ; public interface StepMother { void invoke ( String step ) ; void invoke ( String step , Table table ) ; void invoke ( String step , String multilineString ) ; String ask ( String question , int timeoutSecs ) ; void announce ( String message ) ; void embed ( String file , String mimeType ) ; } </s>
|
<s> package cuke4duke ; public interface CellConverter { public String convertCell ( String cellValue ) ; } </s>
|
<s> package cuke4duke ; import java . util . List ; import java . util . Map ; public interface Table { public List < Map < String , String > > hashes ( ) ; public Map < String , String > rowsHash ( ) ; public List < List < String > > raw ( ) ; public List < List < String > > rows ( ) ; public void diffLists ( List < List < String > > table ) ; public void diffLists ( List < List < String > > table , Map < ? , ? > options ) ; public void diffHashes ( List < Map < String , String > > table ) ; public void diffHashes ( List < Map < String , String > > table , Map < ? , ? > options ) ; public void mapColumn ( String column , CellConverter converter ) ; public void mapHeaders ( Map < Object , String > mappings ) ; } </s>
|
<s> package cuke4duke . spi . jruby ; import cuke4duke . spi . ExceptionFactory ; import org . jruby . RubyClass ; import org . jruby . RubyModule ; import org . jruby . exceptions . RaiseException ; public class JRubyExceptionFactory implements ExceptionFactory { public Exception error ( String errorClass , String message ) { RubyModule cucumber = JRuby . getRuntime ( ) . getModule ( "<STR_LIT>" ) ; RubyClass error = cucumber . getClass ( errorClass ) ; return new RaiseException ( JRuby . getRuntime ( ) , error , message , true ) ; } public Exception cucumberPending ( String message ) { return error ( "<STR_LIT>" , message ) ; } public Exception cucumberArityMismatchError ( String message ) { return error ( "<STR_LIT>" , message ) ; } } </s>
|
<s> package cuke4duke . spi . jruby ; import org . jruby . Ruby ; import org . jruby . RubyArray ; import java . util . Collection ; public class JRuby { private static Ruby runtime ; public static void setRuntime ( Ruby runtime ) { JRuby . runtime = runtime ; } public static Ruby getRuntime ( ) { if ( runtime == null ) { runtime = Ruby . getGlobalRuntime ( ) ; } return runtime ; } public static RubyArray newArray ( Collection < ? > collection ) { RubyArray result = RubyArray . newArray ( getRuntime ( ) ) ; for ( Object o : collection ) { result . add ( o ) ; } return result ; } } </s>
|
<s> package cuke4duke . spi . jruby ; import cuke4duke . internal . language . StepDefinition ; public interface StepMatch { String file_colon_line ( ) ; String backtrace_line ( ) ; int text_length ( ) ; StepDefinition step_definition ( ) ; String name ( ) ; String inspect ( ) ; String format_args ( Object format , Object proc ) ; String format_args ( Object format ) ; String format_args ( ) ; void invoke ( Object format ) ; } </s>
|
<s> package cuke4duke . spi ; public interface ExceptionFactory { Exception error ( String errorClass , String message ) ; Exception cucumberPending ( String message ) ; Exception cucumberArityMismatchError ( String message ) ; } </s>
|
<s> package cuke4duke ; public class Steps { private final StepMother stepMother ; public Steps ( StepMother stepMother ) { this . stepMother = stepMother ; } protected String ask ( String question , int timeoutSecs ) { return stepMother . ask ( question , timeoutSecs ) ; } protected void announce ( String message ) { stepMother . announce ( message ) ; } protected void embed ( String file , String mimeType ) { stepMother . embed ( file , mimeType ) ; } public void Given ( String step ) { stepMother . invoke ( step ) ; } public void Given ( String step , Table table ) { stepMother . invoke ( step , table ) ; } public void Given ( String step , String multilineString ) { stepMother . invoke ( step , multilineString ) ; } public void When ( String step ) { Given ( step ) ; } public void When ( String step , Table table ) { Given ( step , table ) ; } public void When ( String step , String multilineString ) { Given ( step , multilineString ) ; } public void Then ( String step ) { Given ( step ) ; } public void Then ( String step , Table table ) { Given ( step , table ) ; } public void Then ( String step , String multilineString ) { Given ( step , multilineString ) ; } } </s>
|
<s> package cuke4duke ; public interface Scenario { } </s>
|
<s> package cuke4duke . spring ; import java . lang . annotation . ElementType ; import java . lang . annotation . Retention ; import java . lang . annotation . RetentionPolicy ; import java . lang . annotation . Target ; @ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . TYPE ) public @ interface StepDefinitions { } </s>
|
<s> package simple ; import cuke4duke . annotation . I18n . EN . Given ; import cuke4duke . annotation . I18n . EN . Then ; import static org . junit . Assert . assertTrue ; public class CalledSteps { private boolean magic ; @ Given ( "<STR_LIT>" ) public void itIs ( String what ) { if ( what . equals ( "<STR_LIT>" ) ) { magic = true ; } } @ Then ( "<STR_LIT>" ) public void magicShouldHappen ( ) { assertTrue ( magic ) ; } } </s>
|
<s> package simple ; import cuke4duke . annotation . I18n . ZH_CN . - UNK - ; import cuke4duke . annotation . I18n . ZH_CN . - UNK - ; import cuke4duke . annotation . I18n . ZH_CN . - UNK - ; public class ChineseCalculatorSteps { @ - UNK - ( "<STR_LIT>" ) public void - UNK - ( int n ) { } @ - UNK - ( "<STR_LIT>" ) public void - UNK - ( ) { } @ - UNK - ( "<STR_LIT>" ) public void - UNK - ( int n ) { } } </s>
|
<s> package simple ; import cuke4duke . annotation . After ; import cuke4duke . annotation . Before ; import cuke4duke . annotation . I18n . EN . Then ; import cuke4duke . annotation . I18n . EN . When ; import static org . junit . Assert . assertEquals ; import static org . junit . Assert . assertTrue ; public class HookSteps extends SuperSteps { private String b4WithoutArgs ; private static String myStatic = "<STR_LIT>" ; private static int beforeHookCount ; public HookSteps ( ) { beforeHookCount = <NUM_LIT:0> ; } @ Before ( "<STR_LIT>" ) public void cryWolf ( ) { throw new RuntimeException ( "<STR_LIT>" ) ; } @ Before public void setB4WithoutArgs ( ) { beforeHookCount ++ ; b4WithoutArgs = "<STR_LIT>" ; } @ Then ( "<STR_LIT>" ) public void thenB4 ( String b4Value ) { assertEquals ( b4Value , b4 ) ; } @ Then ( "<STR_LIT>" ) public void thenB4AndForever ( String b4AndForeverValue ) { assertEquals ( b4AndForeverValue , b4AndForever ) ; } @ When ( "<STR_LIT>" ) public void setStatic ( String newValue ) { myStatic = newValue ; } @ Then ( "<STR_LIT>" ) public void staticShouldBe ( String expected ) { assertEquals ( expected , myStatic ) ; } @ After public void setAfter ( Object scenario ) { myStatic = "<STR_LIT>" ; assertEquals ( "<STR_LIT>" , b4WithoutArgs ) ; assertEquals ( <NUM_LIT:1> , beforeHookCount ) ; } public static boolean flag = false ; @ After ( "<STR_LIT>" ) public void checkThatRubyBeforeSetsFlag ( ) { assertTrue ( flag ) ; } } </s>
|
<s> package simple ; import cuke4duke . CellConverter ; import cuke4duke . Table ; import cuke4duke . annotation . I18n . EN . Given ; import cuke4duke . annotation . I18n . EN . Then ; import cuke4duke . annotation . I18n . EN . When ; import cuke4duke . annotation . Pending ; import java . util . * ; import static org . junit . Assert . assertEquals ; public class StuffSteps { private final Map < String , Integer > cukes ; public StuffSteps ( ) { cukes = new HashMap < String , Integer > ( ) ; } @ Pending ( "<STR_LIT>" ) @ Given ( "<STR_LIT>" ) public void intentionallyPending ( ) { throw new RuntimeException ( "<STR_LIT>" ) ; } @ Given ( "<STR_LIT>" ) public void neverUsed ( ) { } @ Given ( "<STR_LIT>" ) public void intentionallyFailing ( ) { throw new RuntimeException ( "<STR_LIT>" ) ; } @ Given ( "<STR_LIT>" ) public void iHaveNCukes ( int n , String color ) { this . cukes . put ( color , n ) ; } @ When ( "<STR_LIT>" ) public void iAddATable ( Table table ) { List < List < String > > diffList = new ArrayList < List < String > > ( ) ; diffList . add ( Arrays . asList ( "<STR_LIT:a>" , "<STR_LIT:b>" ) ) ; diffList . add ( Arrays . asList ( "<STR_LIT:1>" , "<STR_LIT:2>" ) ) ; table . diffLists ( diffList ) ; List < Map < String , String > > hashes = new ArrayList < Map < String , String > > ( ) ; hashes . add ( hash ( "<STR_LIT:a>" , "<STR_LIT:1>" , "<STR_LIT:b>" , "<STR_LIT:2>" ) ) ; hashes . add ( hash ( "<STR_LIT:a>" , "<STR_LIT:1>" , "<STR_LIT:b>" , "<STR_LIT:2>" ) ) ; Map < String , Boolean > options = new HashMap < String , Boolean > ( ) ; options . put ( "<STR_LIT>" , false ) ; table . diffHashes ( hashes , options ) ; } @ When ( "<STR_LIT>" ) public void iAddAString ( String s ) { assertEquals ( "<STR_LIT>" , s ) ; } @ Then ( "<STR_LIT>" ) public void iShouldHaveNCukes ( int n , String color ) { int number = cukes . get ( color ) != null ? cukes . get ( color ) : <NUM_LIT:0> ; assertEquals ( n , number ) ; } public void thisIsNotAStep ( ) { } private Map < String , String > hash ( String ... values ) { Map < String , String > hash = new HashMap < String , String > ( ) ; for ( int i = <NUM_LIT:0> ; i < values . length ; i += <NUM_LIT:2> ) { hash . put ( values [ i ] , values [ i + <NUM_LIT:1> ] ) ; } return hash ; } @ Given ( "<STR_LIT>" ) public void convertTable ( Table t ) { t . mapColumn ( "<STR_LIT:b>" , new CellConverter ( ) { public String convertCell ( String cellValue ) { return "<STR_LIT>" + cellValue ; } } ) ; t . mapHeaders ( new HashMap < Object , String > ( ) { { put ( "<STR_LIT:a>" , "<STR_LIT:A>" ) ; } } ) ; List < Map < String , String > > hashes = new ArrayList < Map < String , String > > ( ) ; hashes . add ( hash ( "<STR_LIT:A>" , "<STR_LIT>" , "<STR_LIT:b>" , "<STR_LIT>" ) ) ; hashes . add ( hash ( "<STR_LIT:A>" , "<STR_LIT>" , "<STR_LIT:b>" , "<STR_LIT>" ) ) ; assertEquals ( hashes , t . hashes ( ) ) ; } } </s>
|
<s> package simple ; import cuke4duke . StepMother ; import cuke4duke . Steps ; import cuke4duke . annotation . I18n . EN . Then ; import cuke4duke . annotation . I18n . EN . When ; import static org . junit . Assert . fail ; public class HalfManualSteps extends Steps { public HalfManualSteps ( StepMother stepMother ) { super ( stepMother ) ; } @ When ( "<STR_LIT>" ) public void askForInput ( ) { try { String answer = ask ( "<STR_LIT>" , <NUM_LIT:5> ) ; fail ( "<STR_LIT>" ) ; } catch ( Exception expected ) { } } @ Then ( "<STR_LIT>" ) public void shouldTimeOut ( ) { } } </s>
|
<s> package simple ; import cuke4duke . StepMother ; import cuke4duke . Steps ; import cuke4duke . annotation . I18n . EN . When ; public class CallingSteps extends Steps { public CallingSteps ( StepMother stepMother ) { super ( stepMother ) ; } @ When ( "<STR_LIT>" ) public void iCallAnotherStep ( ) { Given ( "<STR_LIT>" ) ; } } </s>
|
<s> package simple ; import cuke4duke . annotation . Before ; public abstract class SuperSteps { protected String b4AndForever = "<STR_LIT>" ; protected String b4 = "<STR_LIT>" ; @ Before ( { "<STR_LIT>" , "<STR_LIT>" } ) public void setB4AndForever ( Object scenario ) { b4AndForever = "<STR_LIT>" ; } @ Before ( "<STR_LIT>" ) public void setB4 ( Object scenario ) { b4 = "<STR_LIT>" ; } } </s>
|
<s> package simple ; import cuke4duke . StepMother ; import cuke4duke . Steps ; import cuke4duke . annotation . I18n . EN . Given ; import cuke4duke . annotation . I18n . EN . Then ; import cuke4duke . annotation . I18n . EN . When ; import cuke4duke . annotation . Transform ; import static junit . framework . Assert . * ; public class TransformSteps extends Steps { private boolean exceptionThrown = false ; private User user ; private boolean yes ; public TransformSteps ( StepMother stepMother ) { super ( stepMother ) ; } @ Transform public User transformStringToUserWithAge ( String age ) { return new User ( Integer . valueOf ( age ) ) ; } @ Transform public boolean overrideBooleanPrimitiveTransform ( String boolValue ) { return boolValue . equals ( "<STR_LIT:yes>" ) ; } @ Given ( "<STR_LIT>" ) public void transformToA ( int value ) { assertEquals ( <NUM_LIT:10> , value ) ; } @ Given ( "<STR_LIT>" ) public void transformToA ( String value ) { try { Given ( "<STR_LIT>" , value ) ; } catch ( Exception e ) { exceptionThrown = true ; } } @ Given ( "<STR_LIT>" ) public void passACar ( Car value ) { } @ Given ( "<STR_LIT>" ) public void transformToA ( User user ) { this . user = user ; } @ Given ( "<STR_LIT>" ) public void iPassYesToAMethodWithBooleanAsParameter ( boolean yes ) { this . yes = yes ; } @ When ( "<STR_LIT>" ) public void somethingHappens ( ) { } @ Then ( "<STR_LIT>" ) public void allIsGood ( ) { assertFalse ( exceptionThrown ) ; } @ Then ( "<STR_LIT>" ) public void aUserWithAgeIsCreated ( int age ) { assertTrue ( this . user . age == age ) ; } @ Then ( "<STR_LIT>" ) public void exceptionIsThrown ( ) { assertTrue ( exceptionThrown ) ; } @ Then ( "<STR_LIT>" ) public void theParameterIsTrue ( ) { assertTrue ( yes ) ; } public static class Car { } public static class User { public final int age ; public User ( int age ) { this . age = age ; } } } </s>
|
<s> package simple ; import cuke4duke . annotation . I18n . EN . When ; import cuke4duke . annotation . I18n . NO . S - UNK - ; import static org . junit . Assert . assertEquals ; public class NorwegianSteps { @ When ( "<STR_LIT>" ) public void j - UNK - ViElsker ( String hva , String hae ) { } @ S - UNK - ( "<STR_LIT>" ) public void numberShouldBeParserCorrectly ( Double d ) { assertEquals ( <NUM_LIT> , d , <NUM_LIT:0.0> ) ; } } </s>
|
<s> package org . books . domain ; public class BookQuery { private String author = "<STR_LIT>" ; private String title = "<STR_LIT>" ; private String publisher = "<STR_LIT>" ; public void setAuthor ( String author ) { this . author = author ; } public String getAuthor ( ) { return author ; } public void setTitle ( String title ) { this . title = title ; } public String getTitle ( ) { return title ; } public void setPublisher ( String publisher ) { this . publisher = publisher ; } public String getPublisher ( ) { return publisher ; } } </s>
|
<s> package org . books . domain ; import javax . persistence . * ; @ Entity public class LineItem { @ Id @ GeneratedValue ( strategy = GenerationType . AUTO ) private long id ; @ ManyToOne private Book book ; private int quantity ; public void setBook ( Book book ) { this . book = book ; } public Book getBook ( ) { return book ; } public void setQuantity ( int quantity ) { this . quantity = quantity ; } public int getQuantity ( ) { return quantity ; } } </s>
|
<s> package org . books . domain ; import javax . persistence . Entity ; import javax . persistence . GeneratedValue ; import javax . persistence . Id ; @ Entity public class Address { @ Id @ GeneratedValue private long id ; } </s>
|
<s> package org . books . domain ; import javax . persistence . * ; import java . util . ArrayList ; import java . util . List ; @ Entity @ Table ( name = "<STR_LIT>" ) public class Order { public enum Status { Submitted , InProgress , Closed , Canceled } @ Id @ GeneratedValue ( strategy = GenerationType . AUTO ) private long id ; private double price ; @ Enumerated ( EnumType . STRING ) private Order . Status status = Status . Submitted ; @ OneToOne ( cascade = CascadeType . ALL , fetch = FetchType . EAGER ) private Address address ; @ OneToOne ( cascade = CascadeType . ALL , fetch = FetchType . EAGER ) private PaymentInfo paymentInfo ; @ OneToMany ( cascade = CascadeType . ALL ) private List < LineItem > lineItems = new ArrayList < LineItem > ( ) ; public List < LineItem > getLineItems ( ) { return lineItems ; } public long getId ( ) { return id ; } public void setPrice ( double price ) { this . price = price ; } public double getPrice ( ) { return price ; } public Order . Status getStatus ( ) { return status ; } public void setStatus ( Order . Status status ) { this . status = status ; } public void setAddress ( Address address ) { this . address = address ; } public Address getAddress ( ) { return address ; } public void setPaymentInfo ( PaymentInfo paymentInfo ) { this . paymentInfo = paymentInfo ; } public PaymentInfo getPaymentInfo ( ) { return paymentInfo ; } } </s>
|
<s> package org . books . domain ; import javax . persistence . Entity ; import javax . persistence . GeneratedValue ; import javax . persistence . Id ; @ Entity public class PaymentInfo { @ Id @ GeneratedValue private long id ; } </s>
|
<s> package org . books . domain ; import javax . persistence . * ; @ Entity @ NamedQuery ( name = "<STR_LIT>" , query = "<STR_LIT>" ) public class Book { @ Id @ GeneratedValue ( strategy = GenerationType . AUTO ) private long id ; private String authors ; private String publisher ; private String title ; private int year ; private double price ; public Book ( ) { } public Book ( String author , String title , int year , String publisher ) { this . authors = author ; this . title = title ; this . year = year ; this . publisher = publisher ; } public String getAuthors ( ) { return authors ; } public void setAuthors ( String author ) { this . authors = author ; } public String getTitle ( ) { return title ; } public void setTitle ( String title ) { this . title = title ; } public int getYear ( ) { return year ; } public void setYear ( int year ) { this . year = year ; } public String getPublisher ( ) { return publisher ; } public void setPublisher ( String publisher ) { this . publisher = publisher ; } public void setPrice ( double price ) { this . price = price ; } public double getPrice ( ) { return price ; } } </s>
|
<s> package org . books . business ; import org . books . domain . Book ; import org . books . domain . BookQuery ; import javax . ejb . Stateless ; import javax . persistence . EntityManager ; import javax . persistence . PersistenceContext ; import javax . persistence . Query ; import java . util . ArrayList ; import java . util . List ; @ Stateless public class CatalogManagerImpl implements CatalogManager { @ PersistenceContext ( unitName = "<STR_LIT>" ) private EntityManager entityManager ; private String message = "<STR_LIT>" ; public List < Book > searchBooks ( BookQuery bookQuery ) { if ( ( bookQuery . getTitle ( ) + bookQuery . getAuthor ( ) + bookQuery . getPublisher ( ) ) . length ( ) == <NUM_LIT:0> ) { return new ArrayList < Book > ( ) ; } Query query = entityManager . createNamedQuery ( "<STR_LIT>" ) ; query . setParameter ( "<STR_LIT:title>" , "<STR_LIT:%>" + bookQuery . getTitle ( ) . toLowerCase ( ) + "<STR_LIT:%>" ) ; query . setParameter ( "<STR_LIT>" , "<STR_LIT:%>" + bookQuery . getAuthor ( ) . toLowerCase ( ) + "<STR_LIT:%>" ) ; query . setParameter ( "<STR_LIT>" , "<STR_LIT:%>" + bookQuery . getPublisher ( ) . toLowerCase ( ) + "<STR_LIT:%>" ) ; return query . getResultList ( ) ; } public void setMessage ( String message ) { this . message = message ; } public String getMessage ( ) { return message ; } } </s>
|
<s> package org . books . business ; import org . books . dao . OrderDao ; import org . books . domain . Address ; import org . books . domain . LineItem ; import org . books . domain . Order ; import org . books . domain . PaymentInfo ; import javax . annotation . Resource ; import javax . ejb . EJB ; import javax . ejb . Stateless ; import javax . jms . * ; import javax . persistence . EntityManager ; import javax . persistence . PersistenceContext ; import java . util . List ; @ Stateless public class OrderManagerImpl implements OrderManager { @ PersistenceContext ( unitName = "<STR_LIT>" ) EntityManager entityManager ; @ Resource ConnectionFactory connectionFactory ; @ Resource ( name = "<STR_LIT>" ) Queue orderQueue ; @ EJB private OrderDao orderDao ; @ EJB private PriceCalculator priceCalculator ; public void createOrder ( List < LineItem > lineItems , Address address , PaymentInfo paymentInfo ) throws Exception { double price = priceCalculator . getTotalPrice ( lineItems , address , paymentInfo ) ; Order order = new Order ( ) ; for ( LineItem lineItem : lineItems ) { order . getLineItems ( ) . add ( lineItem ) ; } order . setPrice ( price ) ; orderDao . addOrder ( order ) ; sendOrder ( order . getId ( ) ) ; } public void sendOrder ( long orderId ) throws JMSException { Connection connection = null ; Session session = null ; try { connection = connectionFactory . createConnection ( ) ; connection . start ( ) ; session = connection . createSession ( false , Session . AUTO_ACKNOWLEDGE ) ; MessageProducer producer = session . createProducer ( orderQueue ) ; producer . setDeliveryMode ( DeliveryMode . NON_PERSISTENT ) ; TextMessage message = session . createTextMessage ( Long . toString ( orderId ) ) ; producer . send ( message ) ; } finally { if ( session != null ) session . close ( ) ; if ( connection != null ) connection . close ( ) ; } } } </s>
|
<s> package org . books . business ; import org . books . domain . Address ; import org . books . domain . LineItem ; import org . books . domain . PaymentInfo ; import java . util . List ; public interface OrderManager { public void createOrder ( List < LineItem > lineItems , Address address , PaymentInfo paymentInfo ) throws Exception ; } </s>
|
<s> package org . books . business ; import org . books . domain . Book ; import org . books . domain . LineItem ; import java . util . List ; public interface CartManager { void AddBook ( Book book , int quantity ) ; public List < LineItem > getLineItems ( ) ; double getTotalPrice ( ) ; void checkout ( ) throws Exception ; } </s>
|
<s> package org . books . business ; import org . books . domain . Order ; import javax . annotation . Resource ; import javax . ejb . * ; import javax . jms . JMSException ; import javax . jms . Message ; import javax . jms . MessageListener ; import javax . jms . TextMessage ; import javax . persistence . EntityManager ; import javax . persistence . PersistenceContext ; @ MessageDriven public class OrderProcessor implements MessageListener { @ PersistenceContext ( unitName = "<STR_LIT>" ) EntityManager entityManager ; @ Resource private TimerService timerService ; public void onMessage ( Message message ) { try { String id = ( ( TextMessage ) message ) . getText ( ) ; Order order = entityManager . find ( Order . class , Long . parseLong ( id ) ) ; order . setStatus ( Order . Status . InProgress ) ; } catch ( JMSException e ) { throw new EJBException ( e ) ; } } @ Timeout public void closeOrder ( Timer timer ) throws EJBException { String msg = ( String ) timer . getInfo ( ) ; Order order = entityManager . find ( Order . class , Long . parseLong ( msg ) ) ; order . setStatus ( Order . Status . Closed ) ; } } </s>
|
<s> package org . books . business ; import org . books . domain . Book ; import org . books . domain . BookQuery ; import java . util . List ; public interface CatalogManager { public List < Book > searchBooks ( BookQuery bookQuery ) ; public void setMessage ( String message ) ; public String getMessage ( ) ; } </s>
|
<s> package org . books . business ; import org . books . domain . Book ; import org . books . domain . LineItem ; import javax . ejb . EJB ; import javax . ejb . Stateful ; import java . util . ArrayList ; import java . util . List ; @ Stateful public class CartManagerImpl implements CartManager { @ EJB private PriceCalculator priceCalculator ; @ EJB private OrderManager orderManager ; private List < LineItem > lineItems = new ArrayList < LineItem > ( ) ; public List < LineItem > getLineItems ( ) { return lineItems ; } public void AddBook ( Book book , int quantity ) { LineItem lineItem = new LineItem ( ) ; lineItem . setBook ( book ) ; lineItem . setQuantity ( quantity ) ; lineItems . add ( lineItem ) ; } public double getTotalPrice ( ) { return priceCalculator . getTotalPrice ( lineItems , null , null ) ; } public void checkout ( ) throws Exception { orderManager . createOrder ( lineItems , null , null ) ; } } </s>
|
<s> package org . books . business ; import org . books . domain . Address ; import org . books . domain . LineItem ; import org . books . domain . PaymentInfo ; import javax . ejb . Stateless ; import java . util . List ; @ Stateless public class PriceCalculatorImpl implements PriceCalculator { public double getTotalPrice ( List < LineItem > lineItems , Address address , PaymentInfo paymentInfo ) { double totalPrice = <NUM_LIT:0> ; for ( LineItem lineItem : lineItems ) { totalPrice += lineItem . getQuantity ( ) * lineItem . getBook ( ) . getPrice ( ) ; } return totalPrice ; } } </s>
|
<s> package org . books . business ; import org . books . domain . Address ; import org . books . domain . LineItem ; import org . books . domain . PaymentInfo ; import java . util . List ; public interface PriceCalculator { public double getTotalPrice ( List < LineItem > lineItems , Address address , PaymentInfo paymentInfo ) ; } </s>
|
<s> package org . books . dao ; import org . books . domain . Book ; import javax . ejb . Stateless ; import javax . persistence . EntityManager ; import javax . persistence . PersistenceContext ; import javax . persistence . Query ; import java . util . List ; @ Stateless public class BookDaoImpl implements BookDao { @ PersistenceContext ( unitName = "<STR_LIT>" ) private EntityManager entityManager ; public void addBook ( Book book ) throws Exception { entityManager . persist ( book ) ; } public void deleteBook ( Book book ) throws Exception { entityManager . remove ( book ) ; } public List < Book > getBooks ( ) { Query query = entityManager . createQuery ( "<STR_LIT>" ) ; return query . getResultList ( ) ; } } </s>
|
<s> package org . books . dao ; import org . books . domain . Order ; import javax . ejb . Stateless ; import javax . persistence . EntityManager ; import javax . persistence . PersistenceContext ; import javax . persistence . Query ; import java . util . List ; @ Stateless public class OrderDaoImpl implements OrderDao { @ PersistenceContext ( unitName = "<STR_LIT>" ) private EntityManager entityManager ; public void addOrder ( Order order ) throws Exception { entityManager . persist ( order ) ; } public void deleteOrder ( Order order ) throws Exception { entityManager . remove ( order ) ; } public List < Order > getOrders ( ) { Query query = entityManager . createQuery ( "<STR_LIT>" ) ; return query . getResultList ( ) ; } } </s>
|
<s> package org . books . dao ; import org . books . domain . Order ; import java . util . List ; public interface OrderDao { public abstract void addOrder ( Order order ) throws Exception ; public abstract void deleteOrder ( Order order ) throws Exception ; public abstract List < Order > getOrders ( ) ; } </s>
|
<s> package org . books . dao ; import org . books . domain . Book ; import javax . ejb . Local ; import java . util . List ; @ Local public interface BookDao { void addBook ( Book book ) throws Exception ; void deleteBook ( Book book ) throws Exception ; List < Book > getBooks ( ) ; } </s>
|
<s> package org . books . test . acceptance ; import cuke4duke . annotation . After ; import javax . naming . Context ; import javax . naming . InitialContext ; import javax . naming . NamingException ; import java . util . Properties ; public class ContainerInitializer { private final Context context ; public ContainerInitializer ( ) throws NamingException { Properties p = new Properties ( ) ; p . put ( Context . INITIAL_CONTEXT_FACTORY , "<STR_LIT>" ) ; p . put ( "<STR_LIT>" , "<STR_LIT>" ) ; p . put ( "<STR_LIT>" , "<STR_LIT>" ) ; p . put ( "<STR_LIT>" , "<STR_LIT>" ) ; p . put ( "<STR_LIT>" , "<STR_LIT>" ) ; p . put ( "<STR_LIT>" , "<STR_LIT>" ) ; context = new InitialContext ( p ) ; } public Context getContext ( ) { return context ; } @ After public void shutdown ( ) throws Exception { context . close ( ) ; } } </s>
|
<s> package org . books . test . acceptance ; import cuke4duke . annotation . I18n . EN . Then ; import cuke4duke . annotation . I18n . EN . When ; import org . apache . openejb . api . LocalClient ; import org . books . business . CartManager ; import org . books . domain . Book ; import javax . ejb . EJB ; import javax . naming . NamingException ; import static org . junit . Assert . assertEquals ; @ LocalClient public class ShoppingcartSteps extends ContainerSteps { @ EJB private CartManager cartManager ; public ShoppingcartSteps ( ContainerInitializer initializer ) throws NamingException { super ( initializer ) ; } @ When ( "<STR_LIT>" ) public void iPutABookIntoMyShoppingCart ( double price ) { Book book = new Book ( ) ; book . setPrice ( price ) ; cartManager . AddBook ( book , <NUM_LIT:1> ) ; } @ Then ( "<STR_LIT>" ) public void myShoppingCartShouldContainLineItems ( int count ) { assertEquals ( "<STR_LIT>" , count , cartManager . getLineItems ( ) . size ( ) ) ; } @ Then ( "<STR_LIT>" ) public void theTotalPriceShouldBe ( double price ) { assertEquals ( "<STR_LIT>" , price , cartManager . getTotalPrice ( ) , <NUM_LIT:0> ) ; } } </s>
|
<s> package org . books . test . acceptance ; import cuke4duke . annotation . After ; import cuke4duke . annotation . Before ; import cuke4duke . annotation . I18n . EN . Given ; import cuke4duke . annotation . I18n . EN . Then ; import cuke4duke . annotation . I18n . EN . When ; import org . apache . openejb . api . LocalClient ; import org . books . business . CatalogManager ; import org . books . dao . BookDao ; import org . books . domain . Book ; import org . books . domain . BookQuery ; import javax . ejb . EJB ; import javax . naming . NamingException ; import java . util . List ; import static org . junit . Assert . assertEquals ; @ LocalClient public class SearchSteps extends ContainerSteps { @ EJB private BookDao bookDao ; @ EJB private CatalogManager catalogManager ; public SearchSteps ( ContainerInitializer initializer ) throws NamingException { super ( initializer ) ; } private BookQuery bookQuery ; private List < Book > foundBooks ; @ Before public void init ( ) { bookQuery = new BookQuery ( ) ; } @ After public void shutdown ( ) throws NamingException { context . close ( ) ; } @ Given ( "<STR_LIT>" ) public void theFollowingBooksWithTable ( cuke4duke . Table table ) throws Exception { for ( List < String > row : table . rows ( ) ) { bookDao . addBook ( new Book ( row . get ( <NUM_LIT:0> ) , row . get ( <NUM_LIT:1> ) , Integer . parseInt ( ( row . get ( <NUM_LIT:2> ) ) ) , row . get ( <NUM_LIT:3> ) ) ) ; } } @ When ( "<STR_LIT>" ) public void searchForAuthor ( String author ) { bookQuery . setAuthor ( author ) ; } @ When ( "<STR_LIT>" ) public void searchForTitle ( String title ) { bookQuery . setTitle ( title ) ; } @ When ( "<STR_LIT>" ) public void searchForPublisher ( String publisher ) { bookQuery . setPublisher ( publisher ) ; } @ Then ( "<STR_LIT>" ) public void checkSearchResultCount ( int count ) throws Exception { foundBooks = catalogManager . searchBooks ( bookQuery ) ; assertEquals ( "<STR_LIT>" , count , foundBooks . size ( ) ) ; } } </s>
|
<s> package org . books . test . acceptance ; import cuke4duke . annotation . I18n . EN . Given ; import cuke4duke . annotation . I18n . EN . When ; import org . apache . openejb . api . LocalClient ; import org . books . business . OrderManager ; import org . books . domain . LineItem ; import javax . ejb . EJB ; import javax . naming . NamingException ; import java . util . ArrayList ; import java . util . List ; @ LocalClient public class OrderProcessingSteps extends ContainerSteps { @ EJB private OrderManager orderManager ; public OrderProcessingSteps ( ContainerInitializer initializer ) throws NamingException { super ( initializer ) ; } @ Given ( "<STR_LIT>" ) public void createNewOrder ( ) throws Exception { List < LineItem > lineItems = new ArrayList < LineItem > ( ) ; orderManager . createOrder ( lineItems , null , null ) ; } @ When ( "<STR_LIT>" ) public void wait ( int seconds ) throws Exception { Thread . sleep ( seconds * <NUM_LIT:1000> ) ; } } </s>
|
<s> package org . books . test . acceptance ; import cuke4duke . annotation . I18n . EN . Given ; import cuke4duke . annotation . I18n . EN . Then ; import cuke4duke . annotation . I18n . EN . When ; import org . apache . openejb . api . LocalClient ; import org . books . business . CartManager ; import org . books . dao . BookDao ; import org . books . dao . OrderDao ; import org . books . domain . Book ; import org . books . domain . Order ; import javax . ejb . EJB ; import javax . naming . NamingException ; import java . util . List ; import static org . junit . Assert . assertEquals ; @ LocalClient public class CheckoutSteps extends ContainerSteps { @ EJB private BookDao bookDao ; @ EJB private OrderDao orderDao ; @ EJB private CartManager cartManager ; public CheckoutSteps ( ContainerInitializer initializer ) throws NamingException { super ( initializer ) ; } @ Given ( "<STR_LIT>" ) public void cartContainsBook ( int count , double price ) throws Exception { for ( int i = <NUM_LIT:0> ; i < count ; i ++ ) { Book book = new Book ( ) ; book . setPrice ( price ) ; bookDao . addBook ( book ) ; cartManager . AddBook ( book , <NUM_LIT:1> ) ; } } @ When ( "<STR_LIT>" ) public void checkoutCart ( ) throws Exception { cartManager . checkout ( ) ; } @ Then ( "<STR_LIT>" ) public void checkOrderCreationAndPrice ( double price ) { List < Order > orders = orderDao . getOrders ( ) ; assertEquals ( <NUM_LIT:1> , orders . size ( ) ) ; Order order = orders . get ( <NUM_LIT:0> ) ; assertEquals ( price , order . getPrice ( ) , <NUM_LIT:0> ) ; } @ Then ( "<STR_LIT>" ) public void theOrderStateShouldBe ( String state ) { Order . Status status = Order . Status . valueOf ( state ) ; List < Order > orders = orderDao . getOrders ( ) ; assertEquals ( <NUM_LIT:1> , orders . size ( ) ) ; Order order = orders . get ( <NUM_LIT:0> ) ; assertEquals ( status , order . getStatus ( ) ) ; } } </s>
|
<s> package org . books . test . acceptance ; import javax . naming . Context ; import javax . naming . NamingException ; public abstract class ContainerSteps { protected static Context context ; public ContainerSteps ( ContainerInitializer initializer ) throws NamingException { context = initializer . getContext ( ) ; context . bind ( "<STR_LIT>" , this ) ; } } </s>
|
<s> package billing ; import cuke4duke . annotation . I18n . EN . Given ; import cuke4duke . annotation . I18n . EN . Then ; import static org . junit . Assert . assertTrue ; public class CalledSteps { private boolean magic ; @ Given ( "<STR_LIT>" ) public void itIs ( String what ) { if ( what . equals ( "<STR_LIT>" ) ) { magic = true ; } } @ Then ( "<STR_LIT>" ) public void magicShouldHappen ( ) { assertTrue ( magic ) ; } } </s>
|
<s> package billing ; import com . google . inject . Inject ; import cuke4duke . annotation . I18n . EN . Given ; import cuke4duke . annotation . I18n . EN . Then ; import cuke4duke . annotation . I18n . EN . When ; import java . math . BigDecimal ; import static org . junit . Assert . assertTrue ; public class BillingSteps { @ Inject private BillingService billingService ; private Transaction transaction ; private CreateTransactionResponse response ; @ Given ( "<STR_LIT>" ) public void iHaveATransaction ( ) { if ( transaction != null ) { throw new RuntimeException ( "<STR_LIT>" ) ; } transaction = new Transaction ( "<STR_LIT>" , new BigDecimal ( "<STR_LIT>" ) ) ; } @ When ( "<STR_LIT>" ) public void iSendTheTransactionToBilling ( ) { response = billingService . sendTransactionToBilling ( transaction ) ; } @ Then ( "<STR_LIT>" ) public void theResponseShouldBeOK ( ) { assertTrue ( response . isOK ( ) ) ; } } </s>
|
<s> package billing ; import com . google . inject . Inject ; import cuke4duke . StepMother ; import cuke4duke . Steps ; import cuke4duke . annotation . I18n . EN . When ; public class CallingSteps extends Steps { @ Inject public CallingSteps ( StepMother stepMother ) { super ( stepMother ) ; } @ When ( "<STR_LIT>" ) public void iCallAnotherStep ( ) { Given ( "<STR_LIT>" ) ; } } </s>
|
<s> package billing ; import billing . CreateTransactionResponse . Status ; public class SimpleBillingDatabase implements BillingDatabase { public Status createTransaction ( Transaction transaction ) { return Status . OK ; } } </s>
|
<s> package billing ; import billing . CreateTransactionResponse . Status ; import com . google . inject . Inject ; public class BillingService { private BillingDatabase database ; @ Inject public BillingService ( BillingDatabase database ) { this . database = database ; } public CreateTransactionResponse sendTransactionToBilling ( Transaction transaction ) { Status status = database . createTransaction ( transaction ) ; return new CreateTransactionResponse ( status , "<STR_LIT:OK>" ) ; } } </s>
|
<s> package billing ; import com . google . inject . AbstractModule ; public class DependenciesModule extends AbstractModule { SimpleBillingDatabase simpleBillingDatabase = new SimpleBillingDatabase ( ) ; @ Override protected void configure ( ) { bind ( BillingDatabase . class ) . toInstance ( simpleBillingDatabase ) ; } } </s>
|
<s> package billing ; import billing . CreateTransactionResponse . Status ; public interface BillingDatabase { public Status createTransaction ( Transaction transaction ) ; } </s>
|
<s> package billing ; import java . math . BigDecimal ; public class Transaction { private String customerId ; private BigDecimal amount ; public Transaction ( String customerId , BigDecimal amount ) { this . customerId = customerId ; this . amount = amount ; } @ Override public String toString ( ) { return "<STR_LIT>" + amount + "<STR_LIT>" + customerId + "<STR_LIT:]>" ; } } </s>
|
<s> package billing ; public class CreateTransactionResponse { public enum Status { OK , ERROR ; } private final Status status ; private final String description ; public CreateTransactionResponse ( Status status , String description ) { this . status = status ; this . description = description ; } public boolean isOK ( ) { return Status . OK . equals ( status ) ; } public String getDescription ( ) { return description ; } } </s>
|
<s> package cuke4duke . webdriver ; import cuke4duke . annotation . I18n . EN . Then ; import org . openqa . selenium . WebDriver ; import java . lang . reflect . InvocationTargetException ; import static org . junit . Assert . assertThat ; import static org . junit . matchers . JUnitMatchers . containsString ; public class ResultsPage { private final WebDriver d ; public ResultsPage ( WebDriverFacade facade ) throws InvocationTargetException , InstantiationException , IllegalAccessException { d = facade . getWebDriver ( ) ; } @ Then ( "<STR_LIT>" ) public void shouldSee ( String results ) { assertThat ( d . getPageSource ( ) , containsString ( results ) ) ; } } </s>
|
<s> package cuke4duke . webdriver ; import org . junit . Test ; import java . lang . reflect . InvocationTargetException ; public class Debugging { @ Test public void letsDebug ( ) throws InvocationTargetException , InstantiationException , IllegalAccessException { WebDriverFacade wdf = new WebDriverFacade ( ) ; ResultsPage rp = new ResultsPage ( wdf ) ; SearchPage sp = new SearchPage ( wdf ) ; sp . visit ( ) ; sp . search ( "<STR_LIT>" ) ; rp . shouldSee ( "<STR_LIT>" ) ; } } </s>
|
<s> package cuke4duke . webdriver ; import cuke4duke . annotation . After ; import org . openqa . selenium . WebDriver ; import java . lang . reflect . Constructor ; import java . lang . reflect . InvocationTargetException ; public class WebDriverFacade { private static Constructor < WebDriver > driverConstructor = getDriverConstructor ( ) ; @ SuppressWarnings ( "<STR_LIT:unchecked>" ) private static Constructor < WebDriver > getDriverConstructor ( ) { String driverName = System . getProperty ( "<STR_LIT>" , "<STR_LIT>" ) ; try { return ( Constructor < WebDriver > ) Thread . currentThread ( ) . getContextClassLoader ( ) . loadClass ( driverName ) . getConstructor ( ) ; } catch ( Throwable problem ) { problem . printStackTrace ( ) ; throw new RuntimeException ( "<STR_LIT>" + driverName , problem ) ; } } private WebDriver browser ; public WebDriver getWebDriver ( ) throws InvocationTargetException , IllegalAccessException , InstantiationException { if ( browser == null ) { browser = driverConstructor . newInstance ( ) ; } return browser ; } @ After public void closeBrowser ( ) throws IllegalAccessException , InvocationTargetException , InstantiationException { if ( browser != null ) { browser . close ( ) ; browser . quit ( ) ; } } } </s>
|
<s> package cuke4duke . webdriver ; import cuke4duke . annotation . I18n . EN . Given ; import cuke4duke . annotation . I18n . EN . When ; import org . openqa . selenium . By ; import org . openqa . selenium . WebDriver ; import org . openqa . selenium . WebElement ; import java . lang . reflect . InvocationTargetException ; public class SearchPage { private final WebDriver d ; public SearchPage ( WebDriverFacade facade ) throws InvocationTargetException , InstantiationException , IllegalAccessException { d = facade . getWebDriver ( ) ; } @ Given ( "<STR_LIT>" ) public void visit ( ) { d . get ( "<STR_LIT>" ) ; } @ When ( "<STR_LIT>" ) public void search ( String query ) { WebElement searchField = d . findElement ( By . name ( "<STR_LIT:q>" ) ) ; searchField . sendKeys ( query ) ; searchField . submit ( ) ; } } </s>
|
<s> package calc ; import java . util . ArrayList ; import java . util . List ; public class Calculator { List < Double > stack = new ArrayList < Double > ( ) ; public void push ( double arg ) { stack . add ( arg ) ; } public double divide ( ) { return stack . get ( <NUM_LIT:0> ) / stack . get ( <NUM_LIT:1> ) ; } } </s>
|
<s> package simple ; import cuke4duke . annotation . I18n . EN . Given ; import cuke4duke . annotation . I18n . EN . Then ; import cuke4duke . spring . StepDefinitions ; import static org . junit . Assert . assertTrue ; @ StepDefinitions public class CalledSteps { private boolean magic = false ; @ Given ( "<STR_LIT>" ) public void itIsMagic ( ) { this . magic = true ; } @ Then ( "<STR_LIT>" ) public void magicShouldHappen ( ) { assertTrue ( magic ) ; } } </s>
|
<s> package simple ; import cuke4duke . annotation . I18n . EN . Given ; import cuke4duke . annotation . I18n . EN . Then ; import cuke4duke . annotation . I18n . EN . When ; import cuke4duke . spring . StepDefinitions ; import org . springframework . beans . factory . annotation . Autowired ; import static org . junit . Assert . assertEquals ; import static org . junit . Assert . assertNotNull ; @ StepDefinitions public class GreeterSteps { @ Autowired private Greeter greeter ; private String helloResponse ; @ Given ( "<STR_LIT>" ) public void iHaveAGreeter ( ) { assertNotNull ( greeter ) ; } @ When ( "<STR_LIT>" ) public void iAskTheWorldForHello ( ) { helloResponse = greeter . hello ( ) ; } @ Then ( "<STR_LIT>" ) public void theResponseShouldBe ( String response ) { assertEquals ( response , helloResponse ) ; } } </s>
|
<s> package simple ; import cuke4duke . StepMother ; import cuke4duke . Steps ; import cuke4duke . annotation . I18n . EN . When ; import cuke4duke . spring . StepDefinitions ; import org . springframework . beans . factory . annotation . Autowired ; @ StepDefinitions public class CallingSteps extends Steps { @ Autowired public CallingSteps ( StepMother stepMother ) { super ( stepMother ) ; } @ When ( "<STR_LIT>" ) public void iCallAnotherStep ( ) { Given ( "<STR_LIT>" ) ; } } </s>
|
<s> package simple ; import org . springframework . stereotype . Component ; @ Component public class MyGreeter implements Greeter { public String hello ( ) { return "<STR_LIT>" ; } } </s>
|
<s> package simple ; public interface Greeter { String hello ( ) ; } </s>
|
<s> package erjang ; import java . io . File ; import erjang . m . erlang . ErlConvert ; import junit . framework . TestCase ; public abstract class AbstractErjangTestCase extends TestCase { protected File file ; public AbstractErjangTestCase ( File file ) { super ( file . getName ( ) ) ; this . file = file ; } public AbstractErjangTestCase ( String name ) { super ( name ) ; file = new File ( name ) ; } public void setFile ( File file ) { this . file = file ; this . setName ( file . getName ( ) ) ; } protected EObject processOutput ( byte [ ] bin ) { int offset = <NUM_LIT:0> ; int len = bin . length ; for ( int i = <NUM_LIT:0> ; i < len - <NUM_LIT:6> ; i ++ ) { if ( bin [ i + <NUM_LIT:0> ] == '<CHAR_LIT>' && bin [ i + <NUM_LIT:1> ] == '<CHAR_LIT:A>' && bin [ i + <NUM_LIT:2> ] == '<CHAR_LIT>' && bin [ i + <NUM_LIT:3> ] == '<CHAR_LIT:A>' && bin [ i + <NUM_LIT:4> ] == '<CHAR_LIT::>' && bin [ i + <NUM_LIT:5> ] == '<CHAR_LIT::>' ) { offset = i + <NUM_LIT:6> ; break ; } } EBinary binOutput = new EBinary ( bin , offset , len - offset ) ; try { return ErlConvert . binary_to_term ( binOutput ) ; } catch ( Throwable e ) { System . err . println ( "<STR_LIT>" + e ) ; System . err . println ( "<STR_LIT>" + binOutput ) ; System . err . println ( "<STR_LIT>" + new EBinary ( bin ) + "<STR_LIT>" + offset ) ; return null ; } } } </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.