Re: SISC Scheme in an Android App - Source Code Release

Ben Goetter <[email protected]> Wed, 03 Mar 2010 07:55:54 -0800
Newsgroups gmane.comp.java.sisc.user
Message-ID <[email protected]>
I'm a little late to the game, here.

I'm working on bringing a REPL up on Android, too, and so experimenting 
with SISC, and so very pleased to have you working on this before me.  
Haven't been using your project because I'm trying to avoid GPL 
contamination, and because I'm not an Eclipse user.  But I still must 
share whatever I can.

To avoid injecting all those beans into the source, replace 
NativeParameter.init() with something like the following:

     private void init() {
         try {
             readMethod = DynamicEnvironment.class.getMethod(
              "get" + Character.toUpperCase(fieldName.charAt(0)) + 
fieldName.substring(1), new Class[] {});
         } catch (NoSuchMethodException e) {
             throw new RuntimeException(liMessage(SISCB, 
"nativeparamnotfound", fieldName));
         }
         try {
             writeMethod = DynamicEnvironment.class.getMethod(
              "set" + Character.toUpperCase(fieldName.charAt(0)) + 
fieldName.substring(1), new Class[] { Value.class } );
         } catch (NoSuchMethodException e) {
             throw new RuntimeException(liMessage(SISCB, 
"nativeparamnotfound", fieldName));
         }
     }

This works because the properties on DynamicEnvironment do not need the 
generality of the Introspector or PropertyDescriptor beans.  They are 
simple and quite uniform, and so easy to reflect manually.

Cc sisc-users so everybody else can laugh at my n00b Java

On 2/22/2010 7:04 PM, Chad Albers wrote:
>
> To get it to run,  I have managed to extract out the java.beans 
> classes that are minimally necessary to get SISC to compile under 
> Android.  Since they are under GPL, I can distribute them with my source.
>


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev