You are viewing a plain text version of this content. The canonical link for it is here.
Posted to imperius-dev@incubator.apache.org by David Wood <da...@us.ibm.com> on 2009/05/18 14:10:36 UTC

Overloaded java methods

All,

Per the following discussion on the user mailing list, to which there was 
agreement,

The Java binding for SPL is currently somewhat limited in that we can't 
use overloaded methods in the SPL policy.  This seems to have arisen 
because CIM-SPL does not use overloading. Given that we have a Java 
binding, it seems to make sense to extend Imperius to support Java 
overloading.  BTW, this is a bug submitted as Imperius-23 (
https://issues.apache.org/jira/browse/IMPERIUS-23).  What do people think? 


As identified in Imperius-23,the symbol table gets multiple requests to 
store the 'getProperty' method with the key 'getProperty' (w/o the 
parameters).  This keeps over writing the last method that was in the map. 
 The map eventually gets merged into an SPLSymbolTable which only provides 
a getSymbol(String ).  We have at least two options:

Change the keys so they include the  information from the parameter list 
(probably best to provide a static MethodSymbol.getKey(classname, 
methodname, paramlist) so we don't have classname + "." + methodname + 
paramelist sprinkled all over the place).
Change the symbol table(s) so they store multiple instances for a given 
key.

Thoughts?


David Wood 
Policy Technologies Group
IBM TJ Watson Research Center
dawood@us.ibm.com
914-784-5123 (office), 914-396-6515 (mobile)

Re: Overloaded java methods

Posted by Neeraj Joshi <jn...@us.ibm.com>.
Hey David,
I would prefer generating a unique key using the getKey method as you 
described I agree it will make the code cleaner by eliminating
"class"."method" that is pervasive today.

Thanks
Neeraj
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"The light at the end of the tunnel...may be you"

 
Neeraj Joshi
WebSphere XD - Compute Grid
AIM, IBM
Apache Imperius - http://incubator.apache.org/imperius
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



From:
David Wood/Watson/IBM@IBMUS
To:
imperius-dev@incubator.apache.org
Date:
05/18/2009 10:11 AM
Subject:
Overloaded java methods



All,

Per the following discussion on the user mailing list, to which there was 
agreement,

The Java binding for SPL is currently somewhat limited in that we can't 
use overloaded methods in the SPL policy.  This seems to have arisen 
because CIM-SPL does not use overloading. Given that we have a Java 
binding, it seems to make sense to extend Imperius to support Java 
overloading.  BTW, this is a bug submitted as Imperius-23 (
https://issues.apache.org/jira/browse/IMPERIUS-23).  What do people think? 



As identified in Imperius-23,the symbol table gets multiple requests to 
store the 'getProperty' method with the key 'getProperty' (w/o the 
parameters).  This keeps over writing the last method that was in the map. 

 The map eventually gets merged into an SPLSymbolTable which only provides 

a getSymbol(String ).  We have at least two options:

Change the keys so they include the  information from the parameter list 
(probably best to provide a static MethodSymbol.getKey(classname, 
methodname, paramlist) so we don't have classname + "." + methodname + 
paramelist sprinkled all over the place).
Change the symbol table(s) so they store multiple instances for a given 
key.

Thoughts?


David Wood 
Policy Technologies Group
IBM TJ Watson Research Center
dawood@us.ibm.com
914-784-5123 (office), 914-396-6515 (mobile)