JavaBehavior.st
author Claus Gittinger <cg@exept.de>
Fri, 09 Oct 2009 16:04:26 +0200
changeset 2146 f3168634fed6
parent 2139 fa8778186915
child 2151 c0b6570c6f9b
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
722
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
     1
"
2118
b73d5b8e93c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
     2
 COPYRIGHT (c) 2005 by eXept Software AG
b73d5b8e93c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
     3
	      All Rights Reserved
722
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
     4
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
     5
 This software is furnished under a license and may be used
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    10
 hereby transferred.
2118
b73d5b8e93c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    11
"
722
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    12
"{ Package: 'stx:libjava' }"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    13
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    14
Class subclass:#JavaBehavior
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    15
	instanceVariableNames:'constantPool interfaces accessFlags'
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    16
	classVariableNames:'InitialValuePerType A_OBSOLETE A_INTERFACE A_PUBLIC A_FINAL
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    17
		A_ABSTRACT A_INITIALIZED A_SMALLTALK A_ABSTRACT_OR_INTERFACE
2146
f3168634fed6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2139
diff changeset
    18
		A_STATIC A_NATIVE A_SYNTHETIC A_ANNOTATION A_ENUM'
722
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    19
	poolDictionaries:''
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    20
	category:'Languages-Java-Classes'
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    21
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    22
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    23
!JavaBehavior class methodsFor:'documentation'!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    24
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    25
copyright
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    26
"
2118
b73d5b8e93c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    27
 COPYRIGHT (c) 2005 by eXept Software AG
b73d5b8e93c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    28
	      All Rights Reserved
722
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    29
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    30
 This software is furnished under a license and may be used
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    35
 hereby transferred.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    36
"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    37
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    38
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    39
documentation
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    40
"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    41
    Describes what is known and required by the VM.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    42
"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    43
! !
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    44
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    45
!JavaBehavior class methodsFor:'initialization'!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    46
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    47
initialize
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    48
    "/ those are defined in Java and read from the classFile
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    49
    A_PUBLIC      := 16r000001.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    50
    "/ A_PRIVATE     := 16r000002.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    51
    "/ A_PROTECTED   := 16r000004.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    52
    A_STATIC      := 16r000008.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    53
    A_FINAL       := 16r000010.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    54
    "/ A_SUPER         := 16r000020.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    55
    "/ A_SYNCHRONIZED  := 16r000020.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    56
    "/ A_VOLATILE      := 16r000040.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    57
    "/ A_TRANSIENT     := 16r000080.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    58
    A_NATIVE        := 16r000100.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    59
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    60
    A_INTERFACE   := 16r000200.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    61
    A_ABSTRACT    := 16r000400.
2146
f3168634fed6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2139
diff changeset
    62
    A_SYNTHETIC   := 16r001000.   "/ 1.1
f3168634fed6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2139
diff changeset
    63
    A_ANNOTATION  := 16r002000.   "/ 1.1
f3168634fed6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2139
diff changeset
    64
    A_ENUM        := 16r004000.   "/ 1.1
