extensions.st
author Claus Gittinger <cg@exept.de>
Thu, 24 Nov 2011 13:02:13 +0100
branchinitialV
changeset 2333 b1a55b7337c9
parent 2152 1cbdfbcc685c
child 2339 bf462a66e675
permissions -rw-r--r--
checkin from stx browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     1
"{ Package: 'stx:libjava' }"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     2
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     3
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     4
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     5
!BooleanArray methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     6
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     7
isInterface
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     8
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     9
    ^false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    10
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    11
    "Created: / 31-05-2011 / 16:07:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    12
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    13
!Object methodsFor:'testing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    14
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    15
isJavaArray
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    16
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    17
    ^self class isJavaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    18
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    19
    "Created: / 19-12-2010 / 17:05:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    20
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    21
!Object methodsFor:'testing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    22
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    23
isJavaNameAndType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    24
    "return true, if given object represents name and type struct in java constant pool"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    25
    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    26
    ^ false.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    27
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    28
    "Created: / 10-05-2011 / 12:21:52 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    29
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    30
!Object methodsFor:'testing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    31
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    32
isJavaPackage
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    33
    "return true, if this is a java package.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    34
     false is returned here - the method is only redefined in JavaPackage."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    35
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    36
    ^ false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    37
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    38
    "Created: / 09-08-2011 / 09:35:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    39
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    40
!Object methodsFor:'testing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    41
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    42
isJavaRef
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    43
"return true, if given object represents reference in java constant pool"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    44
^ false.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    45
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    46
    "Created: / 08-04-2011 / 16:12:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    47
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    48
!Object methodsFor:'autoboxing support'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    49
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    50
javaBox: anObject
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    51
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    52
    ^anObject
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    53
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    54
    "Created: / 15-08-2011 / 10:52:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    55
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    56
!Object methodsFor:'autoboxing support'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    57
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    58
javaUnbox: anObject
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    59
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    60
    ^anObject
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    61
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    62
    "Created: / 15-08-2011 / 10:52:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    63
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    64
!String methodsFor:'converting'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    65
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    66
asArrayOfSubstringsSeparatedBy:aSeparator 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    67
    "Modified version of asArrayOfSubstrings"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    68
    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    69
    |substrings start end|
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    70
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    71
    substrings := OrderedCollection new.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    72
    start := 1.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    73
    [start <= self size] whileTrue:[
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    74
        (self at:start) = aSeparator ifFalse:[
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    75
            end := start + 1.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    76
            [
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    77
                end <= self size and:[(self at:end) ~= aSeparator]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    78
            ] whileTrue:[end := end + 1].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    79
            substrings add:(self copyFrom:start to:end - 1).
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    80
            start := end - 1
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    81
        ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    82
        start := start + 1
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    83
    ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    84
    ^ substrings asArray
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    85
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    86
    "Created: / 07-02-2011 / 11:18:03 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    87
    "Modified: / 08-02-2011 / 01:08:15 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    88
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    89
!UserPreferences methodsFor:'accessing-java-devel'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    90
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    91
javaTestsDirectory
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    92
    ^ self at: #javaTestsDirectory
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    93
        ifAbsent: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    94
            [ | nm |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    95
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    96
            nm := OperatingSystem getLoginName.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    97
             "Default path for Jan"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    98
            nm = 'jv' 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    99
                ifTrue: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   100
                    [ '/home/jv/Projects/libjava/sources/libjava/branches/jk_new_structure/tests' ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   101
                ifFalse: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   102
                    [ "Default path for Jan (the other one :-)"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   103
                    nm = 'jk' 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   104
                        ifTrue: [ 'path for Jan' ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   105
                        ifFalse: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   106
                            [ "Default path for Marcel"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   107
                            nm = 'm' 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   108
                                ifTrue: [ '/home/m/Projects/libjava/branches/jk_new_structure/tests' ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   109
                                ifFalse: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   110
                                    [ | "Look into package dir" p |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   111
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   112
                                    (p := (Smalltalk getPackageDirectoryForPackage: 'stx:libjava') asFilename 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   113
                                                / 'tests') exists 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   114
                                        ifTrue: [ p pathName ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   115
                                        ifFalse: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   116
                                            [ | "Try the environment variable (used by Hudson)" p |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   117
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   118
                                            (p := OperatingSystem getEnvironment: 'LIBJAVA_TESTS') notNil 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   119
                                                ifTrue: [ p ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   120
                                                ifFalse: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   121
                                                    [ "No default, trigger an error"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   122
                                                    self error: 'No tests path specified' ] ] ] ] ] ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   123
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   124
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   125
        UserPreferences current javaTestsDirectory"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   126
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   127
    "Created: / 07-05-2011 / 17:43:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   128
    "Modified: / 07-05-2011 / 20:21:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   129
    "Modified: / 12-05-2011 / 15:54:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   130
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   131
!UserPreferences methodsFor:'accessing-java-devel'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   132
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   133
javaTestsDirectory: aStringOrFilename
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   134
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   135
    self at:#javaTestsDirectory put: aStringOrFilename asString.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   136
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   137
    "Created: / 07-05-2011 / 17:45:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   138
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   139
!ZipArchive methodsFor:'reading - java support'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   140
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   141
nextBytes: bytesToRead of: zmember startingAt: pos into: b startingAt: off
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   142
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   143
    file position0Based: zmember fileStart + startOfArchive + pos.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   144
    ^ file nextBytes: bytesToRead into: b startingAt: off.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   145
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   146
    "Created: / 01-05-2011 / 16:21:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   147
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   148
!Boolean class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   149
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   150
isJavaPrimitiveType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   151
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   152
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   153
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   154
    "Created: / 25-02-2011 / 08:22:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   155
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   156
!Boolean class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   157
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   158
javaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   159
    ^ BooleanArray
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   160
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   161
    "Created: / 25-02-2011 / 08:27:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   162
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   163
!Boolean class methodsFor:'autoboxing support'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   164
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   165
javaBox:anObject 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   166
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   167
    | wrapper |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   168
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   169
    wrapper := (Java classForName: 'java.lang.Boolean') new.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   170
    wrapper perform: #'<init>(Z)V' with: anObject.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   171
    ^wrapper
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   172
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   173
    "Created: / 14-08-2011 / 22:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   174
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   175
!Boolean class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   176
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   177
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   178
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   179
    ^'boolean'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   180
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   181
    "Modified: / 25-02-2011 / 18:58:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   182
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   183
!BooleanArray class methodsFor:'testing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   184
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   185
isInterface
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   186
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   187
    ^false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   188
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   189
!BooleanArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   190
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   191
isJavaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   192
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   193
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   194
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   195
    "Created: / 20-12-2010 / 22:47:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   196
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   197
!BooleanArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   198
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   199
isJavaReferenceType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   200
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   201
    "Java arrays are reference types"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   202
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   203
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   204
    "Created: / 20-12-2010 / 22:30:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   205
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   206
!BooleanArray class methodsFor:'accessing-java'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   207
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   208
javaComponentClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   209
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   210
    ^Boolean
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   211
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   212
    "Created: / 20-12-2010 / 22:13:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   213
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   214
!BooleanArray class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   215
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   216
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   217
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   218
    ^'[X'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   219
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   220
    "Modified: / 25-02-2011 / 19:03:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   221
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   222
!ByteArray class methodsFor:'testing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   223
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   224
isInterface
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   225
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   226
    ^false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   227
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   228
!ByteArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   229
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   230
isJavaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   231
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   232
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   233
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   234
    "Created: / 05-02-2011 / 22:45:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   235
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   236
!ByteArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   237
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   238
isJavaReferenceType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   239
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   240
    "Java arrays are reference types"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   241
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   242
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   243
    "Created: / 20-12-2010 / 22:30:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   244
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   245
!ByteArray class methodsFor:'accessing-java'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   246
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   247
javaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   248
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   249
    ^JavaArray javaArrayClassFor: self
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   250
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   251
    "Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   252
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   253
!ByteArray class methodsFor:'accessing-java'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   254
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   255
javaComponentClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   256
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   257
    ^Byte
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   258
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   259
    "Created: / 20-12-2010 / 22:05:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   260
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   261
!ByteArray class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   262
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   263
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   264
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   265
    ^'[B'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   266
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   267
    "Modified: / 25-02-2011 / 19:02:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   268
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   269
!Character class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   270
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   271
isJavaPrimitiveType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   272
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   273
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   274
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   275
    "Created: / 20-12-2010 / 22:18:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   276
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   277
!Character class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   278
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   279
javaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   280
    ^ String
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   281
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   282
    "Created: / 11-02-2011 / 10:44:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   283
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   284
!Character class methodsFor:'autoboxing support'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   285
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   286
javaBox:anObject 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   287
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   288
| wrapper |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   289
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   290
wrapper := (Java classForName: 'java.lang.Character') new.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   291
wrapper perform: #'<init>(C)V' with: anObject.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   292
^wrapper
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   293
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   294
    "Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   295
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   296
!Character class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   297
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   298
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   299
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   300
    ^'char'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   301
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   302
    "Modified: / 25-02-2011 / 18:58:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   303
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   304
!CharacterArray class methodsFor:'encoding & decoding'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   305
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   306
decodeFromJavaUTF8: bytes 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   307
    "Decodes a string from modified UTF8 encoding
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   308
     as used in Java .class files. see
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   309
     'The class file format specification', section 4.5.7"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   310
    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   311
    | string  i  s  b  codePoint  realLength |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   312
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   313
    string := String new: bytes size.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   314
    realLength := bytes size.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   315
    s := bytes readStream.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   316
    i := 1.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   317
    [ s atEnd ] whileFalse: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   318
            [ b := s next.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   319
            (b & 2r10000000) == 0 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   320
                ifTrue: [ codePoint := b ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   321
                ifFalse: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   322
                    [ self assert: (b & 2r01000000) = 2r01000000.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   323
                    (b & 2r00100000) = 0 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   324
                        ifTrue: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   325
                            [ "two byte utf char"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   326
                            realLength := realLength - 1.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   327
                            self assert: s size > 0.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   328
                            self assert: (b & 2r01000000) = 2r01000000.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   329
                            string bitsPerCharacter = 8 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   330
                                ifTrue: [ string := Unicode16String fromString: string ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   331
                            codePoint := (b & 2r00011111) << 6.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   332
                            b := s next.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   333
                            self assert: (b & 2r11000000) = 2r10000000.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   334
                            codePoint := codePoint + (b & 2r00111111). ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   335
                        ifFalse: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   336
                            [ "at lease 3 byte utf char"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   337
                            realLength := realLength - 2.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   338
                            string bitsPerCharacter ~= 16"was: 32" 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   339
                                ifTrue: [ string := Unicode16String"was: Unicode32String" fromString: string ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   340
                            self assert: s size > 1.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   341
                            (b & 2r00010000) = 0 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   342
                                ifTrue: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   343
                                    [ | utf32Possible  utf32Value |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   344
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   345
                                    "3 or 6 byte utf char"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   346
                                    self assert: s size > 1.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   347
                                    s size < 5 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   348
                                        ifTrue: [ utf32Possible := false ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   349
                                        ifFalse: [ utf32Possible := true ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   350
                                    b ~= 2r11101101 ifTrue: [ utf32Possible := false ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   351
                                    codePoint := (b & 2r00001111) << 12.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   352
                                    b := s next.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   353
                                    self assert: (b & 2r11000000) = 2r10000000.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   354
                                    ((b & 2r11110000) = 2r10100000 and: [ utf32Possible ]) 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   355
                                        ifTrue: [ utf32Value := 2r00010000 + ((b & 2r00001111) << 16) ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   356
                                        ifFalse: [ utf32Possible := false ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   357
                                    codePoint := codePoint + ((b & 2r00111111) << 6).
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   358
                                    b := s next.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   359
                                    self assert: (b & 2r11000000) = 2r10000000.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   360
                                    utf32Possible 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   361
                                        ifTrue: [ utf32Value := utf32Value + ((b & 2r00111111) << 10) ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   362
                                    codePoint := codePoint + (b & 2r00111111).
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   363
                                    utf32Possible 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   364
                                        ifTrue: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   365
                                            [ | tmpB |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   366
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   367
                                            tmpB := s copy.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   368
                                            b := tmpB next.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   369
                                            b = 2r11101101 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   370
                                                ifTrue: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   371
                                                    [ b := tmpB next.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   372
                                                    (b & 2r11110000) = 2r10110000 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   373
                                                        ifTrue: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   374
                                                            [ utf32Value := utf32Value + ((b & 2r00001111) << 6).
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   375
                                                            b := tmpB next.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   376
                                                            self assert: (b & 2r11000000) = 2r10000000.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   377
                                                            utf32Value := utf32Value + (b & 2r00111111).
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   378
                                                            codePoint := utf32Value.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   379
                                                            realLength := realLength - 3. s position: tmpB position.] ] ] ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   380
                                ifFalse: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   381
                                    [ "should not happen, ask mh"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   382
                                    self halt. ] ] ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   383
            string at: i put: (Character codePoint: codePoint).
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   384
            i := i + 1. ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   385
    ^ string subString: 1 to: realLength.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   386
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   387
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   388
        String decodeFromJavaUTF8: 'Hello world' asByteArray"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   389
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   390
    "Created: / 22-12-2010 / 23:45:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   391
    "Modified: / 09-02-2011 / 01:12:25 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   392
    "Modified: / 13-03-2011 / 15:52:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   393
    "Modified: / 10-08-2011 / 01:00:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   394
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   395
!CharacterArray class methodsFor:'instance creation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   396
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   397
fromJavaUTF8Bytes:aByteCollection
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   398
    "return a new string which represents the characters as decoded
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   399
     from the modified utf8 encoded bytes as specified in 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   400
     The class file format specification, section 4.5.7"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   401
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   402
    ^ self decodeFromJavaUTF8:aByteCollection.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   403
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   404
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   405
     CharacterArray fromUTF8Bytes:#[ 16r41 16r42 ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   406
     CharacterArray fromUTF8Bytes:#[ 16rC1 16r02 ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   407
     CharacterArray fromUTF8Bytes:#[ 16rE0 16r81 16r02 ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   408
     CharacterArray fromUTF8Bytes:#[ 16rEF 16rBF 16rBF ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   409
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   410
   rfc2279 examples:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   411
     CharacterArray fromUTF8Bytes:#[ 16r41 16rE2 16r89 16rA2 16rCE 16r91 16r2E ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   412
     CharacterArray fromUTF8Bytes:#[ 16rED 16r95 16r9C 16rEA 16rB5 16rAD 16rEC 16r96 16rB4 ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   413
     CharacterArray fromUTF8Bytes:#[ 16rE6 16r97 16rA5 16rE6 16r9C 16rAC 16rE8 16rAA 16r9E ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   414
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   415
   invalid:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   416
     CharacterArray fromUTF8Bytes:#[ 16rC0 16r80 ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   417
     CharacterArray fromUTF8Bytes:#[ 16rE0 16r80 16r80 ]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   418
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   419
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   420
    "Created: / 23-12-2010 / 09:01:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   421
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   422
!CharacterArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   423
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   424
isJavaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   425
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   426
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   427
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   428
    "Created: / 05-02-2011 / 22:45:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   429
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   430
!CharacterArray class methodsFor:'accessing-java'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   431
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   432
javaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   433
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   434
    ^JavaArray javaArrayClassFor: Unicode16String
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   435
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   436
    "Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   437
    "Modified: / 10-08-2011 / 13:18:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   438
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   439
!CharacterArray class methodsFor:'accessing-java'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   440
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   441
javaComponentClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   442
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   443
    ^Character
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   444
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   445
    "Created: / 20-12-2010 / 22:05:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   446
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   447
!DoubleArray class methodsFor:'testing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   448
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   449
isInterface
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   450
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   451
    ^false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   452
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   453
!DoubleArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   454
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   455
isJavaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   456
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   457
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   458
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   459
    "Created: / 20-12-2010 / 22:47:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   460
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   461
!DoubleArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   462
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   463
isJavaReferenceType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   464
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   465
    "Java arrays are reference types"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   466
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   467
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   468
    "Created: / 20-12-2010 / 22:30:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   469
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   470
!DoubleArray class methodsFor:'accessing-java'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   471
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   472
javaComponentClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   473
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   474
    ^Float
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   475
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   476
    "Created: / 20-12-2010 / 22:06:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   477
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   478
!DoubleArray class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   479
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   480
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   481
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   482
    ^'[D'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   483
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   484
    "Modified: / 25-02-2011 / 19:03:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   485
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   486
!Float class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   487
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   488
isJavaPrimitiveType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   489
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   490
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   491
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   492
    "Created: / 06-02-2011 / 17:21:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   493
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   494
!Float class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   495
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   496
javaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   497
    ^ DoubleArray
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   498
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   499
    "Created: / 11-02-2011 / 10:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   500
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   501
!Float class methodsFor:'autoboxing support'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   502
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   503
javaBox:anObject 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   504
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   505
    | wrapper |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   506
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   507
    wrapper := (Java classForName: 'java.lang.Double') new.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   508
    wrapper perform: #'<init>(D)V' with: anObject.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   509
    ^wrapper
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   510
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   511
    "Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   512
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   513
!Float class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   514
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   515
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   516
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   517
    ^'double'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   518
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   519
    "Modified: / 25-02-2011 / 18:59:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   520
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   521
!FloatArray class methodsFor:'testing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   522
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   523
isInterface
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   524
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   525
    ^false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   526
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   527
!FloatArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   528
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   529
isJavaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   530
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   531
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   532
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   533
    "Created: / 20-12-2010 / 22:47:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   534
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   535
!FloatArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   536
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   537
isJavaReferenceType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   538
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   539
    "Java arrays are reference types"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   540
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   541
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   542
    "Created: / 20-12-2010 / 22:30:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   543
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   544
!FloatArray class methodsFor:'accessing-java'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   545
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   546
javaComponentClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   547
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   548
    ^ShortFloat
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   549
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   550
    "Created: / 20-12-2010 / 22:06:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   551
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   552
!FloatArray class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   553
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   554
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   555
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   556
    ^'[F'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   557
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   558
    "Modified: / 25-02-2011 / 19:03:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   559
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   560
!GenericToolbarIconLibrary class methodsFor:'image specs'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   561
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   562
javaClassBrowserIcon
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   563
    "This resource specification was automatically generated
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   564
     by the ImageEditor of ST/X."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   565
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   566
    "Do not manually edit this!! If it is corrupted,
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   567
     the ImageEditor may not be able to read the specification."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   568
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   569
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   570
     self javaClassBrowserIcon inspect
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   571
     ImageEditor openOnClass:self andSelector:#javaClassBrowserIcon
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   572
     Icon flushCachedIcons
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   573
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   574
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   575
    <resource: #image>
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   576
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   577
    ^Icon
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   578
        constantNamed:'GenericToolbarIconLibrary class javaClassBrowserIcon'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   579
        ifAbsentPut:[(Depth24Image new) width: 13; height: 11; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   580
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@96<@96<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   581
@@@@@@@@96<@96<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@96<@96<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@96<@96<@
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   582
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@96<@96<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@96<@96<@@@@@@@@@@@@@@@@@
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   583
@@@@@@@@@@@@@@@@@@@@@@@@@@@@96<@96<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@96<@96<@96<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   584
@@@@@@@@96<@96<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@\CA0LG@0\CA0LG@0\CA0\GA \@A0@a') ; yourself); yourself]
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   585
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   586
!Integer class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   587
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   588
isJavaPrimitiveType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   589
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   590
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   591
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   592
    "Created: / 11-02-2011 / 11:12:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   593
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   594
!Integer class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   595
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   596
javaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   597
    ^ SignedIntegerArray
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   598
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   599
    "Created: / 11-02-2011 / 10:51:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   600
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   601
!Integer class methodsFor:'autoboxing support'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   602
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   603
javaBox:anObject 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   604
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   605
    | wrapper |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   606
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   607
    wrapper := (Java classForName: 'java.lang.Integer') new.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   608
    wrapper perform: #'<init>(I)V' with: anObject.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   609
    ^wrapper
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   610
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   611
    "Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   612
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   613
!Integer class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   614
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   615
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   616
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   617
    ^'int'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   618
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   619
    "Modified: / 25-02-2011 / 18:59:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   620
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   621
!LargeInteger class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   622
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   623
isJavaPrimitiveType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   624
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   625
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   626
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   627
    "Created: / 04-02-2011 / 11:55:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   628
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   629
!LargeInteger class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   630
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   631
javaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   632
    ^ SignedLongIntegerArray
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   633
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   634
    "Created: / 11-02-2011 / 10:51:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   635
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   636
!LargeInteger class methodsFor:'autoboxing support'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   637
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   638
javaBox:anObject 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   639
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   640
    | wrapper |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   641
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   642
    wrapper := (Java classForName: 'java.lang.Long') new.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   643
    wrapper perform: #'<init>(J)V' with: anObject.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   644
    ^wrapper
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   645
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   646
    "Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   647
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   648
!LargeInteger class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   649
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   650
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   651
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   652
    ^'long'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   653
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   654
    "Modified: / 25-02-2011 / 18:59:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   655
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   656
!Object class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   657
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   658
isJavaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   659
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   660
    ^false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   661
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   662
    "Created: / 19-12-2010 / 17:05:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   663
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   664
!Object class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   665
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   666
isJavaClassType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   667
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   668
    ^false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   669
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   670
    "Created: / 11-02-2011 / 08:08:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   671
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   672
!Object class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   673
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   674
isJavaPrimitiveType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   675
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   676
    ^false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   677
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   678
    "Created: / 20-12-2010 / 21:52:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   679
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   680
!Object class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   681
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   682
isJavaReferenceType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   683
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   684
    ^false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   685
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   686
    "Created: / 20-12-2010 / 21:52:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   687
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   688
!Object class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   689
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   690
isJavaType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   691
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   692
    ^false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   693
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   694
    "Created: / 20-12-2010 / 21:52:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   695
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   696
!ShortFloat class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   697
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   698
isJavaPrimitiveType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   699
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   700
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   701
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   702
    "Created: / 06-02-2011 / 17:21:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   703
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   704
!ShortFloat class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   705
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   706
javaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   707
    ^ FloatArray
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   708
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   709
    "Created: / 11-02-2011 / 10:50:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   710
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   711
!ShortFloat class methodsFor:'autoboxing support'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   712
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   713
javaBox:anObject 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   714
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   715
    | wrapper |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   716
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   717
    wrapper := (Java classForName: 'java.lang.Float') new.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   718
    wrapper perform: #'<init>(F)V' with: anObject.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   719
    ^wrapper
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   720
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   721
    "Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   722
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   723
!ShortFloat class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   724
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   725
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   726
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   727
    ^'float'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   728
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   729
    "Modified: / 25-02-2011 / 18:59:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   730
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   731
!SignedIntegerArray class methodsFor:'testing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   732
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   733
isInterface
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   734
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   735
    ^false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   736
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   737
!SignedIntegerArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   738
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   739
isJavaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   740
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   741
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   742
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   743
    "Created: / 06-02-2011 / 15:16:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   744
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   745
!SignedIntegerArray class methodsFor:'accessing-java'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   746
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   747
javaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   748
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   749
    ^JavaArray javaArrayClassFor: SignedIntegerArray
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   750
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   751
    "Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   752
    "Modified: / 10-08-2011 / 22:47:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   753
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   754
!SignedIntegerArray class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   755
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   756
javaComponentClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   757
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   758
    ^ Integer
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   759
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   760
    "Created: / 25-06-2011 / 08:38:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   761
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   762
!SignedIntegerArray class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   763
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   764
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   765
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   766
    ^'[I'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   767
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   768
    "Modified: / 25-02-2011 / 19:03:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   769
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   770
!SignedLongIntegerArray class methodsFor:'testing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   771
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   772
isInterface
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   773
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   774
    ^false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   775
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   776
!SignedLongIntegerArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   777
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   778
isJavaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   779
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   780
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   781
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   782
    "Created: / 20-12-2010 / 22:47:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   783
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   784
!SignedLongIntegerArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   785
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   786
isJavaReferenceType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   787
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   788
    "Java arrays are reference types"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   789
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   790
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   791
    "Created: / 20-12-2010 / 22:30:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   792
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   793
!SignedLongIntegerArray class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   794
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   795
javaComponentClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   796
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   797
    ^LargeInteger
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   798
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   799
    "Modified: / 25-06-2011 / 08:38:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   800
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   801
!SignedLongIntegerArray class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   802
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   803
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   804
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   805
    ^'[J'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   806
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   807
    "Modified: / 25-02-2011 / 19:03:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   808
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   809
!UndefinedObject class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   810
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   811
isJavaPrimitiveType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   812
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   813
    "void"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   814
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   815
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   816
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   817
    "Created: / 21-12-2010 / 22:52:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   818
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   819
!UndefinedObject class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   820
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   821
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   822
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   823
    ^'void'.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   824
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   825
    "Modified: / 25-02-2011 / 18:59:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   826
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   827
!WordArray class methodsFor:'testing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   828
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   829
isInterface
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   830
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   831
    ^false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   832
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   833
!WordArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   834
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   835
isJavaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   836
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   837
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   838
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   839
    "Created: / 20-12-2010 / 22:47:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   840
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   841
!WordArray class methodsFor:'queries'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   842
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   843
isJavaReferenceType
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   844
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   845
    "Java arrays are reference types"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   846
    ^true
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   847
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   848
    "Created: / 20-12-2010 / 22:30:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   849
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   850
!WordArray class methodsFor:'accessing-java'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   851
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   852
javaArrayClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   853
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   854
    ^JavaArray javaArrayClassFor: WordArray
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   855
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   856
    "Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   857
    "Modified: / 10-08-2011 / 22:46:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   858
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   859
!WordArray class methodsFor:'accessing-java'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   860
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   861
javaComponentClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   862
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   863
    ^Short
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   864
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   865
    "Created: / 20-12-2010 / 22:13:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   866
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   867
!WordArray class methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   868
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   869
javaName
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   870
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   871
    ^'['.
2152
1cbdfbcc685c Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 749
diff changeset
   872
! !