Skip to content

Instantly share code, notes, and snippets.

@oehme
Created November 28, 2014 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oehme/9de2d854f53dff2cc411 to your computer and use it in GitHub Desktop.
Save oehme/9de2d854f53dff2cc411 to your computer and use it in GitHub Desktop.
Helper functions for the method name and parameter types
def keyToMethodName(String key) {
CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, key).toFirstLower
}
def argumentType(Format format, extension TypeReferenceProvider typeRefs) {
switch format {
NumberFormat: Number.newTypeReference
DateFormat: Date.newTypeReference
default: object
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment