cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <andre.juf...@oulu.fi>
Subject Re: C2.2: Accessing static method on Java object with Flowscript
Date Mon, 15 Aug 2011 06:37:17 GMT
Ok, thanks. It is a bit counterintuitive. One would not expect that to 
be possible, but it works.

On 15/08/11 08:23, Thomas Markus wrote:
> Hi,
>
> i missed the private
>
> i tried direct access and it works fine:
>
> var U = Packages.com.foo bar.UseFul;
> U.someMethod('text1', 'stringb');
>
> Packages.com.foo.bar.UseFul.someMethod('text1', 'stringb');
>
>
> public class UseFul {
>
>     private UseFul() {}
>
>     public static void someMethod(String a, String b) {
>         System.out.println("a=" + a + "  b=" + b);
>     }
>
> }
>
>
> I'm using C2.2
>
> regards
> Thomas
>
>
> Am 14.08.2011 20:20, schrieb Andre Juffer:
>> On 08/14/2011 03:04 PM, Thomas Markus wrote:
>>> Hi,
>>>
>>> or create an instance without spring:
>>>
>>> var bean = new com.foo.bar.Useful();
>>> bean.someMethod(arg1, arg2);
>>
>> Actually, this would (should) not work as the constructor of Useful 
>> is private. It may be that this would not matter in flow, that is, 
>> one can call private constructors (did not try). In Spring this is 
>> possible. 
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


-- 
Andre H. Juffer              | Phone: +358-8-553 1161
Biocenter Oulu and           | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juffer@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StrucBioCat                  | WWW: www.strucbiocat.oulu.fi
Triacle Biocomputing         | WWW: www.triacle-bc.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message