JavaBehavior.st
branchdevelopment
changeset 2915 ac252847cc04
parent 2914 1f4c3054998c
child 2916 3d8a63dbf6dd
equal deleted inserted replaced
2914:1f4c3054998c 2915:ac252847cc04
   318     "Return true, if the receiver implements java.lang.Cloneable,
   318     "Return true, if the receiver implements java.lang.Cloneable,
   319      i.e., if it can be cloned using Object#clone()"
   319      i.e., if it can be cloned using Object#clone()"
   320 
   320 
   321     (accessFlags bitAnd:ACX_CLONEABLE) ~~ 0 ifTrue:[ ^ true ].
   321     (accessFlags bitAnd:ACX_CLONEABLE) ~~ 0 ifTrue:[ ^ true ].
   322     interfaces isEmptyOrNil ifTrue:[ ^ false ].
   322     interfaces isEmptyOrNil ifTrue:[ ^ false ].
   323     interfaces anElement isJavaClassRef ifTrue:[
   323 "/    interfaces anElement isJavaClassRef ifTrue:[
   324         self interfaces do:[:interface | 
   324         self interfaces do:[:interface | 
   325             interface isCloneable ifTrue:[
   325             interface isCloneable ifTrue:[
   326                 "/ Cache the information here so subsequent call
   326                 "/ Cache the information here so subsequent call
   327                 "/ call to clone() can make use of fast flag-check
   327                 "/ call to clone() can make use of fast flag-check
   328                 accessFlags := accessFlags bitOr:ACX_CLONEABLE.
   328                 accessFlags := accessFlags bitOr:ACX_CLONEABLE.
   329                 ^ true.
   329                 ^ true.
   330             ].
   330             ].
   331         ]
   331         ].
   332     ].
   332 "/    ].
   333     ^ false.
   333     ^ false.
   334 
   334 
   335     "Created: / 12-11-2013 / 00:33:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   335     "Created: / 12-11-2013 / 00:33:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   336     "Modified: / 12-11-2013 / 02:09:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   336 !
   337 !
   337 
   338 
   338 isEnum
   339 isEnum
   339     "return true, if the receiver is an interface"
   340     "return true, if the receiver is an interface"
   340 
   341