722
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    65
    A_OBSOLETE    := 16r008000.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    66
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    67
    "/ those are local to the ST/X implementation
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    68
    A_INITIALIZED := 16r100000.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    69
    A_SMALLTALK   := 16r200000.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    70
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    71
    A_ABSTRACT_OR_INTERFACE := A_ABSTRACT bitOr:A_INTERFACE.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    72
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    73
    InitialValuePerType := IdentityDictionary new.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    74
    InitialValuePerType at:$B put:0.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    75
    InitialValuePerType at:$C put:0.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    76
    InitialValuePerType at:$D put:0.0.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    77
    InitialValuePerType at:$F put:(0.0 asShortFloat).
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    78
    InitialValuePerType at:$I put:0.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    79
    InitialValuePerType at:$J put:0.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    80
    InitialValuePerType at:$S put:0.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    81
    InitialValuePerType at:$Z put:0.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    82
    InitialValuePerType at:$L put:nil.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    83
    InitialValuePerType at:$[ put:nil.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    84
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    85
    "
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    86
     JavaBehavior initialize
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    87
    "
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    88
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    89
    "Modified: / 13.11.1998 / 14:09:52 / cg"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    90
! !
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    91
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    92
!JavaBehavior class methodsFor:'constants'!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    93
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    94
A_NATIVE
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    95
    ^ A_NATIVE
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    96
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    97
    "Created: / 16.5.1998 / 01:18:43 / cg"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    98
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
    99
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   100
A_PUBLIC
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   101
    ^ A_PUBLIC
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   102
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   103
    "Created: / 13.5.1998 / 13:03:18 / cg"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   104
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   105
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   106
A_STATIC
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   107
    ^ A_STATIC
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   108
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   109
    "Created: / 16.5.1998 / 00:02:07 / cg"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   110
! !
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   111
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   112
!JavaBehavior class methodsFor:'signature parsing'!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   113
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   114
initialValueFromSignature:aSignature
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   115
    "given a signature, return an initializer value"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   116
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   117
    |s|
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   118
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   119
    s := aSignature readStream.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   120
    ^ self initialValueFromStream:s.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   121
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   122
    "
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   123
     JavaBehavior initialValueFromSignature:'LObject;'
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   124
     JavaBehavior initialValueFromSignature:'B'
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   125
     JavaBehavior initialValueFromSignature:'I'
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   126
    "
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   127
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   128
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   129
initialValueFromStream:s
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   130
    "parse a fieldTypeSpec - see java doc"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   131
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   132
    |typeChar|
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   133
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   134
    typeChar := s next.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   135
    ^ InitialValuePerType at:typeChar ifAbsent:nil.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   136
! !
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   137
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   138
!JavaBehavior methodsFor:'accessing'!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   139
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   140
constantPool
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   141
    ^ constantPool
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   142
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   143
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   144
interfaces
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   145
    interfaces notNil ifTrue:[
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   146
	interfaces := interfaces collect:[:clsRef |
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   147
				    clsRef isUnresolved ifTrue:[
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   148
					clsRef preResolve
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   149
				    ] ifFalse:[
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   150
					clsRef
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   151
				    ]
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   152
				 ].
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   153
    ].
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   154
    ^ interfaces
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   155
! !
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   156
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   157
!JavaBehavior methodsFor:'private accessing'!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   158
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   159
makeObsolete
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   160
    accessFlags := accessFlags bitOr:A_OBSOLETE
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   161
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   162
    "Created: 7.8.1997 / 19:04:48 / cg"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   163
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   164
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   165
markUninitialized
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   166
    (accessFlags bitAnd:A_INITIALIZED) ~~ 0 ifTrue:[
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   167
	accessFlags := accessFlags bitXor:A_INITIALIZED
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   168
    ].
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   169
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   170
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   171
setAccessFlags:flags
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   172
    accessFlags := flags.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   173
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   174
    "Created: 15.4.1996 / 16:42:52 / cg"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   175
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   176
2118
b73d5b8e93c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   177
setConstantPool:anArray
b73d5b8e93c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   178
    constantPool := anArray.
722
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   179
2118
b73d5b8e93c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   180
    "Created: 15.4.1996 / 16:42:52 / cg"
722
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   181
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   182
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   183
setInterfaces:i
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   184
    i size > 0 ifTrue:[
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   185
	interfaces := i
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   186
    ] ifFalse:[
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   187
	interfaces := nil
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   188
    ]
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   189
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   190
    "Modified: 7.4.1997 / 15:44:53 / cg"
2139
fa8778186915 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2118
diff changeset
   191
! !
722
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   192
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   193
!JavaBehavior methodsFor:'queries'!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   194
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   195
hasInterface:aJavaInterface
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   196
    "return true, if I respond to all methods as
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   197
     required by the argument, an aJavaInterface"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   198
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   199
    interfaces size > 0 ifTrue:[
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   200
	self interfaces do:[:if |
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   201
	    aJavaInterface == if ifTrue:[
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   202
		^ true
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   203
	    ].
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   204
	]
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   205
    ].
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   206
    superclass isJavaClass ifTrue:[
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   207
	^ superclass hasInterface:aJavaInterface
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   208
    ].
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   209
    ^ false.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   210
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   211
"/    aJavaInterface methodDictionary keysAndValuesDo:[:sel :mthd |
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   212
"/        (self canUnderstand:sel) ifFalse:[
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   213
"/            ^ false.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   214
"/        ]
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   215
"/    ].
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   216
    ^ true
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   217
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   218
    "Modified: / 28.1.1998 / 01:46:16 / cg"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   219
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   220
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   221
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   222
isAbstract
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   223
    "return true, if the receiver is abstract
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   224
     (i.e. may not have instances)"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   225
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   226
    ^ (accessFlags bitAnd:A_ABSTRACT) ~~ 0
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   227
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   228
    "Modified: / 7.5.1998 / 12:24:42 / cg"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   229
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   230
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   231
isFinal
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   232
    "return true, if the receiver is final
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   233
     (i.e. may not be subclassed)"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   234
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   235
    ^ (accessFlags bitAnd:A_FINAL) ~~ 0
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   236
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   237
    "Modified: / 7.5.1998 / 12:24:21 / cg"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   238
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   239
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   240
isInitialized
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   241
    "return true, if the receiver is initialized"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   242
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   243
    ^ (accessFlags bitAnd:A_INITIALIZED) ~~ 0
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   244
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   245
    "Modified: / 7.5.1998 / 12:23:54 / cg"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   246
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   247
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   248
isInterface
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   249
    "return true, if the receiver is an interface"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   250
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   251
    ^ (accessFlags bitAnd:A_INTERFACE) ~~ 0
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   252
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   253
    "Modified: / 7.5.1998 / 12:23:39 / cg"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   254
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   255
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   256
isObsolete
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   257
    "return true, if the receiver is obsolete
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   258
     Java classes are never."
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   259
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   260
    ^ (accessFlags bitAnd:A_OBSOLETE) ~~ 0.
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   261
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   262
    "Modified: 7.8.1997 / 19:04:28 / cg"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   263
!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   264
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   265
isPublic
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   266
    "return true, if the receiver is public"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   267
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   268
    ^ (accessFlags bitAnd:A_PUBLIC) ~~ 0
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   269
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   270
    "Modified: / 7.5.1998 / 12:22:44 / cg"
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   271
! !
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   272
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   273
!JavaBehavior class methodsFor:'documentation'!
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   274
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   275
version
2146
f3168634fed6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2139
diff changeset
   276
    ^ '$Header: /cvs/stx/stx/libjava/JavaBehavior.st,v 1.3 2009-10-09 14:04:26 cg Exp $'
f3168634fed6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2139
diff changeset
   277
!
f3168634fed6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2139
diff changeset
   278
f3168634fed6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2139
diff changeset
   279
version_CVS
f3168634fed6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2139
diff changeset
   280
    ^ '$Header: /cvs/stx/stx/libjava/JavaBehavior.st,v 1.3 2009-10-09 14:04:26 cg Exp $'
722
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   281
! !
a475bcd40673 *** empty log message ***
cg
parents:
diff changeset
   282
2118
b73d5b8e93c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   283
JavaBehavior initialize!