src/extensions.st
author vranyj1
Mon, 03 Sep 2012 18:04:13 +0000
branchjk_new_structure
changeset 1692 561d5ac3f2df
parent 1691 826f8d7dc0df
child 1695 05df4ea1ced6
permissions -rw-r--r--
- JavaVM - some OpenJDK 7 support
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
     1
"{ Package: 'stx:libjava' }"!
1353
2968f8acb434 one step closer to eager method resolving
hlopkmar
parents: 1336
diff changeset
     2
1376
c4b2cf1467c3 Fixes for Groovy and class reloading
vranyj1
parents: 1368
diff changeset
     3
!Behavior methodsFor:'queries'!
c4b2cf1467c3 Fixes for Groovy and class reloading
vranyj1
parents: 1368
diff changeset
     4
c4b2cf1467c3 Fixes for Groovy and class reloading
vranyj1
parents: 1368
diff changeset
     5
isInterface
c4b2cf1467c3 Fixes for Groovy and class reloading
vranyj1
parents: 1368
diff changeset
     6
    "return true, if the receiver is a Java interface"
c4b2cf1467c3 Fixes for Groovy and class reloading
vranyj1
parents: 1368
diff changeset
     7
c4b2cf1467c3 Fixes for Groovy and class reloading
vranyj1
parents: 1368
diff changeset
     8
    ^ false
c4b2cf1467c3 Fixes for Groovy and class reloading
vranyj1
parents: 1368
diff changeset
     9
c4b2cf1467c3 Fixes for Groovy and class reloading
vranyj1
parents: 1368
diff changeset
    10
    "
c4b2cf1467c3 Fixes for Groovy and class reloading
vranyj1
parents: 1368
diff changeset
    11
     True isInterface
c4b2cf1467c3 Fixes for Groovy and class reloading
vranyj1
parents: 1368
diff changeset
    12
    "
c4b2cf1467c3 Fixes for Groovy and class reloading
vranyj1
parents: 1368
diff changeset
    13
c4b2cf1467c3 Fixes for Groovy and class reloading
vranyj1
parents: 1368
diff changeset
    14
    "Created: / 22-02-2012 / 21:53:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c4b2cf1467c3 Fixes for Groovy and class reloading
vranyj1
parents: 1368
diff changeset
    15
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    16
1674
f7e00de5caae commented out permission checking even for mh :)
hlopkmar
parents: 1673
diff changeset
    17
!Behavior methodsFor:'queries'!
f7e00de5caae commented out permission checking even for mh :)
hlopkmar
parents: 1673
diff changeset
    18
f7e00de5caae commented out permission checking even for mh :)
hlopkmar
parents: 1673
diff changeset
    19
isJavaPrimitiveType
f7e00de5caae commented out permission checking even for mh :)
hlopkmar
parents: 1673
diff changeset
    20
f7e00de5caae commented out permission checking even for mh :)
hlopkmar
parents: 1673
diff changeset
    21
    ^false
f7e00de5caae commented out permission checking even for mh :)
hlopkmar
parents: 1673
diff changeset
    22
f7e00de5caae commented out permission checking even for mh :)
hlopkmar
parents: 1673
diff changeset
    23
    "Created: / 20-12-2010 / 21:52:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
f7e00de5caae commented out permission checking even for mh :)
hlopkmar
parents: 1673
diff changeset
    24
! !
f7e00de5caae commented out permission checking even for mh :)
hlopkmar
parents: 1673
diff changeset
    25
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    26
!Boolean class methodsFor:'queries'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    27
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    28
isJavaPrimitiveType
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    29
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    30
    ^true
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    31
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    32
    "Created: / 25-02-2011 / 08:22:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    33
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    34
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    35
!Boolean class methodsFor:'queries'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    36
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    37
javaArrayClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    38
    ^ BooleanArray
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    39
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    40
    "Created: / 25-02-2011 / 08:27:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    41
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    42
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    43
!Boolean class methodsFor:'autoboxing support'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    44
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    45
javaBox: anObject
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    46
    | wrapper |
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    47
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    48
    wrapper := (JavaVM classForName: 'java.lang.Boolean') new.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    49
    wrapper perform: #'<init>(Z)V' with: anObject.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    50
    ^ wrapper
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    51
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    52
    "Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    53
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    54
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    55
!Boolean class methodsFor:'accessing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    56
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    57
javaName
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    58
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    59
    ^'boolean'.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    60
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    61
    "Modified: / 25-02-2011 / 18:58:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    62
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    63
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    64
!Boolean class methodsFor:'autoboxing support'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    65
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    66
javaUnbox: object onError: errorBlock
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    67
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    68
    | value |
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    69
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    70
    (object class name = 'java/lang/Boolean') ifFalse:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    71
        errorBlock value.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    72
    ].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    73
    value := object instVarNamed: #value.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    74
    (value ~~ 0 and:[value ~~ 1]) ifTrue:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    75
        errorBlock value.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    76
    ].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    77
    ^value
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    78
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    79
    "Created: / 22-11-2011 / 11:52:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    80
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    81
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    82
!Boolean class methodsFor:'autoboxing support'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    83
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    84
javaUnwrap: zeroOrOne
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    85
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    86
    ^zeroOrOne == 1
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    87
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    88
    "Created: / 10-12-2011 / 20:00:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    89
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    90
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    91
!Boolean class methodsFor:'autoboxing support'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    92
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    93
javaWrap: boolean
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    94
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    95
    ^boolean ifTrue:[1] ifFalse:[0].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    96
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    97
    "Created: / 18-03-2012 / 22:03:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    98
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
    99
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   100
!Boolean class methodsFor:'accessing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   101
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   102
javaWrapperClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   103
    ^(Java classForName: 'java.lang.Boolean')
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   104
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   105
    "Created: / 24-02-2012 / 19:43:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   106
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   107
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   108
!BooleanArray methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   109
826
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   110
isInterface
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   111
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   112
    ^false
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   113
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   114
    "Created: / 31-05-2011 / 16:07:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   115
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   116
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   117
!BooleanArray class methodsFor:'testing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   118
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   119
isInterface
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   120
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   121
    ^false
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   122
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   123
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   124
!BooleanArray class methodsFor:'queries'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   125
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   126
isJavaArrayClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   127
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   128
    ^true
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   129
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   130
    "Created: / 20-12-2010 / 22:47:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   131
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   132
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   133
!BooleanArray class methodsFor:'queries'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   134
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   135
isJavaReferenceType
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   136
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   137
    "Java arrays are reference types"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   138
    ^true
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   139
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   140
    "Created: / 20-12-2010 / 22:30:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   141
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   142
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   143
!BooleanArray class methodsFor:'accessing-java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   144
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   145
javaArrayClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   146
    ^ JavaArray javaArrayClassFor: self
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   147
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   148
    "Created: / 06-12-2011 / 17:29:22 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   149
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   150
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   151
!BooleanArray class methodsFor:'accessing-java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   152
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   153
javaComponentClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   154
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   155
    ^Boolean
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   156
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   157
    "Created: / 20-12-2010 / 22:13:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   158
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   159
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   160
!BooleanArray class methodsFor:'accessing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   161
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   162
javaName
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   163
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   164
    ^'[Z'.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   165
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   166
    "Modified: / 31-08-2011 / 23:57:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   167
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   168
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   169
!ByteArray class methodsFor:'testing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   170
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   171
isInterface
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   172
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   173
    ^false
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   174
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   175
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   176
!ByteArray class methodsFor:'queries'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   177
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   178
isJavaArrayClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   179
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   180
    ^true
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   181
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   182
    "Created: / 05-02-2011 / 22:45:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   183
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   184
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   185
!ByteArray class methodsFor:'queries'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   186
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   187
isJavaReferenceType
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   188
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   189
    "Java arrays are reference types"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   190
    ^true
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   191
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   192
    "Created: / 20-12-2010 / 22:30:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   193
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   194
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   195
!ByteArray class methodsFor:'accessing-java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   196
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   197
javaArrayClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   198
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   199
    ^JavaArray javaArrayClassFor: self
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   200
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   201
    "Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   202
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   203
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   204
!ByteArray class methodsFor:'accessing-java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   205
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   206
javaComponentClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   207
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   208
    ^JavaByte
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   209
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   210
    "Created: / 20-12-2010 / 22:05:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   211
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   212
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   213
!ByteArray class methodsFor:'accessing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   214
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   215
javaName
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   216
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   217
    ^'[B'.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   218
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   219
    "Modified: / 25-02-2011 / 19:02:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   220
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   221
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   222
!Character class methodsFor:'queries'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   223
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   224
isJavaPrimitiveType
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   225
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   226
    ^true
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   227
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   228
    "Created: / 20-12-2010 / 22:18:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   229
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   230
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   231
!Character class methodsFor:'accessing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   232
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   233
javaArrayClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   234
    ^ String
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   235
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   236
    "Created: / 11-02-2011 / 10:44:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   237
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   238
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   239
!Character class methodsFor:'autoboxing support'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   240
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   241
javaBox: anObject
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   242
    | wrapper |
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   243
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   244
    wrapper := (JavaVM classForName: 'java.lang.Character') new.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   245
    wrapper perform: #'<init>(C)V' with: anObject codePoint.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   246
    ^ wrapper
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   247
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   248
    "Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   249
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   250
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   251
!Character class methodsFor:'accessing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   252
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   253
javaName
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   254
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   255
    ^'char'.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   256
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   257
    "Modified: / 25-02-2011 / 18:58:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   258
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   259
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   260
!Character class methodsFor:'autoboxing support'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   261
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   262
javaUnbox: object onError: errorBlock
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   263
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   264
    | value |
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   265
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   266
    (object class name = 'java/lang/Character') ifFalse:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   267
        errorBlock value.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   268
    ].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   269
    value := object instVarNamed: #value.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   270
    (value between: 0 and: 255) ifFalse:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   271
        errorBlock value.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   272
    ].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   273
    ^value
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   274
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   275
    "Created: / 22-11-2011 / 11:52:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   276
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   277
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   278
!Character class methodsFor:'accessing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   279
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   280
javaWrapperClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   281
    ^(Java classForName: 'java.lang.Character')
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   282
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   283
    "Created: / 24-02-2012 / 19:42:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   284
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   285
1032
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   286
!CharacterArray methodsFor:'java conversions'!
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   287
1061
vranyj1
parents: 1060
diff changeset
   288
asDottedJavaClassName
vranyj1
parents: 1060
diff changeset
   289
vranyj1
parents: 1060
diff changeset
   290
 "
vranyj1
parents: 1060
diff changeset
   291
    examples:
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   292
    java.lang.String
1061
vranyj1
parents: 1060
diff changeset
   293
    [[[Ljava/lang/Object; => java.lang.Object
vranyj1
parents: 1060
diff changeset
   294
    "
vranyj1
parents: 1060
diff changeset
   295
vranyj1
parents: 1060
diff changeset
   296
vranyj1
parents: 1060
diff changeset
   297
    | nm |
vranyj1
parents: 1060
diff changeset
   298
    nm := self asJavaComponentClassName.
vranyj1
parents: 1060
diff changeset
   299
    (nm startsWith: $L) ifTrue: [
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   300
	nm := nm copyFrom: 2 to: nm size - 1
1061
vranyj1
parents: 1060
diff changeset
   301
    ].
vranyj1
parents: 1060
diff changeset
   302
    (nm includes: $/) ifTrue: [
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   303
	nm := nm asString copyReplaceAll: $/ with: $.
1061
vranyj1
parents: 1060
diff changeset
   304
    ].
vranyj1
parents: 1060
diff changeset
   305
    ^ nm.
vranyj1
parents: 1060
diff changeset
   306
vranyj1
parents: 1060
diff changeset
   307
    "Created: / 21-10-2011 / 12:31:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
vranyj1
parents: 1060
diff changeset
   308
    "Created: / 30-10-2011 / 17:41:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
vranyj1
parents: 1060
diff changeset
   309
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   310
1061
vranyj1
parents: 1060
diff changeset
   311
!CharacterArray methodsFor:'java conversions'!
vranyj1
parents: 1060
diff changeset
   312
1036
4ff03464c3b3 refactored registry..
hlopkmar
parents: 1033
diff changeset
   313
asInternalJavaClassName
1060
c3ac98001802 Yet another set of hacks for classloaders
vranyj1
parents: 1038
diff changeset
   314
c3ac98001802 Yet another set of hacks for classloaders
vranyj1
parents: 1038
diff changeset
   315
    <resource: #obsolete>
c3ac98001802 Yet another set of hacks for classloaders
vranyj1
parents: 1038
diff changeset
   316
c3ac98001802 Yet another set of hacks for classloaders
vranyj1
parents: 1038
diff changeset
   317
    ^self asSlashedJavaClassName
1036
4ff03464c3b3 refactored registry..
hlopkmar
parents: 1033
diff changeset
   318
4ff03464c3b3 refactored registry..
hlopkmar
parents: 1033
diff changeset
   319
    "Created: / 21-10-2011 / 12:31:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1060
c3ac98001802 Yet another set of hacks for classloaders
vranyj1
parents: 1038
diff changeset
   320
    "Modified: / 30-10-2011 / 17:40:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1036
4ff03464c3b3 refactored registry..
hlopkmar
parents: 1033
diff changeset
   321
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   322
1036
4ff03464c3b3 refactored registry..
hlopkmar
parents: 1033
diff changeset
   323
!CharacterArray methodsFor:'java conversions'!
4ff03464c3b3 refactored registry..
hlopkmar
parents: 1033
diff changeset
   324
1032
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   325
asJavaComponentClassName
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   326
    | componentClassName |
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   327
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   328
    componentClassName := self utf8Encoded.
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   329
    (componentClassName matches: '*\[*') ifTrue: [
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   330
	componentClassName := componentClassName
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   331
		    copyFrom: (componentClassName lastIndexOf: $[) + 1
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   332
		    to: componentClassName size.
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   333
    ].
1032
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   334
    ^ componentClassName.
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   335
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   336
1032
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   337
!CharacterArray methodsFor:'java conversions'!
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   338
1036
4ff03464c3b3 refactored registry..
hlopkmar
parents: 1033
diff changeset
   339
asJavaishClassName
1060
c3ac98001802 Yet another set of hacks for classloaders
vranyj1
parents: 1038
diff changeset
   340
c3ac98001802 Yet another set of hacks for classloaders
vranyj1
parents: 1038
diff changeset
   341
    <resource: #obsolete>
c3ac98001802 Yet another set of hacks for classloaders
vranyj1
parents: 1038
diff changeset
   342
c3ac98001802 Yet another set of hacks for classloaders
vranyj1
parents: 1038
diff changeset
   343
    ^self asDottedJavaClassName.
1036
4ff03464c3b3 refactored registry..
hlopkmar
parents: 1033
diff changeset
   344
4ff03464c3b3 refactored registry..
hlopkmar
parents: 1033
diff changeset
   345
    "Created: / 21-10-2011 / 12:33:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1060
c3ac98001802 Yet another set of hacks for classloaders
vranyj1
parents: 1038
diff changeset
   346
    "Modified: / 30-10-2011 / 17:41:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1036
4ff03464c3b3 refactored registry..
hlopkmar
parents: 1033
diff changeset
   347
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   348
1036
4ff03464c3b3 refactored registry..
hlopkmar
parents: 1033
diff changeset
   349
!CharacterArray methodsFor:'java conversions'!
4ff03464c3b3 refactored registry..
hlopkmar
parents: 1033
diff changeset
   350
1032
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   351
asNiceJavaClassName
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   352
    | niceName |
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   353
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   354
    niceName := self asJavaComponentClassName asSTXInternalJavaClassName.
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   355
    (self occurrencesOf: $[) timesRepeat: [ niceName := niceName , '[]' ].
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   356
    niceName := niceName asString copyReplaceAll: $/ with: $..
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   357
    ^ niceName.
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   358
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   359
1032
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   360
!CharacterArray methodsFor:'java conversions'!
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   361
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   362
asSTXInternalJavaClassName
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   363
    | internalName |
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   364
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   365
    internalName := self asJavaComponentClassName.
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   366
    (internalName startsWith: $L) ifTrue: [
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   367
	internalName := internalName copyFrom: 2 to: internalName size - 1
1032
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   368
    ].
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   369
    (internalName includes: $.) ifTrue: [
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   370
	internalName := internalName asString copyReplaceAll: $. with: $/
1032
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   371
    ].
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   372
    ^internalName.
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   373
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   374
1061
vranyj1
parents: 1060
diff changeset
   375
!CharacterArray methodsFor:'java conversions'!
vranyj1
parents: 1060
diff changeset
   376
vranyj1
parents: 1060
diff changeset
   377
asSlashedJavaClassName
vranyj1
parents: 1060
diff changeset
   378
    "removes square brackets and adds slashes"
vranyj1
parents: 1060
diff changeset
   379
    | internalName |
vranyj1
parents: 1060
diff changeset
   380
    internalName := self asJavaComponentClassName.
vranyj1
parents: 1060
diff changeset
   381
    (internalName startsWith: $L) ifTrue: [
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   382
	internalName := internalName copyFrom: 2 to: internalName size - 1
1061
vranyj1
parents: 1060
diff changeset
   383
    ].
vranyj1
parents: 1060
diff changeset
   384
    (internalName includes: $.) ifTrue: [
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   385
	internalName := internalName asString copyReplaceAll: $. with: $/
1061
vranyj1
parents: 1060
diff changeset
   386
    ].
vranyj1
parents: 1060
diff changeset
   387
    ^ internalName.
vranyj1
parents: 1060
diff changeset
   388
vranyj1
parents: 1060
diff changeset
   389
    "Created: / 21-10-2011 / 12:31:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
vranyj1
parents: 1060
diff changeset
   390
    "Created: / 30-10-2011 / 17:40:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
vranyj1
parents: 1060
diff changeset
   391
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   392
1032
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   393
!CharacterArray methodsFor:'java queries'!
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   394
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   395
isJavaArrayDescriptor
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   396
^ self startsWith:$[.
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   397
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   398
1032
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   399
!CharacterArray methodsFor:'java queries'!
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   400
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   401
isJavaPrimitiveTypeDescriptor
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   402
    ^ (self size = 1 and: [ JavaDescriptor baseTypes includesKey: self first ]).
c3085c73e150 just refactoring registry
hlopkmar
parents: 1021
diff changeset
   403
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   404
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   405
!CharacterArray class methodsFor:'encoding & decoding'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   406
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   407
decodeFromJavaUTF8: bytes
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   408
    "Decodes a string from modified UTF8 encoding
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   409
     as used in Java .class files. see
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   410
     'The class file format specification', section 4.5.7"
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   411
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   412
    | string  i  s  b  codePoint  realLength |
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   413
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   414
    string := String new: bytes size.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   415
    realLength := bytes size.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   416
    s := bytes readStream.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   417
    i := 1.
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   418
    [ s atEnd ] whileFalse:
1253
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   419
            [ b := s next.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   420
            (b & 2r10000000) == 0
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   421
                ifTrue: [ codePoint := b ]
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   422
                ifFalse:
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   423
                    [ self assert: (b & 2r01000000) = 2r01000000.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   424
                    (b & 2r00100000) = 0
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   425
                        ifTrue:
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   426
                            [ "two byte utf char"
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   427
                            realLength := realLength - 1.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   428
                            self assert: s size > 0.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   429
                            self assert: (b & 2r01000000) = 2r01000000.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   430
                            string bitsPerCharacter < 16
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   431
                                ifTrue: [ string := Unicode16String fromString: string ].
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   432
                            codePoint := (b & 2r00011111) << 6.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   433
                            b := s next.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   434
                            self assert: (b & 2r11000000) = 2r10000000.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   435
                            codePoint := codePoint + (b & 2r00111111). ]
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   436
                        ifFalse:
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   437
                            [ "at lease 3 byte utf char"
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   438
                            realLength := realLength - 2.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   439
                            string bitsPerCharacter < 16"was: 32"
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   440
                                ifTrue: [ string := Unicode16String"was: Unicode32String" fromString: string ].
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   441
                            self assert: s size > 1.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   442
                            (b & 2r00010000) = 0
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   443
                                ifTrue:
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   444
                                    [ | utf32Possible  utf32Value |
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   445
1253
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   446
                                    "3 or 6 byte utf char"
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   447
                                    self assert: s size > 1.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   448
                                    s size < 5
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   449
                                        ifTrue: [ utf32Possible := false ]
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   450
                                        ifFalse: [ utf32Possible := true ].
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   451
                                    b ~= 2r11101101 ifTrue: [ utf32Possible := false ].
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   452
                                    codePoint := (b & 2r00001111) << 12.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   453
                                    b := s next.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   454
                                    self assert: (b & 2r11000000) = 2r10000000.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   455
                                    ((b & 2r11110000) = 2r10100000 and: [ utf32Possible ])
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   456
                                        ifTrue: [ utf32Value := 2r00010000 + ((b & 2r00001111) << 16) ]
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   457
                                        ifFalse: [ utf32Possible := false ].
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   458
                                    codePoint := codePoint + ((b & 2r00111111) << 6).
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   459
                                    b := s next.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   460
                                    self assert: (b & 2r11000000) = 2r10000000.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   461
                                    utf32Possible
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   462
                                        ifTrue: [ utf32Value := utf32Value + ((b & 2r00111111) << 10) ].
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   463
                                    codePoint := codePoint + (b & 2r00111111).
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   464
                                    utf32Possible
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   465
                                        ifTrue:
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   466
                                            [ | tmpB |
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   467
1253
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   468
                                            string bitsPerCharacter < 32
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   469
                                                ifTrue: [ string := Unicode32String fromString: string ].
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   470
                                            tmpB := s copy.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   471
                                            b := tmpB next.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   472
                                            b = 2r11101101
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   473
                                                ifTrue:
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   474
                                                    [ b := tmpB next.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   475
                                                    (b & 2r11110000) = 2r10110000
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   476
                                                        ifTrue:
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   477
                                                            [ utf32Value := utf32Value + ((b & 2r00001111) << 6).
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   478
                                                            b := tmpB next.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   479
                                                            self assert: (b & 2r11000000) = 2r10000000.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   480
                                                            utf32Value := utf32Value + (b & 2r00111111).
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   481
                                                            codePoint := utf32Value.
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   482
                                                            realLength := realLength - 3. s position: tmpB position.] ] ] ]
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   483
                                ifFalse:
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   484
                                    [ "should not happen, ask mh"
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   485
                                    self halt. ] ] ].
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   486
            string at: i put: (Character codePoint: codePoint).
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   487
            i := i + 1. ].
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   488
    ^ string subString: 1 to: realLength.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   489
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   490
    "
1253
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   491
        String decodeFromJavaUTF8: 'Hello world' asByteArray"
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   492
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   493
    "Created: / 22-12-2010 / 23:45:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   494
    "Modified: / 09-02-2011 / 01:12:25 / Marcel Hlopko <hlopik@gmail.com>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   495
    "Modified: / 13-03-2011 / 15:52:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1253
0ce45e884e08 Few more fixes in native methods
vranyj1
parents: 1226
diff changeset
   496
    "Modified: / 09-12-2011 / 19:49:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   497
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   498
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   499
!CharacterArray class methodsFor:'instance creation'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   500
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   501
fromJavaUTF8Bytes:aByteCollection
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   502
    "return a new string which represents the characters as decoded
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   503
     from the modified utf8 encoded bytes as specified in
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   504
     The class file format specification, section 4.5.7"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   505
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   506
    ^ self decodeFromJavaUTF8:aByteCollection.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   507
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   508
    "
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   509
     CharacterArray fromUTF8Bytes:#[ 16r41 16r42 ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   510
     CharacterArray fromUTF8Bytes:#[ 16rC1 16r02 ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   511
     CharacterArray fromUTF8Bytes:#[ 16rE0 16r81 16r02 ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   512
     CharacterArray fromUTF8Bytes:#[ 16rEF 16rBF 16rBF ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   513
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   514
   rfc2279 examples:
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   515
     CharacterArray fromUTF8Bytes:#[ 16r41 16rE2 16r89 16rA2 16rCE 16r91 16r2E ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   516
     CharacterArray fromUTF8Bytes:#[ 16rED 16r95 16r9C 16rEA 16rB5 16rAD 16rEC 16r96 16rB4 ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   517
     CharacterArray fromUTF8Bytes:#[ 16rE6 16r97 16rA5 16rE6 16r9C 16rAC 16rE8 16rAA 16r9E ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   518
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   519
   invalid:
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   520
     CharacterArray fromUTF8Bytes:#[ 16rC0 16r80 ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   521
     CharacterArray fromUTF8Bytes:#[ 16rE0 16r80 16r80 ]
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   522
    "
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   523
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   524
    "Created: / 23-12-2010 / 09:01:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   525
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   526
865
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   527
!CharacterArray class methodsFor:'queries'!
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   528
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   529
isJavaArrayClass
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   530
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   531
    ^true
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   532
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   533
    "Created: / 05-02-2011 / 22:45:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   534
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   535
865
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   536
!CharacterArray class methodsFor:'accessing-java'!
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   537
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   538
javaArrayClass
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   539
901
64a889b68bef - JavaVM: more natives
vranyj1
parents: 900
diff changeset
   540
    ^JavaArray javaArrayClassFor: Unicode16String
865
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   541
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   542
    "Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
901
64a889b68bef - JavaVM: more natives
vranyj1
parents: 900
diff changeset
   543
    "Modified: / 10-08-2011 / 13:18:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
865
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   544
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   545
865
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   546
!CharacterArray class methodsFor:'accessing-java'!
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   547
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   548
javaComponentClass
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   549
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   550
    ^Character
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   551
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   552
    "Created: / 20-12-2010 / 22:05:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
82615f7deade Few fixes...
vranyj1
parents: 851
diff changeset
   553
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   554
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   555
!Class methodsFor:'accessing - java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   556
1649
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   557
classLoader
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   558
    JavaVM smalltalkClassLoader
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   559
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   560
    "Created: / 22-08-2012 / 13:00:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   561
! !
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   562
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   563
!Class methodsFor:'accessing - java'!
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   564
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   565
javaMirror
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   566
    ^self javaMirrorClass forClass: self.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   567
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   568
    "Created: / 31-07-2012 / 17:39:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   569
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   570
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   571
!Class methodsFor:'accessing - java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   572
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   573
javaMirrorClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   574
    ^self isJavaPrimitiveType ifTrue:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   575
        JavaMirror mirrorClassForJavaPrimitive
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   576
    ] ifFalse:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   577
        JavaMirror mirrorClassForAlienClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   578
    ]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   579
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   580
    "Created: / 31-07-2012 / 17:39:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   581
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   582
1656
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   583
!Class methodsFor:'accessing - java'!
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   584
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   585
lookupMethodByNameAndType: nameAndType
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   586
    | descriptor selector |
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   587
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   588
    descriptor := JavaMethodDescriptor fromString: (nameAndType descriptor).
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   589
    selector := nameAndType name copyReplaceAll: $_ with: $:.
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   590
    descriptor numArgs > 0 ifTrue:[selector := selector , ':'].
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   591
    selector := selector asSymbol.
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   592
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   593
    ^self lookupMethodFor: selector
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   594
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   595
    "Created: / 22-08-2012 / 13:11:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   596
! !
c6fee8f3a640 - fixes for Groovy-Smalltalk interop - SmalltalkEvaluator example works
vranyj1
parents: 1649
diff changeset
   597
1368
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   598
!ConfigurableFeatures class methodsFor:'queries-features'!
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   599
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   600
hasJavaSupport
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   601
    "/ use Smalltalk-at to trick the dependency/prerequisite generator
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   602
    ^ (Smalltalk at: #'JavaVM' ifAbsent:nil) notNil
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   603
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   604
    "
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   605
     ConfigurableFeatures hasJavaSupport
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   606
     ConfigurableFeatures includesFeature:#JavaSupport
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   607
    "
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   608
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   609
    "Created: / 03-01-2012 / 15:36:03 / cg"
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   610
    "Created: / 18-02-2012 / 16:42:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5f502e712403 Groovy language support and integration
vranyj1
parents: 1362
diff changeset
   611
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   612
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   613
!Delay methodsFor:'delaying'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   614
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   615
waitWithState:state
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   616
    "suspend the current process until either the relative time delta
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   617
     has passed (if millisecondDelta is non-nil), or the absolute millisecondTime
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   618
     has been reached (if resumptionTime non-nil)."
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   619
    
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   620
    | wasBlocked  currentDelta  dueTime  now  then |
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   621
    isInterrupted := false.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   622
    millisecondDelta notNil ifTrue: [
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   623
        now := OperatingSystem getMillisecondTime.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   624
        currentDelta := millisecondDelta rounded.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   625
        currentDelta > 16r0fffffff ifTrue: [
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   626
            "NOTE: the microsecondTime is increasing monotonically,
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   627
                   while millisecondTime is wrapping at 16r1fffffff.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   628
                   So use the microsecondTime to check when we are finished"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   629
            dueTime := OperatingSystem getMicrosecondTime + (currentDelta * 1000).
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   630
            currentDelta := 16r0fffffff.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   631
        ].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   632
        then := OperatingSystem millisecondTimeAdd: now and: currentDelta.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   633
    ] ifFalse: [ then := resumptionTime. ].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   634
    wasBlocked := OperatingSystem blockInterrupts.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   635
    [
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   636
        [
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   637
            Processor signal: delaySemaphore atMilliseconds: then.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   638
            Processor activeProcess state: state.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   639
            delaySemaphore wait.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   640
        ] doWhile: [
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   641
            (dueTime notNil 
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   642
                and: [
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   643
                    isInterrupted not 
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   644
                        and: [ (currentDelta := dueTime - OperatingSystem getMicrosecondTime) > 0 ]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   645
                ]) 
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   646
                    ifTrue: [
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   647
                        currentDelta := (currentDelta // 1000) min: 16r0fffffff.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   648
                        now := OperatingSystem getMillisecondTime.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   649
                        then := OperatingSystem millisecondTimeAdd: now and: currentDelta.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   650
                        true.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   651
                    ]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   652
                    ifFalse: [ false ]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   653
        ].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   654
    ] ensure: [ wasBlocked ifFalse: [ OperatingSystem unblockInterrupts ]. ]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   655
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   656
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   657
     Transcript showCR:'1'.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   658
     (Delay forSeconds:10) wait.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   659
     Transcript showCR:'2'."
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   660
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   661
    "Modified: / 26-02-1997 / 15:21:35 / cg"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   662
    "Modified: / 18-04-1997 / 11:56:46 / stefan"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   663
    "Created: / 30-11-2011 / 13:38:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   664
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   665
826
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   666
!DoubleArray class methodsFor:'testing'!
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   667
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   668
isInterface
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   669
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   670
    ^false
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   671
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   672
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   673
!DoubleArray class methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   674
912
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   675
isJavaArrayClass
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   676
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   677
    ^true
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   678
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   679
    "Created: / 20-12-2010 / 22:47:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   680
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   681
912
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   682
!DoubleArray class methodsFor:'queries'!
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   683
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   684
isJavaReferenceType
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   685
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   686
    "Java arrays are reference types"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   687
    ^true
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   688
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   689
    "Created: / 20-12-2010 / 22:30:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   690
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   691
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   692
!DoubleArray class methodsFor:'accessing-java'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   693
1226
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   694
javaArrayClass
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   695
    ^ JavaArray javaArrayClassFor: self.
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   696
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   697
    "Created: / 06-12-2011 / 17:28:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   698
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   699
1226
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   700
!DoubleArray class methodsFor:'accessing-java'!
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   701
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   702
javaComponentClass
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   703
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   704
    ^Float
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   705
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   706
    "Created: / 20-12-2010 / 22:06:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   707
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   708
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   709
!DoubleArray class methodsFor:'accessing'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   710
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   711
javaName
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   712
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   713
    ^'[D'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   714
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   715
    "Modified: / 25-02-2011 / 19:03:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   716
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   717
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   718
!ExecutableFunction methodsFor:'queries'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   719
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   720
isJavaConstructor
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   721
    ^ false
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   722
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   723
    "Created: / 31-07-2012 / 18:42:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   724
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   725
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   726
!Float class methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   727
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   728
isJavaPrimitiveType
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   729
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   730
    ^true
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   731
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   732
    "Created: / 06-02-2011 / 17:21:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   733
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   734
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   735
!Float class methodsFor:'accessing'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   736
851
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   737
javaArrayClass
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   738
    ^ DoubleArray
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   739
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   740
    "Created: / 11-02-2011 / 10:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   741
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   742
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   743
!Float class methodsFor:'autoboxing support'!
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   744
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   745
javaBox: anObject
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   746
    | wrapper |
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   747
1033
a31de6a4cfa4 refactoringl, moved registry to JavaVM
hlopkmar
parents: 1032
diff changeset
   748
    wrapper := (JavaVM classForName: 'java.lang.Double') new.
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   749
    wrapper perform: #'<init>(D)V' with: anObject.
1033
a31de6a4cfa4 refactoringl, moved registry to JavaVM
hlopkmar
parents: 1032
diff changeset
   750
    ^ wrapper
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   751
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   752
    "Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   753
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   754
851
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   755
!Float class methodsFor:'accessing'!
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   756
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   757
javaName
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   758
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   759
    ^'double'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   760
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   761
    "Modified: / 25-02-2011 / 18:59:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   762
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   763
1386
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   764
!Float class methodsFor:'accessing'!
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   765
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   766
javaWrapperClass
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   767
    ^(Java classForName: 'java.lang.Double')
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   768
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   769
    "Created: / 24-02-2012 / 19:42:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   770
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   771
826
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   772
!FloatArray class methodsFor:'testing'!
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   773
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   774
isInterface
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   775
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   776
    ^false
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
   777
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   778
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   779
!FloatArray class methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   780
912
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   781
isJavaArrayClass
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   782
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   783
    ^true
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   784
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   785
    "Created: / 20-12-2010 / 22:47:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   786
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   787
912
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   788
!FloatArray class methodsFor:'queries'!
e651488f5741 Many fixes in reflection, expecially for generic types support
vranyj1
parents: 905
diff changeset
   789
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   790
isJavaReferenceType
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   791
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   792
    "Java arrays are reference types"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   793
    ^true
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   794
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   795
    "Created: / 20-12-2010 / 22:30:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   796
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   797
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   798
!FloatArray class methodsFor:'accessing-java'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   799
1226
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   800
javaArrayClass
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   801
    ^ JavaArray javaArrayClassFor: self.
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   802
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   803
    "Created: / 06-12-2011 / 17:29:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   804
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   805
1226
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   806
!FloatArray class methodsFor:'accessing-java'!
bd1d5c4ca4a8 fixes to make resolving tests pass
hlopkmar
parents: 1225
diff changeset
   807
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   808
javaComponentClass
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   809
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   810
    ^ShortFloat
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   811
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   812
    "Created: / 20-12-2010 / 22:06:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   813
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   814
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   815
!FloatArray class methodsFor:'accessing'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   816
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   817
javaName
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   818
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   819
    ^'[F'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   820
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   821
    "Modified: / 25-02-2011 / 19:03:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   822
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   823
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   824
!Integer class methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   825
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   826
isJavaPrimitiveType
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   827
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   828
    ^true
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   829
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   830
    "Created: / 11-02-2011 / 11:12:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   831
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   832
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   833
!Integer class methodsFor:'accessing'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   834
851
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   835
javaArrayClass
873
933263bd2d27 Fixes for primitive array types (uses Signed* variant of an array)
vranyj1
parents: 866
diff changeset
   836
    ^ SignedIntegerArray
851
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   837
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   838
    "Created: / 11-02-2011 / 10:51:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   839
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   840
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   841
!Integer class methodsFor:'autoboxing support'!
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   842
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   843
javaBox: anObject
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   844
    | wrapper |
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   845
1033
a31de6a4cfa4 refactoringl, moved registry to JavaVM
hlopkmar
parents: 1032
diff changeset
   846
    wrapper := (JavaVM classForName: 'java.lang.Integer') new.
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   847
    wrapper perform: #'<init>(I)V' with: anObject.
1033
a31de6a4cfa4 refactoringl, moved registry to JavaVM
hlopkmar
parents: 1032
diff changeset
   848
    ^ wrapper
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   849
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   850
    "Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   851
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   852
851
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   853
!Integer class methodsFor:'accessing'!
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   854
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   855
javaName
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   856
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   857
    ^'int'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   858
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   859
    "Modified: / 25-02-2011 / 18:59:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   860
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   861
1204
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   862
!Integer class methodsFor:'autoboxing support'!
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   863
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   864
javaUnbox: object onError: errorBlock
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   865
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   866
    ^self javaUnbox: object onError: errorBlock 
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   867
          min: "Integer.MIN_VALUE"-2147483648
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   868
          max: "Integer.MAX_VALUE" 2147483647
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   869
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   870
    "Created: / 25-11-2011 / 19:10:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   871
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   872
1205
vranyj1
parents: 1204
diff changeset
   873
!Integer class methodsFor:'autoboxing support'!
vranyj1
parents: 1204
diff changeset
   874
vranyj1
parents: 1204
diff changeset
   875
javaUnbox: object onError: errorBlock min: min max: max
vranyj1
parents: 1204
diff changeset
   876
vranyj1
parents: 1204
diff changeset
   877
    | value |
vranyj1
parents: 1204
diff changeset
   878
vranyj1
parents: 1204
diff changeset
   879
    (#(  'java/lang/Byte'
vranyj1
parents: 1204
diff changeset
   880
        'java/lang/Short'
vranyj1
parents: 1204
diff changeset
   881
        'java/lang/Integer'
vranyj1
parents: 1204
diff changeset
   882
        "'java/lang/Long'" ) includes: object class name) ifFalse:[
vranyj1
parents: 1204
diff changeset
   883
        errorBlock value.
vranyj1
parents: 1204
diff changeset
   884
    ].
vranyj1
parents: 1204
diff changeset
   885
vranyj1
parents: 1204
diff changeset
   886
    value := object instVarNamed:#value.
vranyj1
parents: 1204
diff changeset
   887
    (value between: min and: max) ifFalse:[
vranyj1
parents: 1204
diff changeset
   888
        errorBlock value.
vranyj1
parents: 1204
diff changeset
   889
    ].
vranyj1
parents: 1204
diff changeset
   890
    ^value
vranyj1
parents: 1204
diff changeset
   891
vranyj1
parents: 1204
diff changeset
   892
    "Created: / 22-11-2011 / 11:43:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
vranyj1
parents: 1204
diff changeset
   893
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   894
1386
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   895
!Integer class methodsFor:'accessing'!
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   896
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   897
javaWrapperClass
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   898
    ^(Java classForName: 'java.lang.Integer')
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   899
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   900
    "Created: / 24-02-2012 / 19:41:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   901
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   902
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   903
!LargeInteger class methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   904
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   905
isJavaPrimitiveType
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   906
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   907
    ^true
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   908
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   909
    "Created: / 04-02-2011 / 11:55:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   910
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   911
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   912
!LargeInteger class methodsFor:'accessing'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   913
851
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   914
javaArrayClass
873
933263bd2d27 Fixes for primitive array types (uses Signed* variant of an array)
vranyj1
parents: 866
diff changeset
   915
    ^ SignedLongIntegerArray
851
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   916
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   917
    "Created: / 11-02-2011 / 10:51:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   918
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   919
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   920
!LargeInteger class methodsFor:'autoboxing support'!
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   921
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
   922
javaBox: anObject
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   923
    | wrapper |
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   924
1033
a31de6a4cfa4 refactoringl, moved registry to JavaVM
hlopkmar
parents: 1032
diff changeset
   925
    wrapper := (JavaVM classForName: 'java.lang.Long') new.
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   926
    wrapper perform: #'<init>(J)V' with: anObject.
1033
a31de6a4cfa4 refactoringl, moved registry to JavaVM
hlopkmar
parents: 1032
diff changeset
   927
    ^ wrapper
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   928
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   929
    "Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
   930
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   931
851
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   932
!LargeInteger class methodsFor:'accessing'!
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
   933
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   934
javaName
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   935
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   936
    ^'long'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   937
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   938
    "Modified: / 25-02-2011 / 18:59:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
   939
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   940
1204
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   941
!LargeInteger class methodsFor:'autoboxing support'!
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   942
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   943
javaUnbox: object onError: errorBlock
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   944
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   945
    | value |
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   946
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   947
    (object class name = 'java/lang/Long') ifFalse:[
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   948
        errorBlock value.
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   949
    ].
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   950
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   951
    value := object instVarNamed:#value.
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   952
    (value between: "Integer.MIN_VALUE"-9223372036854775808 and: "Integer.MAX_VALUE" 9223372036854775807) ifFalse:[
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   953
        errorBlock value.
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   954
    ].
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   955
    ^value
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   956
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   957
    "Created: / 22-11-2011 / 11:45:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6c2b887399e8 Few small fixes
vranyj1
parents: 1192
diff changeset
   958
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   959
1386
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   960
!LargeInteger class methodsFor:'accessing'!
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   961
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   962
javaWrapperClass
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   963
    ^(Java classForName: 'java.lang.Long')
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   964
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   965
    "Created: / 24-02-2012 / 19:42:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
   966
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
   967
1649
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   968
!Method methodsFor:'queries-java'!
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   969
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   970
isAbstract
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   971
    "For compatibility with Java methods"
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   972
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   973
    ^false
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   974
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   975
    "Created: / 22-08-2012 / 13:19:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   976
! !
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   977
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   978
!Method methodsFor:'queries-java'!
1648
ba54c818827d - more reflection stuff moved to JavaMirror
vranyj1
parents: 1617
diff changeset
   979
ba54c818827d - more reflection stuff moved to JavaMirror
vranyj1
parents: 1617
diff changeset
   980
isStatic
ba54c818827d - more reflection stuff moved to JavaMirror
vranyj1
parents: 1617
diff changeset
   981
    "For compatibility with Java methods"
ba54c818827d - more reflection stuff moved to JavaMirror
vranyj1
parents: 1617
diff changeset
   982
ba54c818827d - more reflection stuff moved to JavaMirror
vranyj1
parents: 1617
diff changeset
   983
    ^mclass notNil and:[mclass isMetaclass]
ba54c818827d - more reflection stuff moved to JavaMirror
vranyj1
parents: 1617
diff changeset
   984
ba54c818827d - more reflection stuff moved to JavaMirror
vranyj1
parents: 1617
diff changeset
   985
    "Created: / 22-08-2012 / 12:27:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ba54c818827d - more reflection stuff moved to JavaMirror
vranyj1
parents: 1617
diff changeset
   986
! !
ba54c818827d - more reflection stuff moved to JavaMirror
vranyj1
parents: 1617
diff changeset
   987
1649
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   988
!Method methodsFor:'accessing-java'!
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   989
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   990
javaClass
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   991
    "For compatibiliry with JavaMethod"
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   992
    ^mclass
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   993
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   994
    "Created: / 22-08-2012 / 13:20:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   995
! !
0af82006c0b2 - some more support for calling Smalltalk from Groovy. Crashes VM now :-)
vranyj1
parents: 1648
diff changeset
   996
1691
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
   997
!Object methodsFor:'accessing-Java'!
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
   998
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
   999
getJavaLockWord
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1000
    "Returns a Java lock word for given object. The returned
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1001
     value is 
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1002
        - either SmallInteger that encodes the thinlock
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1003
        - or a fat lock, instance of JavaMonitor
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1004
    "
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1005
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1006
    "/For nonJava objects, always return fatlock
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1007
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1008
    ^self getJavaMonitor
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1009
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1010
    "Created: / 26-08-2012 / 14:03:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1011
! !
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1012
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1013
!Object methodsFor:'accessing-Java'!
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1014
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1015
getJavaMonitor
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1016
    "Returns fat JavaMonitor associated with the receiver"
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1017
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1018
    ^JavaVM getJavaMonitorFor: self
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1019
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1020
    "Created: / 26-08-2012 / 18:35:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1021
! !
826f8d7dc0df thinlocks reintegrated
vranyj1
parents: 1690
diff changeset
  1022
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1023
!Object methodsFor:'testing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1024
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1025
isGroovyClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1026
    ^false
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1027
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1028
    "Created: / 18-02-2012 / 20:29:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1029
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1030
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1031
!Object methodsFor:'testing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1032
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1033
isJavaArray
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1034
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1035
    ^self class isJavaArrayClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1036
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1037
    "Created: / 19-12-2010 / 17:05:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1038
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1039
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1040
!Object methodsFor:'testing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1041
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1042
isJavaNameAndType
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1043
    "return true, if given object represents name and type struct in java constant pool"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1044
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1045
    ^ false.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1046
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1047
    "Created: / 10-05-2011 / 12:21:52 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1048
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1049
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1050
!Object methodsFor:'testing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1051
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1052
isJavaPackage
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1053
    "return true, if the receiver is a java package.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1054
     False is returned here - the method is only redefined in JavaPackage."
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1055
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1056
    ^ false
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1057
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1058
    "Created: / 09-08-2011 / 09:35:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1059
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1060
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1061
!Object methodsFor:'testing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1062
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1063
isJavaRef
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1064
"return true, if given object represents reference in java constant pool"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1065
^ false.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1066
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1067
    "Created: / 08-04-2011 / 16:12:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1068
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1069
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1070
!Object methodsFor:'testing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1071
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1072
isJavaWrapperClass
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1073
    "return true, if this is a java wrapper class, i.e, java.lang.Integer, java.lang.Boolean etc."
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1074
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1075
    ^ false
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1076
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1077
    "Created: / 01-01-2012 / 17:25:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1078
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1079
1617
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1080
!Object methodsFor:'testing'!
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1081
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1082
isSocket
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1083
    "return true, if the receiver is some kind of socket;
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1084
     false returned here - the method is only redefined in Socket."
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1085
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1086
    ^ false
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1087
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1088
    "Created: / 17-08-2012 / 15:32:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1089
! !
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1090
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1091
!Object methodsFor:'autoboxing support'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1092
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1093
javaBox: anObject
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1094
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1095
    ^anObject
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1096
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1097
    "Created: / 15-08-2011 / 10:52:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1098
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1099
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1100
!Object methodsFor:'autoboxing support'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1101
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1102
javaUnwrap: anObject
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1103
    "Unwraps the objects. Possibly call on the wrapped class"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1104
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1105
    ^anObject
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1106
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1107
    "Created: / 10-12-2011 / 19:51:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1108
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1109
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1110
!Object methodsFor:'autoboxing support'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1111
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1112
javaUnwrapFrom: javaType
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1113
    ^ self.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1114
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1115
    "Created: / 10-12-2011 / 19:51:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1116
    "Created: / 30-12-2011 / 15:22:06 / kursjan <kursjan@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1117
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1118
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1119
!Object methodsFor:'autoboxing support'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1120
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1121
javaWrap: anObject
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1122
    "Wraps the receiver into corresponding Java object"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1123
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1124
    ^anObject
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1125
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1126
    "Created: / 26-12-2011 / 00:57:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1127
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1128
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1129
!Object class methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1130
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1131
isJavaArrayClass
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1132
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1133
    ^false
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1134
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1135
    "Created: / 19-12-2010 / 17:05:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1136
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1137
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1138
!Object class methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1139
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1140
isJavaClassType
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1141
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1142
    ^false
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1143
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1144
    "Created: / 11-02-2011 / 08:08:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1145
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1146
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1147
!Object class methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1148
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1149
isJavaReferenceType
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1150
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1151
    ^false
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1152
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1153
    "Created: / 20-12-2010 / 21:52:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1154
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1155
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1156
!Object class methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1157
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1158
isJavaType
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1159
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1160
    ^false
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1161
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1162
    "Created: / 20-12-2010 / 21:52:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1163
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1164
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1165
!Process methodsFor:'Java protocol'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1166
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1167
clearInterrupted
1615
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1168
    JavaVM clearInterrupted: self
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1169
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1170
    "Created: / 30-11-2011 / 10:44:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1615
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1171
    "Modified: / 16-08-2012 / 22:03:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1172
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1173
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1174
!Process methodsFor:'Java protocol'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1175
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1176
isInterrupted
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1177
1615
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1178
    ^ JavaVM isInterrupted: self.
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1179
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1180
    "Created: / 30-11-2011 / 12:12:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1615
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1181
    "Modified: / 16-08-2012 / 21:56:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1182
! !
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1183
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1184
!Process methodsFor:'queries'!
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1185
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1186
isParked
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1187
    "return true, iff the receiver is parked (by means of sun.misc.Unsafe.park() )"
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1188
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1189
    ^ (state == #parked)
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1190
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1191
    "Created: / 16-08-2012 / 22:13:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1192
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1193
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1194
!Process methodsFor:'queries'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1195
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1196
isSleeping
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1197
    "return true, iff the receiver is sleeping on Delay"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1198
    
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1199
    ^ (state == #sleep)
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1200
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1201
    "Created: / 30-11-2011 / 13:35:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1202
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1203
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1204
!Process methodsFor:'queries'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1205
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1206
isWaiting
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1207
    "return true, iff the receiver is waiting on semaphore or something"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1208
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1209
    ^ (state == #wait)
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1210
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1211
    "Created: / 20-11-2011 / 20:55:11 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1212
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1213
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1214
!Process methodsFor:'Java protocol'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1215
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1216
javaInterrupt
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1217
    self isWaiting ifTrue: [
1615
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1218
        self interruptWith: [
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1219
            JavaVM throwInterruptedException: 'thread has been interrupted during wait'.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1220
            self terminate
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1221
        ].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1222
        ^self
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1223
    ].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1224
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1225
    self isSleeping ifTrue: [      
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1226
        self interruptWith: [
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1227
            JavaVM throwInterruptedException: 'thread has been interrupted during sleep'.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1228
            self terminate
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1229
        ].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1230
        ^self
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1231
    ].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1232
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1233
    self isParked ifTrue:[
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1234
        self setInterrupted.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1235
        JavaVM unpark: self.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1236
        ^self.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1237
    ].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1238
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1239
    self setInterrupted
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1240
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1241
    "Created: / 30-11-2011 / 13:35:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1615
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1242
    "Modified: / 16-08-2012 / 22:14:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1243
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1244
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1245
!Process methodsFor:'Java protocol'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1246
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1247
setInterrupted
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1248
1615
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1249
    JavaVM setInterrupted: self
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1250
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1251
    "Created: / 30-11-2011 / 10:44:37 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1615
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1252
    "Modified: / 16-08-2012 / 22:03:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1253
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1254
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1255
!ProgrammingLanguage methodsFor:'testing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1256
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1257
isGroovy
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1258
    "true iff this is a Groovy language"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1259
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1260
    ^ false
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1261
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1262
    "Created: / 13-04-2012 / 17:47:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1263
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1264
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1265
!ProgrammingLanguage methodsFor:'testing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1266
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1267
isJavaLike
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1268
    "true if receiver is kind of Java language (based on Java)"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1269
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1270
    ^ false
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1271
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1272
    "Created: / 13-04-2012 / 17:48:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1273
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1274
1276
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1275
!ProjectDefinition class methodsFor:'description - java'!
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1276
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1277
javaClassPath
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1278
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1279
    "Defines a Java class path containing java classes/jars
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1280
     required by this package"
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1281
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1282
    ^#()
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1283
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1284
    "Created: / 13-12-2011 / 23:48:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1285
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1286
1276
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1287
!ProjectDefinition class methodsFor:'description - java'!
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1288
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1289
javaSourcePath
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1290
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1291
    "Defines paths to Java source files (for packages that
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1292
     contains Java code"    
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1293
    ^#()
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1294
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1295
    "Created: / 13-12-2011 / 23:49:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5a302466ecb8 Default class path hanling changed, now each Smalltalk/X package can define its own class path, that is included initial class path
vranyj1
parents: 1263
diff changeset
  1296
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1297
1615
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1298
!Semaphore methodsFor:'waiting'!
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1299
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1300
parkWithTimeoutMs:milliSeconds
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1301
    "Same as #waitWithTimeoutMs: but sets the state to #parked.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1302
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1303
     Stupid, that I have to copy-paste this method...
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1304
    "
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1305
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1306
    |activeProcess timeoutOccured wasBlocked timeoutBlock now endTime|
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1307
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1308
    wasBlocked := OperatingSystem blockInterrupts.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1309
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1310
    count <= 0 ifTrue:[
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1311
        "with zero-timeout, this is a poll"
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1312
        milliSeconds == 0 ifTrue:[
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1313
            wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1314
            ^ nil
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1315
        ].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1316
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1317
        activeProcess := Processor activeProcess.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1318
        timeoutOccured := false.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1319
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1320
        milliSeconds notNil ifTrue:[
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1321
            "Wait with timeout: calculate the end-time"
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1322
            now := OperatingSystem getMillisecondTime.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1323
            endTime := OperatingSystem millisecondTimeAdd:now and:milliSeconds.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1324
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1325
            timeoutBlock := [timeoutOccured := true. timeoutBlock:= nil. Processor resume:activeProcess].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1326
            Processor addTimedBlock:timeoutBlock for:activeProcess atMilliseconds:endTime.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1327
        ].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1328
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1329
        "
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1330
         need a while-loop here, since more than one process may
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1331
         wait for it and another one may also wake up.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1332
         Thus, the count is not always non-zero after returning from
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1333
         suspend.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1334
        "
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1335
        [
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1336
            self addWaitingProcess:activeProcess.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1337
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1338
            "
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1339
             for some more descriptive info in processMonitor ...
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1340
             ... set the state to #wait (instead of #suspend)
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1341
            "
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1342
            [
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1343
                "sleep until resumed..."
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1344
                activeProcess suspendWithState:#parked.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1345
            ] ifCurtailed:[
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1346
                "interrupts are not blocked when entered through Processor>>#interruptActive"
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1347
                OperatingSystem blockInterrupts.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1348
                timeoutBlock notNil ifTrue:[
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1349
                    Processor removeTimedBlock:timeoutBlock.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1350
                    timeoutBlock := nil.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1351
                ].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1352
                self removeWaitingProcess:activeProcess.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1353
                wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1354
            ].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1355
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1356
            self removeWaitingProcess:activeProcess.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1357
            timeoutOccured ifTrue:[
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1358
                wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1359
                ^ nil
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1360
            ].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1361
        ] doUntil:[count > 0].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1362
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1363
        timeoutBlock notNil ifTrue:[
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1364
            Processor removeTimedBlock:timeoutBlock.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1365
            timeoutBlock := nil.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1366
        ].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1367
    ].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1368
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1369
    "if we come here, we have accquired the semaphore"
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1370
    count := count - 1.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1371
    count == 0 ifTrue:[
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1372
        lastOwner := Processor activeProcess.
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1373
    ].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1374
    wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1375
    ^ self
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1376
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1377
    "Created: / 16-08-2012 / 20:53:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1378
! !
dde13d0a263e Initial support for park()/unpark()
vranyj1
parents: 1609
diff changeset
  1379
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1380
!Set methodsFor:'javaProtocol'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1381
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1382
java__contains:anObject
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1383
         ^ self contains: [:el | anObject = el ] 
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1384
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1385
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1386
!ShortFloat class methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1387
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1388
isJavaPrimitiveType
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1389
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1390
    ^true
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1391
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1392
    "Created: / 06-02-2011 / 17:21:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1393
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1394
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1395
!ShortFloat class methodsFor:'accessing'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1396
851
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
  1397
javaArrayClass
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
  1398
    ^ FloatArray
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
  1399
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
  1400
    "Created: / 11-02-2011 / 10:50:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
  1401
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1402
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
  1403
!ShortFloat class methodsFor:'autoboxing support'!
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
  1404
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
  1405
javaBox: anObject
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
  1406
    | wrapper |
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
  1407
1033
a31de6a4cfa4 refactoringl, moved registry to JavaVM
hlopkmar
parents: 1032
diff changeset
  1408
    wrapper := (JavaVM classForName: 'java.lang.Float') new.
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
  1409
    wrapper perform: #'<init>(F)V' with: anObject.
1033
a31de6a4cfa4 refactoringl, moved registry to JavaVM
hlopkmar
parents: 1032
diff changeset
  1410
    ^ wrapper
917
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
  1411
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
  1412
    "Created: / 16-08-2011 / 09:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ecd1a00132f1 - added JavaEvaluator
vranyj1
parents: 916
diff changeset
  1413
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1414
851
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
  1415
!ShortFloat class methodsFor:'accessing'!
fc38cc6ed478 Small refactoring
vranyj1
parents: 826
diff changeset
  1416
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1417
javaName
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1418
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1419
    ^'float'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1420
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1421
    "Modified: / 25-02-2011 / 18:59:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1422
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1423
1386
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
  1424
!ShortFloat class methodsFor:'accessing'!
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
  1425
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
  1426
javaWrapperClass
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
  1427
    ^(Java classForName: 'java.lang.Float')
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
  1428
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
  1429
    "Created: / 24-02-2012 / 19:42:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5a5fc5c71e48 Added lost methods
vranyj1
parents: 1384
diff changeset
  1430
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1431
866
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1432
!SignedIntegerArray class methodsFor:'testing'!
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1433
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1434
isInterface
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1435
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1436
    ^false
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1437
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1438
866
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1439
!SignedIntegerArray class methodsFor:'queries'!
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1440
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1441
isJavaArrayClass
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1442
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1443
    ^true
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1444
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1445
    "Created: / 06-02-2011 / 15:16:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1446
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1447
905
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1448
!SignedIntegerArray class methodsFor:'accessing-java'!
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1449
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1450
javaArrayClass
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1451
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1452
    ^JavaArray javaArrayClassFor: SignedIntegerArray
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1453
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1454
    "Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1455
    "Modified: / 10-08-2011 / 22:47:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1456
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1457
866
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1458
!SignedIntegerArray class methodsFor:'accessing'!
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1459
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1460
javaComponentClass
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1461
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1462
    ^ Integer
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1463
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1464
    "Created: / 25-06-2011 / 08:38:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1465
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1466
866
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1467
!SignedIntegerArray class methodsFor:'accessing'!
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1468
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1469
javaName
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1470
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1471
    ^'[I'.
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1472
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1473
    "Modified: / 25-02-2011 / 19:03:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1474
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1475
866
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1476
!SignedLongIntegerArray class methodsFor:'testing'!
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1477
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1478
isInterface
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1479
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1480
    ^false
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1481
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1482
866
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1483
!SignedLongIntegerArray class methodsFor:'queries'!
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1484
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1485
isJavaArrayClass
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1486
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1487
    ^true
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1488
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1489
    "Created: / 20-12-2010 / 22:47:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1490
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1491
866
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1492
!SignedLongIntegerArray class methodsFor:'queries'!
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1493
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1494
isJavaReferenceType
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1495
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1496
    "Java arrays are reference types"
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1497
    ^true
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1498
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1499
    "Created: / 20-12-2010 / 22:30:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1500
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1501
927
vranyj1
parents: 925
diff changeset
  1502
!SignedLongIntegerArray class methodsFor:'accessing-java'!
vranyj1
parents: 925
diff changeset
  1503
vranyj1
parents: 925
diff changeset
  1504
javaArrayClass
vranyj1
parents: 925
diff changeset
  1505
vranyj1
parents: 925
diff changeset
  1506
    ^JavaArray javaArrayClassFor: SignedLongIntegerArray
vranyj1
parents: 925
diff changeset
  1507
vranyj1
parents: 925
diff changeset
  1508
    "Modified: / 10-08-2011 / 22:47:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
vranyj1
parents: 925
diff changeset
  1509
    "Created: / 26-08-2011 / 18:29:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
vranyj1
parents: 925
diff changeset
  1510
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1511
866
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1512
!SignedLongIntegerArray class methodsFor:'accessing'!
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1513
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1514
javaComponentClass
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1515
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1516
    ^LargeInteger
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1517
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1518
    "Modified: / 25-06-2011 / 08:38:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1519
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1520
866
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1521
!SignedLongIntegerArray class methodsFor:'accessing'!
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1522
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1523
javaName
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1524
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1525
    ^'[J'.
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1526
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1527
    "Modified: / 25-02-2011 / 19:03:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10d1f47af6d9 Few fixes for Mauve...
vranyj1
parents: 865
diff changeset
  1528
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1529
1384
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1530
!SignedWordArray class methodsFor:'queries'!
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1531
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1532
isJavaArrayClass
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1533
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1534
    ^true
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1535
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1536
    "Created: / 20-12-2010 / 22:47:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1537
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1538
1384
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1539
!SignedWordArray class methodsFor:'queries'!
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1540
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1541
isJavaReferenceType
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1542
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1543
    "Java arrays are reference types"
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1544
    ^true
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1545
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1546
    "Created: / 20-12-2010 / 22:30:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1547
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1548
1384
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1549
!SignedWordArray class methodsFor:'accessing'!
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1550
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1551
javaComponentClass
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1552
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1553
    ^JavaShort
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1554
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1555
    "Modified: / 24-02-2012 / 17:46:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1556
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1557
1384
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1558
!SignedWordArray class methodsFor:'accessing'!
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1559
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1560
javaName
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1561
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1562
    ^'[S'.
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1563
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1564
    "Modified: / 24-02-2012 / 17:46:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d62dd4b29c22 Fixes in INSTANCE_OF + added missing method. SAXON-B now works again
vranyj1
parents: 1376
diff changeset
  1565
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1566
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1567
!SmallInteger methodsFor:'autoboxing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1568
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1569
javaUnwrapFrom: javaType
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1570
    javaType = #boolean ifTrue: [
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1571
        ^ self = 1
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1572
    ].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1573
    ^ self
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1574
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1575
    "Created: / 30-12-2011 / 15:22:52 / kursjan <kursjan@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1576
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1577
1617
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1578
!Socket methodsFor:'testing'!
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1579
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1580
isSocket
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1581
    ^true
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1582
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1583
    "Created: / 17-08-2012 / 15:32:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1584
! !
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1585
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1586
!Socket methodsFor:'special'!
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1587
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1588
reOpenIfPossible
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1589
    "If the socket was listening (server-sockets), try to reopen it"
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1590
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1591
    | pno |
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1592
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1593
    listening ifFalse:[ ^ self ].
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1594
    pno := port.
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1595
    [
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1596
        self domain: domain type: socketType protocol: protocol reuseAddress:true.
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1597
        self bindTo:port address:nil.
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1598
        self listenFor: 5
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1599
    ] on: OpenError do:[
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1600
        "Notning, socket could not be reopened"
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1601
    ].
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1602
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1603
    "Created: / 17-08-2012 / 15:43:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1604
! !
bc02a3b4cad8 - snapshot restart support for Java code
vranyj1
parents: 1615
diff changeset
  1605
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1606
!String methodsFor:'converting'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1607
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1608
asArrayOfSubstringsSeparatedBy:aSeparator
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1609
    "Modified version of asArrayOfSubstrings"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1610
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1611
    |substrings start end|
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1612
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1613
    substrings := OrderedCollection new.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1614
    start := 1.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1615
    [start <= self size] whileTrue:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1616
	(self at:start) = aSeparator ifFalse:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1617
	    end := start + 1.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1618
	    [
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1619
		end <= self size and:[(self at:end) ~= aSeparator]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1620
	    ] whileTrue:[end := end + 1].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1621
	    substrings add:(self copyFrom:start to:end - 1).
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1622
	    start := end - 1
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1623
	].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1624
	start := start + 1
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1625
    ].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1626
    ^ substrings asArray
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1627
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1628
    "Created: / 07-02-2011 / 11:18:03 / Marcel Hlopko <hlopik@gmail.com>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1629
    "Modified: / 08-02-2011 / 01:08:15 / Marcel Hlopko <hlopik@gmail.com>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1630
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1631
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1632
!UndefinedObject class methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1633
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1634
isJavaPrimitiveType
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1635
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1636
    "void"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1637
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1638
    ^true
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1639
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1640
    "Created: / 21-12-2010 / 22:52:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1641
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1642
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1643
!UndefinedObject class methodsFor:'accessing'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1644
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1645
javaName
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1646
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1647
    ^'void'.
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1648
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1649
    "Modified: / 25-02-2011 / 18:59:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1650
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1651
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1652
!UserPreferences methodsFor:'accessing-java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1653
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1654
javaClassPath
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1655
    "Return the Java user-defined class path encoded as literal array"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1656
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1657
    ^ self at:#javaClassPath ifAbsent:[#()].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1658
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1659
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1660
        UserPreferences current javaClassPath
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1661
        UserPreferences current javaClassPath: #openJDK7
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1662
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1663
        Java classPath
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1664
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1665
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1666
    "Created: / 27-07-2012 / 12:52:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1667
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1668
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1669
!UserPreferences methodsFor:'accessing-java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1670
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1671
javaClassPath: literalArrayEncoding
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1672
    "Sets the Java user-defined class path as literalArrayEncoding of a collection
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1673
     of JavaPathElements"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1674
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1675
    self at:#javaClassPath put: literalArrayEncoding.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1676
    (Java notNil and:[thisContext sender receiver == Java]) ifFalse:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1677
        | classPath |
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1678
        classPath := literalArrayEncoding decodeAsLiteralArray.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1679
        Java classPath: classPath.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1680
    ].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1681
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1682
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1683
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1684
        UserPreferences current javaClassPath
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1685
        UserPreferences current javaClassPath: #openJDK7
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1686
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1687
        Java classPath
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1688
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1689
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1690
    "Created: / 27-07-2012 / 12:50:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1691
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1692
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1693
!UserPreferences methodsFor:'accessing-java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1694
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1695
javaClassPathDecoded
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1696
    "Return the Java user-defined class path (a collection of JavaPathElement)"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1697
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1698
    ^ self javaClassPath decodeAsLiteralArray
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1699
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1700
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1701
        UserPreferences current javaClassPathDecoded
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1702
        UserPreferences current javaClassPath
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1703
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1704
        Java classPath
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1705
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1706
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1707
    "Created: / 02-08-2012 / 09:43:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1708
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1709
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1710
!UserPreferences methodsFor:'accessing-java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1711
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1712
javaRelease
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1713
    "Return the Java release according to the preferences
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1714
     or nil, if not set"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1715
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1716
    | rel sel |
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1717
    sel := self javaReleaseSelector.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1718
    sel notNil ifTrue:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1719
        rel := JavaRelease perform: sel asSymbol ifNotUnderstood:[nil]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1720
    ].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1721
    ^rel
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1722
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1723
    "Created: / 27-07-2012 / 10:12:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1724
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1725
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1726
!UserPreferences methodsFor:'accessing-java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1727
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1728
javaReleaseSelector
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1729
    ^ self at:#javaReleaseSelector ifAbsent:[nil].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1730
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1731
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1732
        UserPreferences current javaReleaseSelector
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1733
        UserPreferences current javaReleaseSelector: #openJDK6
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1734
        UserPreferences current javaReleaseSelector: nil
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1735
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1736
        Java release
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1737
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1738
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1739
    "Created: / 27-07-2012 / 10:02:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1740
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1741
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1742
!UserPreferences methodsFor:'accessing-java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1743
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1744
javaReleaseSelector: name
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1745
    "Sets the Java release to use. selector must be one of
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1746
     releases defined in JavaRelease, protocol 'instance creation'"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1747
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1748
    self at:#javaReleaseSelector put: name.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1749
    Java notNil ifTrue:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1750
        Java reinitializeRelease
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1751
    ].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1752
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1753
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1754
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1755
        UserPreferences current javaReleaseSelector
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1756
        UserPreferences current javaReleaseSelector: #openJDK7
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1757
        UserPreferences current javaReleaseSelector: nil
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1758
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1759
        Java release
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1760
        Java release:nil
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1761
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1762
        Java reinitializeRelease
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1763
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1764
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1765
    "Created: / 27-07-2012 / 10:02:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1766
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1767
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1768
!UserPreferences methodsFor:'accessing-java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1769
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1770
javaSourcePath
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1771
    "Return the Java user-defined source path encoded as literal array"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1772
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1773
    ^ self at:#javaSourcePath ifAbsent:[#()].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1774
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1775
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1776
        UserPreferences current javaSourcePath
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1777
        UserPreferences current javaSourcePath: #openJDK7
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1778
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1779
        Java sourcePath
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1780
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1781
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1782
    "Created: / 27-07-2012 / 12:54:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1783
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1784
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1785
!UserPreferences methodsFor:'accessing-java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1786
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1787
javaSourcePath: literalArrayEncoding
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1788
    "Sets the Java user-defined source path as literalArrayEncoding of a collection
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1789
     of JavaPathElements"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1790
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1791
    self at:#javaSourcePath put: literalArrayEncoding.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1792
    (Java notNil and:[thisContext sender receiver == Java]) ifFalse:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1793
        | classPath |
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1794
        classPath := literalArrayEncoding decodeAsLiteralArray.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1795
        Java sourceDirectories: classPath.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1796
    ].
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1797
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1798
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1799
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1800
        UserPreferences current javaClassPath
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1801
        UserPreferences current javaClassPath: #openJDK7
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1802
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1803
        Java sourceDirectories
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1804
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1805
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1806
    "Created: / 27-07-2012 / 12:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1807
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1808
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1809
!UserPreferences methodsFor:'accessing-java'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1810
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1811
javaSourcePathDecoded
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1812
    "Return the Java user-defined source path (a collection of JavaPathElement)"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1813
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1814
    ^ self javaSourcePath decodeAsLiteralArray
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1815
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1816
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1817
        UserPreferences current javaSourcePathDecoded
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1818
        UserPreferences current javaSourcePath
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1819
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1820
        Java sourceDirectories
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1821
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1822
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1823
    "Created: / 02-08-2012 / 09:44:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1824
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1825
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1826
!UserPreferences methodsFor:'accessing-java-devel'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1827
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1828
javaTestsDirectory
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1829
    ^ self at: #javaTestsDirectory
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1830
	ifAbsent:
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1831
	    [ | nm |
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1832
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1833
	    nm := OperatingSystem getLoginName.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1834
	     "Default path for Jan"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1835
	    (nm = 'jv' and:[OperatingSystem isUNIXlike])
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1836
		ifTrue:
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1837
		    [ '/home/jv/Projects/libjava/sources/libjava/branches/jk_new_structure/tests' ]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1838
		ifFalse:
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1839
		    [ "Default path for Jan (the other one :-)"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1840
		    nm = 'jk'
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1841
			ifTrue: [ 'path for Jan' ]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1842
			ifFalse:
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1843
			    [ "Default path for Marcel"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1844
			    nm = 'm'
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1845
				ifTrue: [ '/home/m/Projects/libjava/branches/jk_new_structure/tests' ]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1846
				ifFalse:
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1847
				    [ | "Look into package dir" p |
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1848
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1849
				    (p := (Smalltalk getPackageDirectoryForPackage: 'stx:libjava') asFilename
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1850
						/ 'tests') exists
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1851
					ifTrue: [ p pathName ]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1852
					ifFalse:
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1853
					    [ | "Try the environment variable (used by Hudson)" p |
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1854
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1855
					    (p := OperatingSystem getEnvironment: 'LIBJAVA_TESTS') notNil
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1856
						ifTrue: [ p ]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1857
						ifFalse:
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1858
						    [ "No default, trigger an error"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1859
						    self error: 'No tests path specified' ] ] ] ] ] ]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1860
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1861
    "
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1862
	UserPreferences current javaTestsDirectory"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1863
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1864
    "Created: / 07-05-2011 / 17:43:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1865
    "Modified: / 07-05-2011 / 20:21:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1866
    "Modified: / 12-05-2011 / 15:54:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1867
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1868
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1869
!UserPreferences methodsFor:'accessing-java-devel'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1870
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1871
javaTestsDirectory: aStringOrFilename
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1872
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1873
    self at:#javaTestsDirectory put: aStringOrFilename asString.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1874
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1875
    "Created: / 07-05-2011 / 17:45:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1876
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1877
826
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
  1878
