Class UnderscoredCamelCaseResolver
- All Implemented Interfaces:
StoryPathResolver
Resolves story paths converting the camel-cased Java core class to lower-case underscore-separated paths e.g.: "org.jbehave.core.ICanLogin.java" -> "org/jbehave/core/i_can_login.story".
By default, the AbstractStoryPathResolver.DEFAULT_EXTENSION
is used
but this can be configured via the constructor so that we can resolve class
to use another or no extension at all, e.g.:
"org.jbehave.core.ICanLogin.java" -> "org/jbehave/core/i_can_login".
The default resolution pattern NUMBERS_AS_LOWER_CASE_LETTERS_PATTERN
treats numbers as lower case letters, e.g.:
"org.jbehave.core.ICanLoginTo1Site.java" ->
"org/jbehave/core/i_can_login_to1_site"
Choose NUMBERS_AS_UPPER_CASE_LETTERS_PATTERN
to treat numbers as
upper case letters, e.g.: "org.jbehave.core.ICanLoginTo1Site.java" ->
"org/jbehave/core/i_can_login_to_1_site"
-
Field Summary
-
Constructor Summary
ConstructorDescriptionUnderscoredCamelCaseResolver
(String extension) UnderscoredCamelCaseResolver
(String extension, String resolutionPattern) UnderscoredCamelCaseResolver
(String extension, String resolutionPattern, Locale locale) -
Method Summary
Modifier and TypeMethodDescriptionremoveFromClassName
(String wordToRemove) protected String
resolveName
(Class<? extends Embeddable> embeddableClass) Methods inherited from class org.jbehave.core.io.AbstractStoryPathResolver
resolve, resolveDirectory
-
Field Details
-
NUMBERS_AS_LOWER_CASE_LETTERS_PATTERN
- See Also:
-
NUMBERS_AS_UPPER_CASE_LETTERS_PATTERN
- See Also:
-
-
Constructor Details
-
UnderscoredCamelCaseResolver
public UnderscoredCamelCaseResolver() -
UnderscoredCamelCaseResolver
-
UnderscoredCamelCaseResolver
-
UnderscoredCamelCaseResolver
-
-
Method Details
-
resolveName
- Specified by:
resolveName
in classAbstractStoryPathResolver
-
removeFromClassName
-