axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sunil Veera (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AXIS2-5649) Allow the access specifier of the mutators to be configrurable in the axis2 generated artifact classes
Date Fri, 16 May 2014 19:40:35 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-5649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sunil Veera updated AXIS2-5649:
-------------------------------

    Description: 
Right now, all the getters and setters {{getX}} and {{setX}} that operate on the instance
variables {{localX}} are public. 

We'd like the access of the setters at least to be {{private}}, preferably made configurable,
so the users can specify their preferences via a new configuration parameter, say '{{setterAccess}}'
in the calling maven plugin. This would help maintain the immutability of the generated service
objects. 

Without this, we resort to hoping that the clients of these generated classes won't modify
the objects in a way we don't want them to.

Typically, here's how a setter template looks in all of the {{*Template.xsl}} files in the
{{axis2-adb-codegen}}:
{code:java}
/**
* Auto generated setter method
* Overridden from <xsl:value-of select="$restriction"/>
*
* @param param <xsl:value-of select="$javaName"/>
* @throws RuntimeException
*/
private void set<xsl:value-of select="$javaName"/>(<xsl:value-of select="$propertyType"/>
param){
      throw new java.lang.RuntimeException();
}
{code}

We'd like the access specifier of these setters to be made configurable like many other attributes
are.

  was:
Right now, all the getters and setters {{getX}} and {{setX}} that operate on the instance
variables {{localX}} are public. 

We'd like the access of the setters at least to be {{private}}, preferably made configurable,
so the users can specify their preferences via a new configuration parameter, say '{{setterAccess}}'
in the calling maven plugin. This would help maintain the immutability of the generated service
objects. 

Without this, we resort to hoping that the clients of these generated classes won't modify
it.

Typically here's how a setter template looks in all the xsl files in the {{axis2-adb-codegen}}:
{code:java}
/**
* Auto generated setter method
* Overridden from <xsl:value-of select="$restriction"/>
*
* @param param <xsl:value-of select="$javaName"/>
* @throws RuntimeException
*/
private void set<xsl:value-of select="$javaName"/>(<xsl:value-of select="$propertyType"/>
param){
      throw new java.lang.RuntimeException();
}
{code}

We'd like the access specifier of these setters to be made configurable like many other attributes
are.


> Allow the access specifier of the mutators to be configrurable in the axis2 generated
artifact classes
> ------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5649
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5649
>             Project: Axis2
>          Issue Type: Improvement
>          Components: adb, codegen
>    Affects Versions: 1.6.2
>            Reporter: Sunil Veera
>              Labels: axis2, axis2_1.6.2
>             Fix For: 1.6.3
>
>
> Right now, all the getters and setters {{getX}} and {{setX}} that operate on the instance
variables {{localX}} are public. 
> We'd like the access of the setters at least to be {{private}}, preferably made configurable,
so the users can specify their preferences via a new configuration parameter, say '{{setterAccess}}'
in the calling maven plugin. This would help maintain the immutability of the generated service
objects. 
> Without this, we resort to hoping that the clients of these generated classes won't modify
the objects in a way we don't want them to.
> Typically, here's how a setter template looks in all of the {{*Template.xsl}} files in
the {{axis2-adb-codegen}}:
> {code:java}
> /**
> * Auto generated setter method
> * Overridden from <xsl:value-of select="$restriction"/>
> *
> * @param param <xsl:value-of select="$javaName"/>
> * @throws RuntimeException
> */
> private void set<xsl:value-of select="$javaName"/>(<xsl:value-of select="$propertyType"/>
param){
>       throw new java.lang.RuntimeException();
> }
> {code}
> We'd like the access specifier of these setters to be made configurable like many other
attributes are.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message