|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.inxar.hotswap.ProxyClass
The ProxyClass
is as a factory for Proxy
instances and holds a reference to a Class
whose
implementation may change during the life of an application.
Method Summary | |
void |
addClassSwapListener(ProxyEventListener l)
Adds the given listener of ProxyClassSwapEvent
notifications. |
void |
addCompileListener(ProxyEventListener l)
Adds the given listener of ProxyCompileEvent
notifications. |
void |
addHotSwapListener(ProxyEventListener l)
Adds the given listener of ProxyHotSwapEvent
notifications. |
ProxyResource |
getClassfile()
Returns the Sourcefile ProxyResource for this
ProxyClass . |
Class |
getClassInstance()
Returns the Class instance that this
ProxyClass contains. |
long |
getLastClassload()
Returns the timestamp of the last successful classload or 0L if no class has been loaded. |
String |
getName()
Returns the name of the class being proxied; equivalent to ProxyClass.getClassInstance().getName() . |
ClassLoader |
getParentClassLoader()
Returns the parent ClassLoader . |
ProxyClassLoader |
getProxyClassLoader()
Returns the parent ProxyClassLoader that created
this ProxyClass . |
ProxyCompiler |
getProxyCompiler()
Returns the ProxyCompiler used by this class. |
ProxyResource |
getSourcefile()
Returns the Sourcefile ProxyResource for this
ProxyClass . |
int |
getStatus()
Returns the status of this ProxyClass as
determined by the ProxyCompiler.getStatus method. |
boolean |
hotswap()
Executes a hotswap transaction. |
boolean |
isJDK13()
Returns true if this method is a
JDK1.3 proxy class. |
abstract Proxy |
newInstance()
JDK1.2 or JDK1.3 Factory method; Creates a new Proxy for this ProxyClass having no
constructor arguments (though arguments can be set later on the
Proxy itself). |
abstract Proxy |
newInstance(Class[] params,
Object[] args)
JDK1.2 or JDK1.3 Factory method; Creates a new Proxy having the given constructor parameters and
arguments. |
abstract Proxy |
newInstance(Object[] args)
JDK1.2 or JDK1.3 Factory method; Creates a new Proxy having the given constructor arguments. |
abstract Proxy |
newInstanceH(Object h)
JDK1.3 Factory method; Creates a new Proxy for
this ProxyClass having no constructor arguments
using the given ProxyInvocationHandler (H) instance. |
abstract Proxy |
newInstanceH(Object h,
Class[] params,
Object[] args)
JDK1.3 Factory method; Creates a new Proxy having
the given constructor parameters and arguments using the given
ProxyInvocationHandler (H) instance. |
abstract Proxy |
newInstanceH(Object h,
Object[] args)
JDK1.3 Factory method; Creates a new Proxy having
the given constructor arguments using the given
ProxyInvocationHandler (H) instance. |
void |
removeClassSwapListener(ProxyEventListener l)
Removes the given listener of ProxyClassSwapEvent
notifications. |
void |
removeCompileListener(ProxyEventListener l)
Removes the given listener of ProxyCompileEvent
notifications. |
void |
removeHotSwapListener(ProxyEventListener l)
Removes the given listener of ProxyHotSwapEvent
notifications. |
void |
setParentClassLoader(ClassLoader parent)
Sets the parent ClassLoader to be used by this
class. |
void |
setProxyCompiler(ProxyCompiler compiler)
Sets the ProxyCompiler to be used by this class. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public abstract Proxy newInstance()
Proxy
for this ProxyClass
having no
constructor arguments (though arguments can be set later on the
Proxy
itself).public abstract Proxy newInstance(Object[] args)
Proxy
having the given constructor arguments. The
parameters are gathered by fetching the Class
for
each argument.public abstract Proxy newInstance(Class[] params, Object[] args)
Proxy
having the given constructor parameters and
arguments.public abstract Proxy newInstanceH(Object h)
Proxy
for
this ProxyClass
having no constructor arguments
using the given ProxyInvocationHandler
(H) instance.UnsupportedOperationException
- if this
is not a JDK1.3 proxy class.public abstract Proxy newInstanceH(Object h, Object[] args)
Proxy
having
the given constructor arguments using the given
ProxyInvocationHandler
(H) instance. The
parameters are gathered by fetching the Class
for
each argument.UnsupportedOperationException
- if this
is not a JDK1.3 proxy class.public abstract Proxy newInstanceH(Object h, Class[] params, Object[] args)
Proxy
having
the given constructor parameters and arguments using the given
ProxyInvocationHandler
(H) instance. This
invocation handler will be passed to the
java.lang.reflect.Proxy.newProxyInstance
method
and MUST be assignable to
org.inxar.hotswap.ProxyInvocationHandler
. The
parameter type is given here as Object
rather than
ProxyInvocationHandler
in order to avoid
classloading of JDK1.3
dependent classes in a
JDK1.2
environment.
UnsupportedOperationException
- if this
is not a JDK1.3 proxy class.public ProxyClassLoader getProxyClassLoader()
ProxyClassLoader
that created
this ProxyClass
.public ClassLoader getParentClassLoader()
ClassLoader
. If none has been
explicitly set, the return values is
getProxyClassLoader().getDefaultParentClassLoader()
.public void setParentClassLoader(ClassLoader parent)
ClassLoader
to be used by this
class. This ClassLoader
is used as thepublic ProxyCompiler getProxyCompiler()
ProxyCompiler
used by this class.public void setProxyCompiler(ProxyCompiler compiler)
ProxyCompiler
to be used by this class.public boolean isJDK13()
true
if this method is a
JDK1.3
proxy class.public long getLastClassload()
0L
if no class has been loaded.public ProxyResource getSourcefile()
ProxyResource
for this
ProxyClass
.public ProxyResource getClassfile()
ProxyResource
for this
ProxyClass
.public String getName()
ProxyClass.getClassInstance().getName()
.public int getStatus()
ProxyClass
as
determined by the ProxyCompiler.getStatus
method.public Class getClassInstance()
Class
instance that this
ProxyClass
contains.public void addHotSwapListener(ProxyEventListener l)
ProxyHotSwapEvent
notifications.public void removeHotSwapListener(ProxyEventListener l)
ProxyHotSwapEvent
notifications.public void addCompileListener(ProxyEventListener l)
ProxyCompileEvent
notifications.public void removeCompileListener(ProxyEventListener l)
ProxyCompileEvent
notifications.public void addClassSwapListener(ProxyEventListener l)
ProxyClassSwapEvent
notifications.public void removeClassSwapListener(ProxyEventListener l)
ProxyClassSwapEvent
notifications.public boolean hotswap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |