JavaDescriptor.st
author Claus Gittinger <cg@exept.de>
Wed, 26 Jun 2019 22:06:15 +0200
branchcvs_MAIN
changeset 3917 94088b7097d5
parent 3582 b592fb3845d4
child 3961 72bd0e4ba4d0
permissions -rw-r--r--
#OTHER by cg +bracketStrings
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     1
"
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2993
diff changeset
     2
 COPYRIGHT (c) 1996-2015 by Claus Gittinger
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
     3
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
     4
 New code and modifications done at SWING Research Group [1]:
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
     5
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2993
diff changeset
     6
 COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     7
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     8
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     9
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    10
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    12
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    13
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    14
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    15
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
    16
 [1] Code written at SWING Research Group contains a signature
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
    17
     of one of the above copright owners. For exact set of such code,
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
    18
     see the differences between this version and version stx:libjava
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
    19
     as of 1.9.2010
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    20
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    21
"{ Package: 'stx:libjava' }"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    22
3582
b592fb3845d4 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 3412
diff changeset
    23
"{ NameSpace: Smalltalk }"
b592fb3845d4 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 3412
diff changeset
    24
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    25
Object subclass:#JavaDescriptor
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    26
	instanceVariableNames:''
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    27
	classVariableNames:'BaseTypes BaseTypesByTypeName ArrayTypes'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    28
	poolDictionaries:''
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    29
	category:'Languages-Java-Support'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    30
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    31
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    32
!JavaDescriptor class methodsFor:'documentation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    33
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    34
copyright
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    35
"
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2993
diff changeset
    36
 COPYRIGHT (c) 1996-2015 by Claus Gittinger
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
    37
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
    38
 New code and modifications done at SWING Research Group [1]:
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
    39
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2993
diff changeset
    40
 COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    41
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    42
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    43
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    44
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    45
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    46
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    47
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    48
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    49
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
    50
 [1] Code written at SWING Research Group contains a signature
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
    51
     of one of the above copright owners. For exact set of such code,
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
    52
     see the differences between this version and version stx:libjava
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
    53
     as of 1.9.2010
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    54
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    55
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    56
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    57
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    58
!JavaDescriptor class methodsFor:'instance creation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    59
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    60
fromString: aString
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    61
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    62
    ^self readFromString: aString
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    63
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    64
    "Created: / 25-11-2010 / 18:20:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    65
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    66
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    67
readFrom: aStream
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    68
    ^ self
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    69
        readFrom:aStream
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    70
        onError:[ self conversionErrorSignal
3582
b592fb3845d4 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 3412
diff changeset
    71
                    raiseWith:aStream errorString:' - invalid java descriptor']
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    72
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    73
    "Created: / 25-11-2010 / 18:04:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    74
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    75
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    76
readFrom:stream onError:exceptionBlock
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    77
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    78
    (stream peek == $( or:[stream peek == $<])
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    79
        ifTrue: [^self readMethodDescriptorFrom: stream onError: exceptionBlock]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    80
        ifFalse:[^self readFieldDescriptorFrom:  stream onError: exceptionBlock].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    81
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    82
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    83
        JavaDescriptor fromString:'Ljava/lang/Object;'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    84
        JavaDescriptor fromString:'[I'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    85
        JavaDescriptor fromString:'[[I'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    86
        JavaDescriptor fromString:'(ILjava/lang/Object;)V'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    87
        JavaDescriptor fromString:'(ILjava/lang/Object;)Ljava/lang/Class;'    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    88
        JavaDescriptor fromString:'<T:Ljava/lang/Object;>(Ljava/util/Collection<TT;>;I)Ljava/util/Collection<TT;>;'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    89
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    90
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    91
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    92
    "Created: / 25-11-2010 / 17:50:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    93
    "Modified: / 13-08-2011 / 01:37:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    94
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    95
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    96
!JavaDescriptor class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    97
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    98
baseTypes
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    99
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   100
    ^BaseTypes
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   101
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   102
    "Created: / 22-05-2011 / 17:45:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   103
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   104
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   105
baseTypesByTypeName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   106
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   107
    ^BaseTypesByTypeName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   108
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   109
    "Created: / 03-02-2011 / 21:08:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   110
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   111
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   112
!JavaDescriptor class methodsFor:'class initialization'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   113
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   114
initialize
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   115
    "
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   116
     WindowGroup activeApplication  spawnClassBrowserFor: BaseTypes values label:'Java primitive types' in:#buffer
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   117
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   118
    "/WARNING: If you change something here, you MUST also
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   119
    "/         change JavaField class>>#initialize !!!!!!
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   120
    
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   121
    BaseTypes := (IdentityDictionary new)
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   122
                at: $B put: JavaByte;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   123
                at: $C put: Character;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   124
                at: $D put: Float;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   125
                at: $F put: ShortFloat;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   126
                at: $I put: Integer;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   127
                at: $J put: LargeInteger;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   128
                at: $S put: JavaShort;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   129
                at: $Z put: Boolean;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   130
                at: $V put: UndefinedObject;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   131
                yourself.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   132
    BaseTypesByTypeName := (Dictionary new)
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   133
                at: 'byte' put: JavaByte;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   134
                at: 'char' put: Character;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   135
                at: 'double' put: Float;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   136
                at: 'float' put: ShortFloat;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   137
                at: 'int' put: Integer;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   138
                at: 'long' put: LargeInteger;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   139
                at: 'short' put: JavaShort;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   140
                at: 'boolean' put: Boolean;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   141
                at: 'void' put: UndefinedObject;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   142
                yourself.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   143
     "
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   144
     Tools::NewSystemBrowser basicNew spawnClassBrowserFor: ArrayTypes values label:'Java primitive array types' in:#newBrowser
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   145
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   146
    "/WARNING: If you change something here, you MUST also
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   147
    "/         change JavaField class>>#initialize !!!!!!
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   148
    
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   149
    ArrayTypes := (IdentityDictionary new)
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   150
                at: $B put: ByteArray;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   151
                at: $C put: Unicode16String;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   152
                at: $D put: DoubleArray;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   153
                at: $F put: FloatArray;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   154
                at: $I put: SignedIntegerArray;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   155
                at: $J put: SignedLongIntegerArray;
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   156
                at: $S put: WordArray;
2993
ed8cd8e5a16d Added JavaBooleanArray to represent boolean[].
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   157
                at: $Z put: JavaBooleanArray;
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   158
                yourself
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   159
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   160
    "Created: / 25-11-2010 / 17:51:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2993
ed8cd8e5a16d Added JavaBooleanArray to represent boolean[].
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
   161
    "Modified: / 31-01-2014 / 12:31:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   162
! !
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   163
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   164
!JavaDescriptor class methodsFor:'queries'!
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   165
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   166
isJavaPrimitiveArrayName: className 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   167
    | justTypeSymbol |
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   168
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   169
    (className startsWith: $[) ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   170
        justTypeSymbol := className copyFrom: ((className lastIndexOf: $[) + 1)
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   171
                    to: className size
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   172
    ]  ifFalse: [ ^ false ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   173
    ^(  justTypeSymbol size = 1 ) 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   174
        and: [BaseTypes includesKey: justTypeSymbol first].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   175
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   176
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   177
!JavaDescriptor class methodsFor:'reading-private'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   178
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   179
readArrayTypeFrom: stream onError: exceptionBlock 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   180
    | p  c |
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   181
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   182
    stream next. "eat $["
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   183
    p := stream peek.
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   184
    "byte" "char" "double" "float" "int" "long" "short" "boolean" (#( $B
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   185
     $C
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   186
     $D
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   187
     $F
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   188
     $I
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   189
     $J
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   190
     $S
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   191
     $Z ) includes: p) ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   192
        ^ JavaFieldDescriptor javaClass: (ArrayTypes at: stream next)
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   193
    ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   194
     "OK, not a primitive array..."
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   195
    c := self readFrom: stream onError: exceptionBlock.
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   196
    c dimensions: c dimensions + 1.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   197
    ^c
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   198
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   199
    "Created: / 25-11-2010 / 18:12:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   200
    "Modified: / 16-08-2012 / 13:31:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   201
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   202
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   203
readBaseTypeFrom:  stream onError: exceptionBlock
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   204
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   205
    ^JavaFieldDescriptor javaClass: (BaseTypes at: (stream next) ifAbsent: exceptionBlock)
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   206
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   207
    "Created: / 25-11-2010 / 18:11:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   208
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   209
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   210
readFieldDescriptorFrom:  stream onError: exceptionBlock
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   211
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   212
    | p |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   213
    p := stream peek.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   214
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   215
    p == $L ifTrue:[^self readObjectTypeFrom: stream onError: exceptionBlock].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   216
    p == $[ ifTrue:[^self readArrayTypeFrom: stream onError: exceptionBlock].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   217
    (#(
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   218
         $B "byte"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   219
         $C "char"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   220
         $D "double"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   221
         $F "float"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   222
         $I "int"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   223
         $J "long"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   224
         $S "short"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   225
         $Z "boolean"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   226
         $V "void"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   227
    ) includes: p) ifTrue:[^self readBaseTypeFrom: stream onError: exceptionBlock].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   228
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   229
    exceptionBlock value
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   230
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   231
    "Created: / 25-11-2010 / 17:55:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   232
    "Modified: / 21-12-2010 / 22:47:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   233
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   234
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   235
readMethodDescriptorFrom: stream onError: exceptionBlock
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   236
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   237
    | parameterDescriptors returnDescriptor |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   238
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   239
    stream peek == $< ifTrue:[
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   240
        self readTypeVariableFrom: stream onError: exceptionBlock
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   241
    ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   242
    stream next. "eat $("
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   243
    parameterDescriptors := OrderedCollection new.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   244
    [ stream peek ~= $) ] whileTrue:[
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   245
        parameterDescriptors add:( self readFieldDescriptorFrom: stream onError: exceptionBlock).
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   246
    ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   247
    stream next. "eat $)"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   248
"/    stream peek == $V ifFalse:[
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   249
"/        returnDescriptor := self readFieldDescriptorFrom: stream onError: exceptionBlock.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   250
"/    ] ifTrue:[
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   251
"/        stream next. "eat $V"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   252
"/    ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   253
    returnDescriptor := self readFieldDescriptorFrom: stream onError: exceptionBlock.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   254
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   255
    ^JavaMethodDescriptor parameters: parameterDescriptors return: returnDescriptor
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   256
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   257
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   258
        JavaDescriptor fromString:'(ILjava/lang/Object;)V'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   259
        JavaDescriptor fromString:'(ILjava/lang/Object;)Ljava/lang/Class;'  
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   260
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   261
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   262
    "Created: / 25-11-2010 / 18:36:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   263
    "Modified: / 13-08-2011 / 01:39:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   264
    "Modified: / 12-12-2011 / 17:22:48 / kursjan <kursjan@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   265
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   266
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   267
readObjectTypeFrom:  stream onError: exceptionBlock
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   268
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   269
    | clsName out |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   270
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   271
    stream next. "/eat $L.
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   272
    out := String new writeStream.    
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   273
    [ stream peek ~~ $; and:[stream peek ~~ $< ]] whileTrue:[
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   274
        | c |
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   275
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   276
        c := stream next.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   277
        c isNil ifTrue:[exceptionBlock value. ^nil].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   278
        out nextPut: c.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   279
    ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   280
    clsName := out contents.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   281
    stream peek == $< ifTrue:[
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   282
        self readTypeVariableFrom: stream onError: exceptionBlock
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   283
    ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   284
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   285
    "Just a check"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   286
    stream next ~= $; ifTrue:[exceptionBlock value].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   287
    ^JavaFieldDescriptor javaClassName: clsName.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   288
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   289
    "Created: / 25-11-2010 / 18:08:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   290
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   291
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   292
readTypeVariableFrom:  stream onError: exceptionBlock
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   293
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   294
    | nangles |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   295
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   296
    stream next. "/eat $<.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   297
    nangles := 1.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   298
    [ nangles ~~ 0 ] whileTrue:[
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   299
        stream peek == $< ifTrue:[nangles := nangles + 1].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   300
        stream peek == $> ifTrue:[nangles := nangles - 1].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   301
        stream next.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   302
    ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   303
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   304
    "Created: / 13-08-2011 / 01:39:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   305
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   306
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   307
!JavaDescriptor class methodsFor:'documentation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   308
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   309
version_CVS
3582
b592fb3845d4 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 3412
diff changeset
   310
    ^ '$Header$'
2308
5355d2734b8e fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   311
!
5355d2734b8e fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   312
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   313
version_HG
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   314
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   315
    ^ '$Changeset: <not expanded> $'
2308
5355d2734b8e fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   316
!
5355d2734b8e fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   317
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   318
version_SVN
3582
b592fb3845d4 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 3412
diff changeset
   319
    ^ '$Id$'
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   320
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   321
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2308
diff changeset
   322
2152
1cbdfbcc685c Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 749
diff changeset
   323
JavaDescriptor initialize!