Class BPackage


  • public class BPackage
    extends java.lang.Object
    A wrapper for a single package of a BlueJ project. This represents an open package, and functions relating to that package.
    Author:
    Clive Miller, University of Kent at Canterbury, 2002, Damiano Bolla, University of Kent at Canterbury, 2003
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void compile​(boolean waitCompileEnd)
      Compiles all modified files of this package.
      void compileAll​(boolean waitCompileEnd)
      Compiles all files of this package.
      BClass getBClass​(java.lang.String name)
      Returns the class with the given name in this package.
      BClass[] getClasses()
      Returns an array containing all the classes in this package.
      BClass[] getCurrentClasses()
      Returns the currently selected classes in this Package.
      BObject[] getCurrentObjects()
      Returns the currently selected objects in the object bench.
      java.io.File getDir()
      Returns the directory where this package is stored.
      java.lang.String getName()
      Returns the name of the package.
      BObject getObject​(java.lang.String instanceName)
      Returns a wrapper for the object with the given name on BlueJ's object bench.
      BObject[] getObjects()
      Returns an array of all the Objects on the object bench.
      BProject getProject()
      Returns the package's project.
      javafx.stage.Stage getWindow()
      Returns the package window.
      BClass newClass​(java.lang.String className)
      Creates a new Java class with the given name.
      BClass newClass​(java.lang.String className, SourceType sourceType)
      Creates a new class with the given name for the given type.
      void reload()
      Reloads the entire package.
      void remove()
      Removes this package from BlueJ, including the underlying files.
      void scheduleCompilation​(boolean immediate)
      Schedules a compilation of the package.
      java.lang.String toString()
      Returns a string representation of the package object
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait