JavaBehavior.st
changeset 3419 aa30aeb2ee07
parent 3324 a58245c0e83a
child 3508 622620308fee
equal deleted inserted replaced
3418:3df0a2df585e 3419:aa30aeb2ee07
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1996-2015 by Claus Gittinger
     4  COPYRIGHT (c) 1996-2015 by Claus Gittinger
     3 
     5 
     4  New code and modifications done at SWING Research Group [1]:
     6  New code and modifications done at SWING Research Group [1]:
     5 
     7 
    17      of one of the above copright owners. For exact set of such code,
    19      of one of the above copright owners. For exact set of such code,
    18      see the differences between this version and version stx:libjava
    20      see the differences between this version and version stx:libjava
    19      as of 1.9.2010
    21      as of 1.9.2010
    20 "
    22 "
    21 "{ Package: 'stx:libjava' }"
    23 "{ Package: 'stx:libjava' }"
       
    24 
       
    25 "{ NameSpace: Smalltalk }"
    22 
    26 
    23 Class subclass:#JavaBehavior
    27 Class subclass:#JavaBehavior
    24 	instanceVariableNames:'constantPool interfaces accessFlags initValues _lockWord_'
    28 	instanceVariableNames:'constantPool interfaces accessFlags initValues _lockWord_'
    25 	classVariableNames:'InitialValuePerType ACX_ABSTRACT_OR_INTERFACE'
    29 	classVariableNames:'InitialValuePerType ACX_ABSTRACT_OR_INTERFACE'
    26 	poolDictionaries:'JavaConstants'
    30 	poolDictionaries:'JavaConstants'
   301 setInterfaces:aCollection
   305 setInterfaces:aCollection
   302     interfaces := aCollection asNilIfEmpty
   306     interfaces := aCollection asNilIfEmpty
   303 
   307 
   304     "Modified: / 07-04-1997 / 15:44:53 / cg"
   308     "Modified: / 07-04-1997 / 15:44:53 / cg"
   305     "Modified: / 05-05-2014 / 09:44:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   309     "Modified: / 05-05-2014 / 09:44:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   310 !
       
   311 
       
   312 setMethodDictionary:dict constantPool:aJavaConstantPool 
       
   313     | methodDictionaryToSet |
       
   314     dict class ~~ MethodDictionary ifTrue:[
       
   315         methodDictionaryToSet := MethodDictionary withAll:dict.
       
   316         methodDictionaryToSet isNil ifTrue:[
       
   317 
       
   318             "/ refuse to do this
       
   319             "/ (can only happen in case of memory allocation trouble,
       
   320             "/  where the allocation failed and some exception handler returned
       
   321             "/  nil ...)
       
   322 
       
   323             self error:'cannot set methodDictionary to nil' mayProceed:true.
       
   324             ^ self.
       
   325         ]
       
   326     ] ifFalse:[
       
   327         methodDictionaryToSet := dict.
       
   328     ].
       
   329     aJavaConstantPool owner:self.
       
   330 
       
   331     "/ Now, set it...
       
   332     methodDictionary := methodDictionaryToSet.
       
   333     constantPool := aJavaConstantPool.
       
   334 
       
   335     "Created: / 01-04-2015 / 16:37:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   306 ! !
   336 ! !
   307 
   337 
   308 !JavaBehavior methodsFor:'queries'!
   338 !JavaBehavior methodsFor:'queries'!
   309 
   339 
   310 hasInterface:aJavaInterface
   340 hasInterface:aJavaInterface