Does class 'Rexx' extend Java STRINGs or Java OBJECTs ??

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Does class 'Rexx' extend Java STRINGs or Java OBJECTs ??

ThSITC
The primary question between all those my (small) problems seems to be:

1.) Does class Rexx extend Java OBJECTs or Java STRINGs ?

Without access to the current NetRexxC source, I'm feeling that
NetRexxC Rexx strings do EXTEND Java Objects!

Right?
Thomas.

--
Thomas Schneider (www.thsitc.com)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com
Reply | Threaded
Open this post in threaded view
|

Re: Does class 'Rexx' extend Java STRINGs or Java OBJECTs ??

George Hovey-2
Thomas,
I believe all classes extend Object.
George

On Mon, May 16, 2011 at 12:41 PM, Thomas Schneider <[hidden email]> wrote:
The primary question between all those my (small) problems seems to be:

1.) Does class Rexx extend Java OBJECTs or Java STRINGs ?

Without access to the current NetRexxC source, I'm feeling that
NetRexxC Rexx strings do EXTEND Java Objects!

Right?
Thomas.

--
Thomas Schneider (www.thsitc.com)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Does class 'Rexx' extend Java STRINGs or Java OBJECTs ??

rickmcguire
In reply to this post by ThSITC
The Java String class is FINAL, which means it cannot be extended.

Rick

On Mon, May 16, 2011 at 12:41 PM, Thomas Schneider
<[hidden email]> wrote:

> The primary question between all those my (small) problems seems to be:
>
> 1.) Does class Rexx extend Java OBJECTs or Java STRINGs ?
>
> Without access to the current NetRexxC source, I'm feeling that
> NetRexxC Rexx strings do EXTEND Java Objects!
>
> Right?
> Thomas.
>
> --
> Thomas Schneider (www.thsitc.com)
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>
_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Does class 'Rexx' extend Java STRINGs or Java OBJECTs ??

ThSITC
In reply to this post by George Hovey-2
Hi George,

*me too*

The question I'm raising here is why NetRexxC 2.05 does *not convert*

Options BINARY
a = ''   /* now a Java String */

a = a.upper() /* was formerly a Rexx String */

TO:

a = a.toupper() /* which is the appopate (and identical) Java method */

*OR*:

a = Rexx(a).upper() -- which is the NetRexx Notation

Thomas
===========================================================
 

Am 16.05.2011 19:27, schrieb George Hovey:
Thomas,
I believe all classes extend Object.
George

On Mon, May 16, 2011 at 12:41 PM, Thomas Schneider <[hidden email]> wrote:
The primary question between all those my (small) problems seems to be:

1.) Does class Rexx extend Java OBJECTs or Java STRINGs ?

Without access to the current NetRexxC source, I'm feeling that
NetRexxC Rexx strings do EXTEND Java Objects!

Right?
Thomas.

--
Thomas Schneider (www.thsitc.com)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]




--
Thomas Schneider (www.thsitc.com)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com
Reply | Threaded
Open this post in threaded view
|

Re: Does class 'Rexx' extend Java STRINGs or Java OBJECTs ??

ThSITC
In reply to this post by rickmcguire
Hello Rick,

     didn't know that!

Thanks a lot !
Thomas.
==================================================
Am 16.05.2011 19:30, schrieb Rick McGuire:

> The Java String class is FINAL, which means it cannot be extended.
>
> Rick
>
> On Mon, May 16, 2011 at 12:41 PM, Thomas Schneider
> <[hidden email]>  wrote:
>> The primary question between all those my (small) problems seems to be:
>>
>> 1.) Does class Rexx extend Java OBJECTs or Java STRINGs ?
>>
>> Without access to the current NetRexxC source, I'm feeling that
>> NetRexxC Rexx strings do EXTEND Java Objects!
>>
>> Right?
>> Thomas.
>>
>> --
>> Thomas Schneider (www.thsitc.com)
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>>
>>


--
Thomas Schneider (www.thsitc.com)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com
Reply | Threaded
Open this post in threaded view
|

Re: Does class 'Rexx' extend Java STRINGs or Java OBJECTs ??

alansam


On 16 May 2011 10:55, Thomas Schneider <[hidden email]> wrote:
Hello Rick,

   didn't know that!


It's really easy and doesn't need the NetRexx source to determine the signature of the netrexx.lang.Rexx (or any other) class.  The tools are part of the JDK and have provided since Java's earliest releases.

In this case you simply need to use the "Class File Dissasembler": javap.  Here is a sample of the output from my system for netrexx.lang.Rexx (the class's signature is in bold and I've included constructor signatures too):
$ javap netrexx.lang.Rexx
Compiled from "Rexx.nrx"
public class netrexx.lang.Rexx extends java.lang.Object implements netrexx.lang.RexxOperators,java.io.Serializable{
    public static final int DefaultDigits;
    public static final byte DefaultForm;
    public static final java.lang.String Lowers;
    public static final java.lang.String Uppers;
    public static final java.lang.String Digits09;
    public static final char[] Hexes;
...
    netrexx.lang.Rexx();
    public netrexx.lang.Rexx(byte);
    public netrexx.lang.Rexx(char);
    public netrexx.lang.Rexx(double);
    public netrexx.lang.Rexx(float);
    public netrexx.lang.Rexx(int);
    public netrexx.lang.Rexx(long);
    public netrexx.lang.Rexx(java.lang.String);
    public netrexx.lang.Rexx(netrexx.lang.Rexx);
    public netrexx.lang.Rexx(short);
    public netrexx.lang.Rexx(boolean);
    public netrexx.lang.Rexx(char[]);
    netrexx.lang.Rexx(char[], boolean);
    public netrexx.lang.Rexx(java.lang.String[]);
...


and for completeness here's java.lang.String:

$ javap java.lang.String
Compiled from "String.java"
public final class java.lang.String extends java.lang.Object implements java.io.Serializable,java.lang.Comparable,java.lang.CharSequence{
    public static final java.util.Comparator CASE_INSENSITIVE_ORDER;
    public java.lang.String();
    public java.lang.String(java.lang.String);
    public java.lang.String(char[]);
    public java.lang.String(char[], int, int);
    public java.lang.String(int[], int, int);
    public java.lang.String(byte[], int, int, int);
    public java.lang.String(byte[], int);
    public java.lang.String(byte[], int, int, java.lang.String)       throws java.io.UnsupportedEncodingException;
    public java.lang.String(byte[], int, int, java.nio.charset.Charset);
    public java.lang.String(byte[], java.lang.String)       throws java.io.UnsupportedEncodingException;
    public java.lang.String(byte[], java.nio.charset.Charset);
    public java.lang.String(byte[], int, int);
    public java.lang.String(byte[]);
    public java.lang.String(java.lang.StringBuffer);
    public java.lang.String(java.lang.StringBuilder);
    java.lang.String(int, int, char[]);
    public int length();

...

Alan.

--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Alan

--
Needs more cowbell.