JavaRootBundle.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sat, 19 Jan 2013 23:19:12 +0000
branchrefactoring-vmdata
changeset 1985 7c5a14d663ba
parent 1953 1e42ad3fc322
permissions -rw-r--r--
Temporary commit. JavaNativeMethod refactored to use new-style native methods. Java VM does not boot at this point.

"
 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' }"

JavaCodeBundle subclass:#JavaRootBundle
	instanceVariableNames:'release environment packages user'
	classVariableNames:''
	poolDictionaries:''
	category:'Languages-Java-Support-Libraries'
!

JavaCodeBundle subclass:#EnvironmentBundle
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	privateIn:JavaRootBundle
!

JavaCodeBundle subclass:#PackagesBundle
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	privateIn:JavaRootBundle
!

!JavaRootBundle 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

"
!

documentation
"
    A top-level bundle representing all accessible Java code

    [author:]
        Jan Vrany <jan.vrany@fit.cvut.cz>

    [instance variables:]

    [class variables:]

    [see also:]

"
! !

!JavaRootBundle methodsFor:'accessing'!

libraries
    {
        self release.
        environment.
        packages.
        user.
    }

    "Created: / 15-01-2013 / 17:50:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 16-01-2013 / 12:42:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

name
    ^ name ? '<root>'

    "Created: / 15-01-2013 / 17:50:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

release
    ^Java release codeBundle

    "Modified: / 15-01-2013 / 17:59:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!JavaRootBundle methodsFor:'adding & removing'!

add: libraryOrBundle

    self shouldNotImplement

    "Created: / 15-01-2013 / 17:31:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

remove: libraryOrBundle

    self shouldNotImplement

    "Created: / 15-01-2013 / 17:31:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!JavaRootBundle methodsFor:'generating'!

classPathOn:aStream
    "superclass JavaCodeLibraryOrBundle says that I am responsible to implement this method"

    self release classPathOn: aStream.
    environment classPathOn: aStream.
    packages classPathOn: aStream.
    user classPathOn: aStream.

    "Created: / 15-01-2013 / 17:51:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 16-01-2013 / 12:42:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

sourcePathOn:aStream
    "superclass JavaCodeLibraryOrBundle says that I am responsible to implement this method"

    self release sourcePathOn: aStream.
    environment sourcePathOn: aStream.
    packages sourcePathOn: aStream.
    user sourcePathOn: aStream.

    "Created: / 15-01-2013 / 17:51:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 16-01-2013 / 12:42:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!JavaRootBundle methodsFor:'initialization'!

initialize
    "Invoked when a new instance is created."

    "/ please change as required (and remove this comment)
    libraries := nil.
    environment := EnvironmentBundle new name:'CLASSPATH'.
    packages := PackagesBundle new name:'Package libraries'.
    user := JavaCodeBundle new name:'User libraries'.


    "/ super initialize.   -- commented since inherited method does nothing

    "Created: / 15-01-2013 / 17:49:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 16-01-2013 / 13:29:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!JavaRootBundle::EnvironmentBundle class methodsFor:'documentation'!

documentation
"
    A special 'dynamic' code bundle to represent java code paths
    specified in CLASSPATH environment variable.

    [author:]
        Jan Vrany <jan.vrany@fit.cvut.cz>

    [instance variables:]

    [class variables:]

    [see also:]

"
! !

!JavaRootBundle::EnvironmentBundle methodsFor:'adding & removing'!

add: libraryOrBundle

    self shouldNotImplement

    "Created: / 15-01-2013 / 17:31:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

remove: libraryOrBundle

    self shouldNotImplement

    "Created: / 15-01-2013 / 17:31:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!JavaRootBundle::PackagesBundle class methodsFor:'documentation'!

documentation
"
    A special 'dynamic' code bundle to represent all bundles
    provided by individual packages.

    [author:]
        Jan Vrany <jan.vrany@fit.cvut.cz>

    [instance variables:]

    [class variables:]

    [see also:]

"
! !

!JavaRootBundle::PackagesBundle methodsFor:'accessing'!

libraries

    ^ProjectDefinition allSubclasses collect:[:e|e javaBundle] thenSelect:[:e|e notNil].

    "
    Java::PackagesBundle new libraries
    "

    "Created: / 15-01-2013 / 17:34:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!JavaRootBundle::PackagesBundle methodsFor:'adding & removing'!

add: libraryOrBundle

    self shouldNotImplement

    "Created: / 15-01-2013 / 17:31:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

remove: libraryOrBundle

    self shouldNotImplement

    "Created: / 15-01-2013 / 17:31:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!JavaRootBundle class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !