users@jaxb.java.net

Re: CodeModel Patch

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 16 Jan 2007 12:53:02 -0800

Dan Diephouse wrote:
> Hiya,
>
> Was wondering if I could request a small change to the CodeModel API. I'd
> like to be able to change a JMethod's return type after it has been created.
> My use case is that I've created a kind of domain specific builder around
> the code model APIs and in my builder interface you don't really specify the
> return value until the end of your usage with it. While I could change my
> API around it would require a lot more code to hold all the information
> about what to build in memory until the very end - as opposed to just
> writing this.
>
> Any chance that this could be integrated?

Oh, sure thing! Can you take a look at
https://glassfish.dev.java.net/public/GovernancePolicy.html#SCA_Policy
and file an SCA? We need to ask that for every patch integration.

Beyond that, I'd be more than happy to have you as a committer, if you
are interested.

Please also let me know your java.net ID.

>
> Thanks,
> - Dan
>
>
> Index: codemodel/src/com/sun/codemodel/JMethod.java
> ===================================================================
> RCS file:
> /cvs/jaxb2-sources/jaxb-ri/codemodel/src/com/sun/codemodel/JMethod.java,v
> retrieving revision 1.10
> diff -u -r1.10 JMethod.java
> --- codemodel/src/com/sun/codemodel/JMethod.java 1 Jun 2006 17:35:44
> -0000 1.10
> +++ codemodel/src/com/sun/codemodel/JMethod.java 15 Jan 2007 03:15:29
> -0000
> @@ -269,8 +269,12 @@
> public JType type() {
> return type;
> }
> -
> - /**
> +
> + public void setType(JType type) {
> + this.type = type;
> + }
> +
> + /**
> * Returns all the parameter types in an array.
> * @return
> * If there's no parameter, an empty array will be returned.
>


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com