Skip to content

custom types #13

Description

@danielburrell

Allow users to point to custom types like
uk.co.solong.rest2java.custom.BooleanNumber
a class that tells the controller to accept boolean but provide 1,0 as output
Another example:
uk.co.solong.rest2java.custom.BooleanYes
a class that tells the controller to accept boolean but provide yes,no as output
These can all be helper useful classes, like array to csv
but more generally make the code generic so that it accepts constructor types with tostring
where you promise to provide your own class that accepts a value as a constructor and a string as output. (maybe pass in to constructor regardless rather than just doing toString)
provide override method to call instead of tostring instead. (0-arity)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions