java.lang.Object | |
↳ | sun.tools.java.Package |
This class is used to represent the classes in a package. WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a package given a class path, and package name.
| |||||||||||
Create a package given a source path, binary path, and package
name.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Check if a class is defined in this package.
| |||||||||||
Check if the package exists
| |||||||||||
Get the .class file of a class
| |||||||||||
Get the .java file of a class
| |||||||||||
Returns a string representation of the object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Create a package given a class path, and package name.
IOException |
---|
Create a package given a source path, binary path, and package name.
IOException |
---|
Check if a class is defined in this package. (If it is an inner class name, it is assumed to exist only if its binary file exists. This is somewhat pessimistic.)
Check if the package exists
Returns a string representation of the object. In general, the
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())