question about primitive chars

View: New views
4 Messages — Rating Filter:   Alert me  

question about primitive chars

by j pimmel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

All

I have an external Java compiled lib whose public interface method expects a primitive char arg.

Does groovy (and am using grails here, 1.2M2 - though shouldn't matter) not autobox for such methods? All my efforts to try to get this method called from my groovy code are failing. No amount of toCharacter().toChar() or other approaches is yielding any success. My tests are failing because the signature expected on the external lib is not one which matches the args I am generating -

groovy.lang.MissingMethodException: No signature of method: net.sf.flatpack.DefaultParserFactory.newDelimitedParser() is applicable for argument types: (java.io.BufferedReader, java.io.BufferedReader, java.lang.Character, null, java.lang.Boolean) values: [java.io.BufferedReader@5cee644c, java.io.BufferedReader@26fae93e, |, null, false]

Any suggetions?

--
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct."  -  Dr. Niels Bohr

### Craft @ http://www.linkedin.com/in/jpimmel
###  Vox @ http://act.ualise.com/blogs/continuous-innovation
###  Twit @ http://twitter.com/franklywatson

Re: question about primitive chars

by Jochen Theodorou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

j pimmel schrieb:
[...]
> |groovy.lang.MissingMethodException: No signature of method:
> net.sf.flatpack.DefaultParserFactory.newDelimitedParser() is applicable
> for argument types: (java.io.BufferedReader, java.io.BufferedReader,
> java.lang.Character, null, java.lang.Boolean) values:
> [java.io.BufferedReader@5cee644c, java.io.BufferedReader@26fae93e, |,
> null, false]|
>
> Any suggetions?

how does the signature of the method look like?

bye blackdrag

--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: question about primitive chars

by j pimmel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://flatpack.sourceforge.net/apidocs/net/sf/flatpack/DefaultParserFactory.html


newDelimitedParser(java.io.InputStream pzmapXMLStream, java.io.InputStream dataSourceStream, char delimiter, char qualifier, boolean ignoreFirstRecord)

I've been scanning the API and these guys are using char everywhere.. Asides from the problem this is causing my groovy dev, what bites about using char is the inability to specify a null value... sigh

On Mon, Nov 2, 2009 at 3:54 PM, Jochen Theodorou <blackdrag@...> wrote:
j pimmel schrieb:
[...]

|groovy.lang.MissingMethodException: No signature of method: net.sf.flatpack.DefaultParserFactory.newDelimitedParser() is applicable for argument types: (java.io.BufferedReader, java.io.BufferedReader, java.lang.Character, null, java.lang.Boolean) values: [java.io.BufferedReader@5cee644c, java.io.BufferedReader@26fae93e, |, null, false]|

Any suggetions?

how does the signature of the method look like?

bye blackdrag

--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email





--
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct."  -  Dr. Niels Bohr

### Craft @ http://www.linkedin.com/in/jpimmel
###  Vox @ http://act.ualise.com/blogs/continuous-innovation
###  Twit @ http://twitter.com/franklywatson

Re: question about primitive chars

by j pimmel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I pasted the wrong method, they have a Reader enabled method

http://flatpack.sourceforge.net/apidocs/net/sf/flatpack/DefaultParserFactory.html#newDelimitedParser%28java.io.Reader,%20java.io.Reader,%20char,%20char,%20boolean%29

When i used

    "," as char

that seemed to fix it.. took me a while to find an example online from someone else


On Mon, Nov 2, 2009 at 3:59 PM, j pimmel <frankly.watson@...> wrote:
http://flatpack.sourceforge.net/apidocs/net/sf/flatpack/DefaultParserFactory.html


newDelimitedParser(java.io.InputStream pzmapXMLStream, java.io.InputStream dataSourceStream, char delimiter, char qualifier, boolean ignoreFirstRecord)

I've been scanning the API and these guys are using char everywhere.. Asides from the problem this is causing my groovy dev, what bites about using char is the inability to specify a null value... sigh


On Mon, Nov 2, 2009 at 3:54 PM, Jochen Theodorou <blackdrag@...> wrote:
j pimmel schrieb:
[...]

|groovy.lang.MissingMethodException: No signature of method: net.sf.flatpack.DefaultParserFactory.newDelimitedParser() is applicable for argument types: (java.io.BufferedReader, java.io.BufferedReader, java.lang.Character, null, java.lang.Boolean) values: [java.io.BufferedReader@5cee644c, java.io.BufferedReader@26fae93e, |, null, false]|

Any suggetions?

how does the signature of the method look like?

bye blackdrag

--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email





--
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct."  -  Dr. Niels Bohr

### Craft @ http://www.linkedin.com/in/jpimmel
###  Vox @ http://act.ualise.com/blogs/continuous-innovation
###  Twit @ http://twitter.com/franklywatson



--
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct."  -  Dr. Niels Bohr

### Craft @ http://www.linkedin.com/in/jpimmel
###  Vox @ http://act.ualise.com/blogs/continuous-innovation
###  Twit @ http://twitter.com/franklywatson