Created
March 9, 2015 11:39
-
-
Save kamioftea/fc9d5da8d2a64b22a545 to your computer and use it in GitHub Desktop.
Template for overridden getter etc.
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
#set ($UNDERSCORE_REGEX = "(((?<=[^\\d_])\\d)|((?<=[^A-Z_])[A-Z])|((?<=[A-Z])[A-Z][a-z]))") | |
#set ($REMOVE_REGEX = "^(get|set|add|remove)_") | |
#set ($SNAKE_CASE_NAME = $NAME.replaceAll($UNDERSCORE_REGEX, "_$1").replaceAll($REMOVE_REGEX, "").toLowerCase()) | |
#if (${RETURN}) | |
$$SNAKE_CASE_NAME = parent::${NAME}(${PARAM_LIST}); | |
#end | |
// TODO: Change the autogenerated stub | |
#if (${RETURN}) | |
return $${SNAKE_CASE_NAME}; | |
#else | |
parent::${NAME}(${PARAM_LIST}); | |
#end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment