-
-
Notifications
You must be signed in to change notification settings - Fork 690
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API renames, based on feedback in cucumber/cucumber-js#764
- Loading branch information
1 parent
a319df2
commit d364c4b
Showing
70 changed files
with
932 additions
and
945 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
...ber-expressions/java/src/main/java/io/cucumber/cucumberexpressions/AbstractParameter.java
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
...expressions/java/src/main/java/io/cucumber/cucumberexpressions/AbstractParameterType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package io.cucumber.cucumberexpressions; | ||
|
||
import java.lang.reflect.Type; | ||
import java.util.List; | ||
|
||
import static java.util.Collections.singletonList; | ||
|
||
public abstract class AbstractParameterType<T> implements ParameterType<T> { | ||
private final String typeName; | ||
private final Type type; | ||
private final List<String> regexps; | ||
|
||
public AbstractParameterType(String name, Type type, List<String> regexps) { | ||
this.regexps = regexps; | ||
this.typeName = name; | ||
this.type = type; | ||
} | ||
|
||
public AbstractParameterType(String typeName, Type type, String regexp) { | ||
this(typeName, type, singletonList(regexp)); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return typeName; | ||
} | ||
|
||
@Override | ||
public Type getType() { | ||
return type; | ||
} | ||
|
||
@Override | ||
public List<String> getRegexps() { | ||
return regexps; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
cucumber-expressions/java/src/main/java/io/cucumber/cucumberexpressions/ClassParameter.java
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
...er-expressions/java/src/main/java/io/cucumber/cucumberexpressions/ClassParameterType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package io.cucumber.cucumberexpressions; | ||
|
||
import java.lang.reflect.Type; | ||
import java.util.List; | ||
|
||
public class ClassParameterType<T> implements ParameterType<T> { | ||
private final ParameterType<T> delegate; | ||
|
||
public ClassParameterType(Class<T> type) { | ||
if (type.isEnum()) { | ||
delegate = (ParameterType<T>) new EnumParameterType<>((Class<? extends Enum>) type); | ||
} else { | ||
delegate = new ConstructorParameterType<>(type); | ||
} | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return delegate.getName(); | ||
} | ||
|
||
@Override | ||
public Type getType() { | ||
return delegate.getType(); | ||
} | ||
|
||
@Override | ||
public List<String> getRegexps() { | ||
return delegate.getRegexps(); | ||
} | ||
|
||
@Override | ||
public T transform(String value) { | ||
return delegate.transform(value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.