|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.inxar.hotswap.ProxyCompiler
The ProxyCompiler
mediates sourcefile compilation.
| |
|
Field Summary | |
static int |
COMPILE_FAILURE
int compile return code signifying that a
compilation was attempted and NOT completed successfully. |
static int |
COMPILE_SUCCESS
int compile return code signifying that a
compilation was attempted and completed successfully. |
static int |
COMPILE_UNKNOWN
int compile return code signifying the outcome of
a compilation could not be determined. |
static int |
STATUS_COMPILE
int getStatus return code signifying the classfile
is out of date and needs to be recompiled. |
static int |
STATUS_CURRENT
int getStatus return code signifying that a
the Class object in memory is up to date. |
static int |
STATUS_ERROR
int getStatus return code signifying that the
class needs to be loaded, but no classfile or sourcefile could
be found. |
static int |
STATUS_LOAD
int getStatus return code signifying that the
object in memory is out of date with the classfile, it needs to
be reloaded from the classfile. |
static int |
STATUS_UNKNOWN
int getStatus return code signifying that a the
status could not be determined. |
static int |
STATUS_WARN
int getStatus return code signifying that no
classfile or sourcefile could be found EVEN though the object
was previously loaded into memory (suggesting that both the
classfile and sourcefile were subsequently deleted). |
Method Summary | |
void |
addCompileListener(ProxyEventListener l)
Adds the given listener of ProxyCompileEvent
notifications. |
abstract ProxyCompileEvent |
compile(ProxyClass cls)
Compiles the class associated with the given ProxyClass . |
ProxyResource |
getClassfile(ProxyClass cls)
Returns the classfile ProxyResource for this
ProxyClass . |
List |
getClasspath()
Returns the List of the classpath entries. |
String |
getDestinationpath()
Sets the pathname where the class files should be written (and read from). |
List |
getOptions()
Returns the List of the option entries. |
ProxyResource |
getSourcefile(ProxyClass cls)
Returns the sourcefile ProxyResource for this
ProxyClass . |
Object |
getSourcepath()
Returns the location where the source files packages are located. |
int |
getStatus(ProxyClass proxyClass)
Returns the status of ProxyClass as one of the
STATUS_XXX constants in this class. |
boolean |
initialize(Properties p)
Initializes the ProxyCompiler instance from the
given Properties . |
void |
queue_notify(Object callback)
Asynchronous callback method that is invoked by the priority queue thread. |
void |
removeCompileListener(ProxyEventListener l)
Removes the given listener of ProxyCompileEvent
notifications. |
void |
setDestinationpath(String dst)
Returns the pathname where the compiled classes will be written. |
void |
setProxyClassLoader(ProxyClassLoader loader)
Sets the parent ProxyClassLoader . |
void |
setSourcepath(Object sourcepath)
Sets the Object where the source files packages
are located. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int STATUS_CURRENT
int getStatus
return code signifying that a
the Class object in memory is up to date.public static final int STATUS_LOAD
int getStatus
return code signifying that the
object in memory is out of date with the classfile, it needs to
be reloaded from the classfile.public static final int STATUS_COMPILE
int getStatus
return code signifying the classfile
is out of date and needs to be recompiled. Also returned when
a sourcefile exists but no classfile has yet been compiled.public static final int STATUS_WARN
int getStatus
return code signifying that no
classfile or sourcefile could be found EVEN though the object
was previously loaded into memory (suggesting that both the
classfile and sourcefile were subsequently deleted).public static final int STATUS_ERROR
int getStatus
return code signifying that the
class needs to be loaded, but no classfile or sourcefile could
be found.public static final int STATUS_UNKNOWN
int getStatus
return code signifying that a the
status could not be determined.public static final int COMPILE_SUCCESS
int compile
return code signifying that a
compilation was attempted and completed successfully.public static final int COMPILE_FAILURE
int compile
return code signifying that a
compilation was attempted and NOT completed successfully.public static final int COMPILE_UNKNOWN
int compile
return code signifying the outcome of
a compilation could not be determined.Method Detail |
public abstract ProxyCompileEvent compile(ProxyClass cls)
ProxyClass
.public void queue_notify(Object callback)
queue_notify
in interface org.inxar.hotswap.PriorityQueue.Listener
public void setProxyClassLoader(ProxyClassLoader loader)
ProxyClassLoader
. This must be
set directly after instantiation of the
ProxyCompiler
.public boolean initialize(Properties p)
ProxyCompiler
instance from the
given Properties
. If initialization was
unsuccessful, return false
.public void setSourcepath(Object sourcepath)
Object
where the source files packages
are located. The run-time type of this Object
may
be a String
or File
(may add
URL
later).public Object getSourcepath()
public void setDestinationpath(String dst)
public String getDestinationpath()
public List getOptions()
List
of the option entries. Users
should interact with the List
directly to add
Object
instances whose toString()
method will render appropriately. Each entry is printed as-is,
no dashes are added by the compiler.public List getClasspath()
List
of the classpath entries. Users
should interact with the List
directly to add
Object
instances whose toString()
method will render appropriately.public void addCompileListener(ProxyEventListener l)
ProxyCompileEvent
notifications.public void removeCompileListener(ProxyEventListener l)
ProxyCompileEvent
notifications.public ProxyResource getSourcefile(ProxyClass cls)
ProxyResource
for this
ProxyClass
.public ProxyResource getClassfile(ProxyClass cls)
ProxyResource
for this
ProxyClass
.public int getStatus(ProxyClass proxyClass)
ProxyClass
as one of the
STATUS_XXX
constants in this class.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |