| |
|
| java.lang.Object instantj.compile.Source
Source | public class Source (Code) | | This type wrapps for Java source. It consists of the
class' name and the source
author: Nils Meier |
Source | public Source(String source)(Code) | | Constructor - you have to make sure that the
name matches the definition of your class in source
(same as with compiling your file-based source)
Parameters: source - the source |
Source | public Source(InputStream source)(Code) | | Constructor - you have to make sure that the
name matches the definition of your class in source
(same as with compiling your file-based source)
Parameters: source - the source |
getClassName | public String getClassName()(Code) | | Returns the fully qualified name of the main (public) class
in this Source
|
getInputStream | public InputStream getInputStream()(Code) | | Getter for the input stream
the source |
getName | public String getName()(Code) | | Getter for the name-attribute - this name corresponds
to a filename that is passed to javac. There has to be
exactly one public type in the source corresponding to
this name.
This name is derived automatically from the source
but you can set it explicitly through setName() if
necessary (e.g. you don't have a public class in your
source or your source-encoding wasn't recognized
by the name-sniffer).
Note: the automatically sniffed name is available
after the header of the class-declaration has been
read from the InputStream (which is early enough for
javac).
|
getPackage | public String getPackage()(Code) | | Getter for package-attribute - the package name
is derived automatically from the source but you
can set it explicitly through setPackage() if
necessary
See Also: Source.getName Parameters: set - |
setPackage | public void setPackage(String set)(Code) | | Accessor - name
See Also: Source#getPackage()() |
|
|
|