[jboss-jira] [JBoss JIRA] (LOGTOOL-86) Add ability to use contravariant return type

David Lloyd (JIRA) issues at jboss.org
Wed Oct 8 16:58:12 EDT 2014


David Lloyd created LOGTOOL-86:
----------------------------------

             Summary: Add ability to use contravariant return type
                 Key: LOGTOOL-86
                 URL: https://issues.jboss.org/browse/LOGTOOL-86
             Project: Log Tool
          Issue Type: Enhancement
            Reporter: David Lloyd
            Assignee: James Perkins
            Priority: Minor


I'd like to have the ability to specify a *less* specific type as the return type compared to the type that is instantiated.

For example I should be able to say something like this:

{code}
    @Message(id = 12345, value = "There is a big problem named %s")
    @ConstructType(IllegalArgumentException.class) // <-
    RuntimeException bigProblem(String blah);
{code}

In this example I'm generating a method which returns {{RuntimeException}}, however the actual exception type I want to construct is an {{IllegalArgumentException}}.



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the jboss-jira mailing list