|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbluej.extensions.BPackage
public class BPackage
A wrapper for a single package of a BlueJ project. This represents an open package, and functions relating to that package.
| Method Summary | |
|---|---|
void |
compile(boolean waitCompileEnd)
Compile all modified files of this package. |
void |
compileAll(boolean waitCompileEnd)
Compile 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.awt.Frame |
getFrame()
Returns the package frame. |
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. |
BClass |
newClass(java.lang.String className)
Creates a new Class with the given name. |
void |
reload()
Reloads the entire package. |
void |
remove()
Removes this package from BlueJ, including the underlying files. |
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 |
| Method Detail |
|---|
public void remove()
throws ProjectNotOpenException,
PackageNotFoundException
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.
public BProject getProject()
throws ProjectNotOpenException
ProjectNotOpenException - if the project has been closed by the user.
public java.lang.String getName()
throws ProjectNotOpenException,
PackageNotFoundException
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.
public void reload()
throws ProjectNotOpenException,
PackageNotFoundException
.java file has been added to the package.
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.
public BClass newClass(java.lang.String className)
throws ProjectNotOpenException,
PackageNotFoundException,
MissingJavaFileException
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.
MissingJavaFileException - if the .java file for the new class does not exist.
public java.awt.Frame getFrame()
throws ProjectNotOpenException,
PackageNotFoundException
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.
public BClass getBClass(java.lang.String name)
throws ProjectNotOpenException,
PackageNotFoundException
java.lang.Object.getClass()
name - the simple name of the required class.
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.
public BClass[] getClasses()
throws ProjectNotOpenException,
PackageNotFoundException
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.
public BObject getObject(java.lang.String instanceName)
throws ProjectNotOpenException,
PackageNotFoundException
instanceName - the name of the object as shown on the object bench
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.
public BObject[] getObjects()
throws ProjectNotOpenException,
PackageNotFoundException
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.
public void compile(boolean waitCompileEnd)
throws ProjectNotOpenException,
PackageNotFoundException,
CompilationNotStartedException
waitCompileEnd - true waits for the compilation to be finished.
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.
CompilationNotStartedException - if BlueJ is currently executing Java code.
public void compileAll(boolean waitCompileEnd)
throws ProjectNotOpenException,
PackageNotFoundException,
CompilationNotStartedException
waitCompileEnd - true waits for the compilation to be finished.
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.
CompilationNotStartedException - if BlueJ is currently executing Java code.
public BClass[] getCurrentClasses()
throws ProjectNotOpenException,
PackageNotFoundException
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.
public BObject[] getCurrentObjects()
throws ProjectNotOpenException,
PackageNotFoundException
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.
public java.io.File getDir()
throws ProjectNotOpenException,
PackageNotFoundException
ProjectNotOpenException - if the project this package is part of has been closed by the user.
PackageNotFoundException - if the package has been deleted by the user.public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||