!WordArray class methodsFor:'testing'!
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
  1879
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
  1880
isInterface
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
  1881
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
  1882
    ^false
db53b9c842d7 - TestletTestCaseProxy: debugging support improved.
vranyj1
parents: 774
diff changeset
  1883
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1884
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1885
!WordArray class methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1886
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1887
isJavaArrayClass
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1888
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1889
    ^true
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1890
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1891
    "Created: / 20-12-2010 / 22:47:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1892
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1893
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1894
!WordArray class methodsFor:'queries'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1895
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1896
isJavaReferenceType
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1897
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1898
    "Java arrays are reference types"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1899
    ^true
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1900
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1901
    "Created: / 20-12-2010 / 22:30:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1902
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1903
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1904
!WordArray class methodsFor:'accessing-java'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1905
905
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1906
javaArrayClass
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1907
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1908
    ^JavaArray javaArrayClassFor: WordArray
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1909
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1910
    "Created: / 11-06-2011 / 23:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1911
    "Modified: / 10-08-2011 / 22:46:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1912
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1913
905
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1914
!WordArray class methodsFor:'accessing-java'!
d03d9e05c581 Temporary commit. method resolving fixed
vranyj1
parents: 901
diff changeset
  1915
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1916
javaComponentClass
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1917
1159
afe8ab363ca3 Mainly fixes:
vranyj1
parents: 1151
diff changeset
  1918
    ^JavaShort
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1919
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1920
    "Created: / 20-12-2010 / 22:13:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1921
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1922
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1923
!WordArray class methodsFor:'accessing'!
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1924
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1925
javaName
1225
30600ca8173c ok now we enabled permissions and groovy maybe does not work :/
hlopkmar
parents: 1209
diff changeset
  1926
    ^ '[S'.
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1927
1225
30600ca8173c ok now we enabled permissions and groovy maybe does not work :/
hlopkmar
parents: 1209
diff changeset
  1928
    "Modified: / 06-12-2011 / 16:43:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
752
ff7bc6428c9c branch jk_new_structure resurrected
vranyj1
parents:
diff changeset
  1929
! !
1609
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1930
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1931
!WrappedMethod methodsFor:'accessing'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1932
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1933
descriptor
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1934
    "Returns descriptor object (for wrapped Java methods)"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1935
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1936
    | orig |
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1937
    orig := self originalMethod.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1938
    ^(orig respondsTo: #descriptor) ifTrue:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1939
        orig descriptor
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1940
    ] ifFalse:[
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1941
        self doesNotUnderstand: (Message selector: #descriptor)
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1942
    ]
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1943
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1944
    "Created: / 16-12-2011 / 20:03:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1945
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1946
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1947
!WrappedMethod methodsFor:'queries'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1948
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1949
isAbstract
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1950
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1951
    ^self originalMethod isAbstract.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1952
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1953
    "Created: / 04-12-2011 / 11:24:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1954
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1955
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1956
!ZipArchive methodsFor:'reading - java support'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1957
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1958
nextBytes: bytesToRead of: zmember startingAt: pos into: b startingAt: off
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1959
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1960
    file position0Based: zmember fileStart + startOfArchive + pos.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1961
    ^ file nextBytes: bytesToRead into: b startingAt: off.
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1962
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1963
    "Created: / 01-05-2011 / 16:21:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1964
! !
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1965
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1966
!stx_libjava class methodsFor:'documentation'!
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1967
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1968
extensionsVersion_SVN
7a2627788ad7 - JavaMirror: fixed method/constructor reflection for classes loaded by other than system/primordial classloader.
vranyj1
parents: 1598
diff changeset
  1969
    ^ '$Id::                                                                                                                        $'
1692
561d5ac3f2df - JavaVM - some OpenJDK 7 support
vranyj1
parents: 1691
diff changeset
  1970
! !