- stx_libjava
changed:
#classNamesAndAttributes
#extensionMethodNames
#preRequisites
- JavaVM
added: #_stx_libjava_ClassLoader_findClassS:
variable renamed in: #initialize
- extensions
...
--- a/src/JavaExamples.st Mon Jul 30 20:05:21 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,232 +0,0 @@
-"
- COPYRIGHT (c) 1996-2011 by Claus Gittinger
-
- New code and modifications done at SWING Research Group [1]:
-
- COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
- SWING Research Group, Czech Technical University in Prague
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice. This software may not
- be provided or otherwise made available to, or used by, any
- other person. No title to or ownership of the software is
- hereby transferred.
-
- [1] Code written at SWING Research Group contains a signature
- of one of the above copright owners. For exact set of such code,
- see the differences between this version and version stx:libjava
- as of 1.9.2010
-"
-"{ Package: 'stx:libjava' }"
-
-Object subclass:#JavaExamples
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- category:'Languages-Java-Utilities'
-!
-
-Object subclass:#CDDatabaseParser
- instanceVariableNames:'index title artist tag'
- classVariableNames:''
- poolDictionaries:''
- privateIn:JavaExamples
-!
-
-!JavaExamples class methodsFor:'documentation'!
-
-copyright
-"
- COPYRIGHT (c) 1996-2011 by Claus Gittinger
-
- New code and modifications done at SWING Research Group [1]:
-
- COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
- SWING Research Group, Czech Technical University in Prague
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice. This software may not
- be provided or otherwise made available to, or used by, any
- other person. No title to or ownership of the software is
- hereby transferred.
-
- [1] Code written at SWING Research Group contains a signature
- of one of the above copright owners. For exact set of such code,
- see the differences between this version and version stx:libjava
- as of 1.9.2010
-
-"
-! !
-
-!JavaExamples class methodsFor:'examples'!
-
-example_1
- "A CD .xml parsing example. The parser raises a UserNotification
- whenever it parses a CD, it raises a UserNotification. The notification
- is then handled and printed. Demonstrates:
- - proxy creation
- - exception handling
-
- cd.xml may look like:
-
- <?xml version='1.0' encoding='ISO-8859-1'?>
- <catalog>
- <cd>
- <title>Empire Burlesque</title>
- <artist>Bob Dylan</artist>
- <country>USA</country>
- <company>Columbia</company>
- <price>10.90</price>
- <year>1985</year>
- </cd>
- </catalog>
-
-
-
- "
-
- | factory parser |
-
- factory := JAVA javax xml parsers SAXParserFactory newInstance.
- parser := factory newSAXParser getXMLReader.
- parser setContentHandler: JavaExamples::CDDatabaseParser new.
- [
- parser parse: '/home/jv/Projects/libjava/demo/saxon/cd.xml'.
- ] on: JAVA java io IOException do:[:ioe|
- Transcript showCR: 'I/O error: ', ioe getMessage.
- ioe printStackTrace
- ] on: UserNotification do:[:un|
- Transcript showCR: un messageText.
- un proceed.
- ]
-
- "Created: / 13-05-2012 / 18:27:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaExamples::CDDatabaseParser class methodsFor:'documentation'!
-
-documentation
-"
- A simple XML CD database parser - a demonstration
- of stx:libjava capabilities. See JavaExamples>>example_1
-
- [author:]
- Jan Vrany <jan.vrany@fit.cvut.cz>
-
- [instance variables:]
-
- [class variables:]
-
- [see also:]
-
-"
-! !
-
-!JavaExamples::CDDatabaseParser class methodsFor:'initialization'!
-
-initialize
-
- self lookupObject: JavaLookup instance
-
- "Created: / 13-05-2012 / 17:24:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-
-!JavaExamples::CDDatabaseParser methodsFor:'SAX2 interface'!
-
-characters: string offset: off length: len
-
- tag = 'title' ifTrue:[
- title := string copyFrom: off + 1 to: off + len.
- tag := nil.
- ].
- tag = 'artist' ifTrue:[
- artist := string copyFrom: off + 1 to: off + len.
- tag := nil.
- ].
-
- "Created: / 13-05-2012 / 17:27:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-endDocument
-
- "Created: / 16-04-2005 / 12:28:31 / janfrog"
-!
-
-endDocumentFragment
-
- "Created: / 10-08-2007 / 09:22:12 / janfrog"
-!
-
-endElement:namespace localName:localName qName:qName
-
-
- qName = 'cd' ifTrue:[
- index := index + 1.
- UserNotification notify:
- (index printString , '. ', title , ' - ' , artist)
- ]
-
- "Created: / 13-05-2012 / 17:38:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-endPrefixMapping:prefix
-
- "Created: / 16-04-2005 / 12:29:45 / janfrog"
-!
-
-ignorableWhitespace:aString
-
- "Created: / 16-04-2005 / 12:30:04 / janfrog"
-!
-
-processingInstruction:target data:data
-
- "Created: / 16-04-2005 / 12:31:04 / janfrog"
-!
-
-setDocumentLocator:aLocator
-
- "Created: / 16-04-2005 / 12:30:37 / janfrog"
- "Modified: / 13-05-2012 / 17:26:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-skippedEnrity:aString
-
- "Created: / 16-04-2005 / 12:31:18 / janfrog"
-!
-
-startDocument
-
- index := 0
-
- "Created: / 16-04-2005 / 12:31:25 / janfrog"
- "Modified: / 13-05-2012 / 17:30:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-startDocumentFragment
-
- "Created: / 10-08-2007 / 09:22:07 / janfrog"
-!
-
-startElement:namespace localName:localName qName:qName attributes:attributes
-
- tag := qName.
-
- "Created: / 13-05-2012 / 17:37:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-startPrefix:prefix mappingTo:uri
-
- "Created: / 17-04-2005 / 08:47:18 / janfrog"
-! !
-
-!JavaExamples class methodsFor:'documentation'!
-
-version_SVN
- ^ '$Id:: $'
-! !
-
-JavaExamples::CDDatabaseParser initialize!
--- a/src/JavaVM.st Mon Jul 30 20:05:21 2012 +0000
+++ b/src/JavaVM.st Mon Jul 30 22:42:57 2012 +0000
@@ -1354,7 +1354,7 @@
"/ NoAudio := false.
- JavaConsoleStream := Transcript.
+ JavaConsoleStream := "Transcript"Stdout.
FullExceptionTrace := StackTrace := false.
WindowOPTrace := DrawOPTrace := EventTrace := ThreadTrace := false.
MonitorTrace := ExceptionTrace := FileOpenTrace := FileIOTrace := false.
@@ -1409,7 +1409,7 @@
"Modified: / 02-12-1998 / 23:02:22 / cg"
"Modified: / 09-10-2011 / 20:29:10 / Marcel Hlopko <hlopik@gmail.com>"
"Modified: / 08-12-2011 / 21:06:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 24-07-2012 / 02:10:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 30-07-2012 / 23:05:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
initializeAdditionalJavaProtocol
@@ -16242,6 +16242,29 @@
"Modified: / 27.1.1999 / 20:36:11 / cg"
! !
+!JavaVM class methodsFor:'native - stx.libjava'!
+
+_stx_libjava_ClassLoader_findClassS: nativeContext
+
+ <javanative: 'stx/libjava/ClassLoader' name: 'findCla'>
+
+ | nm cls |
+ nm := Java as_ST_String: (nativeContext argAt: 1).
+ (nm startsWith: 'SMALLTALK.') ifFalse:[
+ self throwClassNotFoundException: ('No such smalltalk class (%1)' bindWith: nm).
+ ^self
+ ].
+ nm := nm copyFrom: 'SMALLTALK.' size + 1.
+ cls := Smalltalk at: nm asSymbol.
+ cls isNil ifTrue:[
+ self throwClassNotFoundException: ('No such smalltalk class (%1)' bindWith: nm).
+ ^self
+ ].
+ ^Reflection javaClassObjectForClass: cls.
+
+ "Modified: / 30-07-2012 / 23:19:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!JavaVM class methodsFor:'native - stx.libjava.groovy'!
_stx_libjava_groovy_GroovyClassLoader_SystemClassCollector_getDefiningClassLoader: nativeContext
--- a/src/abbrev.stc Mon Jul 30 20:05:21 2012 +0000
+++ b/src/abbrev.stc Mon Jul 30 22:42:57 2012 +0000
@@ -135,7 +135,6 @@
JavaCompiler_Eclipse JavaCompiler_Eclipse stx:libjava 'Languages-Java-Tools-Eclipse' 0
JavaMetaclass JavaMetaclass stx:libjava 'Languages-Java-Classes' 0
GroovyMetaclass GroovyMetaclass stx:libjava 'Languages-Groovy-Classes' 0
-JavaExamples JavaExamples stx:libjava 'Languages-Java-Utilities' 0
JavaClassReaderTests JavaClassReaderTests stx:libjava 'Languages-Java-Tests-RuntimeConstantPool' 1
JavaRefsAndConstantPoolTestCase JavaRefsAndConstantPoolTestCase stx:libjava 'Languages-Java-Tests-RuntimeConstantPool' 1
JavaNioSupport JavaNioSupport stx:libjava 'Languages-Java-Support-Native' 0
--- a/src/libjava.rc Mon Jul 30 20:05:21 2012 +0000
+++ b/src/libjava.rc Mon Jul 30 22:42:57 2012 +0000
@@ -25,7 +25,7 @@
VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\nCopyright Jan Vrany, Jan Kurs and Marcel Hlopko\b SWING Research Group, Czech Technical University In Prague\0"
VALUE "ProductName", "Smalltalk/X\0"
VALUE "ProductVersion", "6.2.2.1\0"
- VALUE "ProductDate", "Mon, 30 Jul 2012 19:26:32 GMT\0"
+ VALUE "ProductDate", "Mon, 30 Jul 2012 22:47:31 GMT\0"
END
END
--- a/src/stx_libjava.st Mon Jul 30 20:05:21 2012 +0000
+++ b/src/stx_libjava.st Mon Jul 30 22:42:57 2012 +0000
@@ -155,17 +155,17 @@
exclude individual packages in the #excludedFromPrerequisites method."
^ #(
- #'stx:goodies/sunit' "TestResource - superclass of JavaAntProjectResource "
- #'stx:libbasic' "Lookup - superclass of JavaLookup::Java2Smalltalk "
- #'stx:libbasic2' "BitArray - superclass of extended BooleanArray "
- #'stx:libbasic3' "WrappedMethod - extended "
- #'stx:libcomp' "ConstantNode - referenced by ProxyMethodCompiler>>argsArray "
+ #'stx:goodies/sunit' "TestCase - superclass of JavaByteCodeProcessorTests "
+ #'stx:libbasic' "LimitedPrecisionReal - superclass of extended ShortFloat "
+ #'stx:libbasic2' "UnboxedIntegerArray - superclass of extended SignedWordArray "
+ #'stx:libbasic3' "MessageTracer - referenced by JavaMethod>>setBreakPoint "
+ #'stx:libcomp' "Parser - referenced by GroovyCompiler>>error:line:from:to: "
#'stx:libhtml' "URL - referenced by JavaEmbeddedFrameView>>setupAppletFrameIn:initializeJava: "
- #'stx:libtool' "WorkspaceApplication - referenced by GroovyEvaluator>>evaluate:in:receiver:notifying:logged:ifFail: "
- #'stx:libview' "PopUpView - superclass of JavaPopUpView "
- #'stx:libview2' "Plug - referenced by JavaSourceCodeCache>>findMethodLine:inMethods: "
- #'stx:libwidg' "SelectionInList - referenced by JavaVM class>>_WListPeer_create: "
- #'stx:libwidg2' "CheckBox - referenced by JavaVM class>>_WCheckboxPeer_create: "
+ #'stx:libtool' "DebugView - referenced by Java class>>flushClasses "
+ #'stx:libview' "DisplaySurface - superclass of JavaView "
+ #'stx:libview2' "GIFReader - referenced by JavaVM class>>_GifImageDecoder_parseImage: "
+ #'stx:libwidg' "ScrollableView - referenced by JavaVM class>>_MComponentPeer_pSetForeground: "
+ #'stx:libwidg2' "ComboBoxView - referenced by JavaVM class>>processEvent: "
)
! !
@@ -386,7 +386,6 @@
#'JavaCompiler_Eclipse'
JavaMetaclass
GroovyMetaclass
- (JavaExamples autoload)
(JavaClassReaderTests autoload)
(JavaRefsAndConstantPoolTestCase autoload)
JavaNioSupport
@@ -622,7 +621,7 @@
"Return a SVN revision number of myself.
This number is updated after a commit"
- ^ "$SVN-Revision:"'1914 '"$"
+ ^ "$SVN-Revision:"'1926 '"$"
! !
!stx_libjava class methodsFor:'file generation'!