src/JavaClass.st
branchjk_new_structure
changeset 1483 3488eebbc835
parent 1481 28b926d3cdb5
child 1495 e661836af8e6
equal deleted inserted replaced
1482:5cabc4726dff 1483:3488eebbc835
   736     "
   736     "
   737 
   737 
   738     "Created: / 30-11-2010 / 12:17:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   738     "Created: / 30-11-2010 / 12:17:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   739 !
   739 !
   740 
   740 
       
   741 javaWrapperClass
       
   742 
       
   743     fullName == #'java/lang/String' ifTrue:[ ^ String ].
       
   744     self error:'Should not happen'
       
   745 
       
   746     "Created: / 20-04-2012 / 20:03:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   747 !
       
   748 
   741 lastName
   749 lastName
   742     ^ fullName copyFrom:(fullName lastIndexOf:$/)+1
   750     ^ fullName copyFrom:(fullName lastIndexOf:$/)+1
   743 
   751 
   744     "Created: / 5.11.1998 / 19:16:00 / cg"
   752     "Created: / 5.11.1998 / 19:16:00 / cg"
   745 !
   753 !
   760 
   768 
   761     "Created: 20.1.1997 / 13:05:30 / cg"
   769     "Created: 20.1.1997 / 13:05:30 / cg"
   762 !
   770 !
   763 
   771 
   764 nameWithoutPrefix
   772 nameWithoutPrefix
   765     ^ fullName
   773     ^ self lastName
   766 
   774 
   767     "Created: 20.1.1997 / 13:06:06 / cg"
   775     "Created: / 20-01-1997 / 13:06:06 / cg"
       
   776     "Modified: / 20-04-2012 / 18:35:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   768 !
   777 !
   769 
   778 
   770 package
   779 package
   771     "the package (as seen by a smalltalk programmer)
   780     "the package (as seen by a smalltalk programmer)
   772      extract from the fullName, (with '/'s) and prepend 'java:'"
   781      extract from the fullName, (with '/'s) and prepend 'java:'"
  1793     "Created: / 15-04-1996 / 16:42:52 / cg"
  1802     "Created: / 15-04-1996 / 16:42:52 / cg"
  1794     "Modified: / 04-04-2012 / 01:18:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1803     "Modified: / 04-04-2012 / 01:18:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1795 !
  1804 !
  1796 
  1805 
  1797 addSelector:newSelector withMethod:newMethod
  1806 addSelector:newSelector withMethod:newMethod
  1798     "redefined to not flush smalltalk caches and send NO smalltalk-class
  1807 
  1799      change notification. Will eventually flush Java caches."
  1808     ^super addSelector:newSelector withMethod:newMethod
  1800 
  1809 
  1801     |nargs oldMethod|
  1810 "/    "redefined to not flush smalltalk caches and send NO smalltalk-class
  1802 
  1811 "/     change notification. Will eventually flush Java caches."
  1803     oldMethod := self compiledMethodAt:newSelector.
  1812 "/
  1804     (self primAddSelector:newSelector withMethod:newMethod) ifFalse:[^ false].
  1813 "/    |nargs oldMethod|
  1805 
  1814 "/
  1806     ^ true
  1815 "/    oldMethod := self compiledMethodAt:newSelector.
  1807 
  1816 "/    (self primAddSelector:newSelector withMethod:newMethod) ifFalse:[^ false].
  1808     "Created: 20.1.1997 / 13:00:48 / cg"
  1817 "/
       
  1818 "/    ^ true
       
  1819 "/
       
  1820 "/
       
  1821 
       
  1822     "Created: / 20-01-1997 / 13:00:48 / cg"
       
  1823     "Modified: / 20-04-2012 / 20:27:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1809 !
  1824 !
  1810 
  1825 
  1811 setAccessFlags:flags
  1826 setAccessFlags:flags
  1812     accessFlags := flags.
  1827     accessFlags := flags.
  1813 
  1828