src/JavaClass.st
branchjk_new_structure
changeset 1691 826f8d7dc0df
parent 1687 dd0f09a3f7b9
child 1697 0a9d598a6408
equal deleted inserted replaced
1690:2dbce03c979a 1691:826f8d7dc0df
  1485 initValueFor:instVarName
  1485 initValueFor:instVarName
  1486     |idx field|
  1486     |idx field|
  1487 
  1487 
  1488     idx := fields findFirst:[:field | field name = instVarName].
  1488     idx := fields findFirst:[:field | field name = instVarName].
  1489     idx == 0 ifTrue:[
  1489     idx == 0 ifTrue:[
  1490 	superclass ~~ JavaObject ifTrue:[
  1490         superclass ~~ JavaObject ifTrue:[
  1491 	    ^ superclass initValueFor:instVarName
  1491             ^ superclass initValueFor:instVarName
  1492 	].
  1492         ].
  1493 	self halt
  1493         ^0 "/lockWord"
  1494     ] ifFalse:[
  1494     ] ifFalse:[
  1495 	field := fields at:idx.
  1495         field := fields at:idx.
  1496 	^ field initialValue
  1496         ^ field initialValue
  1497     ].
  1497     ].
       
  1498 
       
  1499     "Modified: / 26-08-2012 / 20:08:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1498 !
  1500 !
  1499 
  1501 
  1500 newCleared
  1502 newCleared
  1501     "create a new cleared JAVA instance.
  1503     "create a new cleared JAVA instance.
  1502      Its instVars are cleared to the corresponding typed values;
  1504      Its instVars are cleared to the corresponding typed values;
  2560 version_SVN
  2562 version_SVN
  2561     ^ '$Id$'
  2563     ^ '$Id$'
  2562 ! !
  2564 ! !
  2563 
  2565 
  2564 JavaClass initialize!
  2566 JavaClass initialize!
       
  2567