|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.aop.GeneratedInstanceAdvisorMixin
public class GeneratedInstanceAdvisorMixin
Adapts the old instance advisor api to the new generated advisor stuff. Old API calls on generated instance advisors will delegate to this class
Nested Class Summary | |
---|---|
class |
GeneratedInstanceAdvisorMixin.InstanceInterceptorFactory
|
Field Summary | |
---|---|
protected ArrayList<Interceptor> |
appendedInterceptors
|
boolean |
hasInstanceAspects
|
protected ArrayList<Interceptor> |
insertedInterceptors
|
protected WeakReference<Object> |
instanceRef
|
Constructor Summary | |
---|---|
GeneratedInstanceAdvisorMixin()
|
|
GeneratedInstanceAdvisorMixin(Object instance,
GeneratedClassAdvisor genadvisor)
|
Method Summary | |
---|---|
void |
appendInterceptor(Interceptor interceptor)
Appends an interceptor to the end of the instance's interceptor chain. |
void |
appendInterceptor(int index,
Interceptor interceptor)
Appends an interceptor at position index of the appended instance's
interceptor chain. |
void |
appendInterceptorStack(String stackName)
Appends an interceptor chain to the end of the instance's interceptor chain. |
protected void |
finalize()
Added to notify interceptor chain observer of interceptor chain garbage collection. |
Domain |
getDomain()
Returns the domain where this advisor belongs. |
Object |
getInstance()
Returns the advised instance managed by this advisor. |
Interceptor[] |
getInterceptors()
Returns the interceptor chain of the advised instance. |
Interceptor[] |
getInterceptors(Interceptor[] advisorChain)
Called by the advisor |
SimpleMetaData |
getMetaData()
Returns the metadata bound to the advised instance. |
Object |
getPerInstanceAspect(AspectDefinition def)
Returns a per instance aspect object defined by def . |
Object |
getPerInstanceAspect(String def)
Returns a per instance aspect object identified by aspectName . |
Object |
getPerInstanceJoinpointAspect(Joinpoint joinpoint,
AspectDefinition def)
Returns the per instance joinpoint aspect object defined by def to be
applied at joipoint . |
GeneratedAdvisorInterceptor[] |
getWrappers()
|
Interceptor[] |
getWrappers(Interceptor[] advisorChain)
Called by the advisor |
boolean |
hasAspects()
Indicates whether there are instance aspects bound to the instance advised. |
boolean |
hasInterceptors()
Indicates if the advised instance interceptor chain is not empty. |
void |
insertInterceptor(Interceptor interceptor)
Inserts an interceptor at the beginning of the instance's interceptor chain. |
void |
insertInterceptor(int index,
Interceptor interceptor)
Inserts an interceptor at position index of the inserted instance's
interceptor chain. |
void |
insertInterceptorStack(String stackName)
Inserts an interceptor stack to the beginning of the instance's interceptor chain. |
void |
removeInterceptor(String name)
This will not remove interceptor pointcuts! You will have to do this through AspectManager |
void |
removeInterceptorStack(String stackName)
Removes an interceptor stack from the instance's interceptor chain. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ArrayList<Interceptor> insertedInterceptors
protected ArrayList<Interceptor> appendedInterceptors
protected WeakReference<Object> instanceRef
public boolean hasInstanceAspects
Constructor Detail |
---|
public GeneratedInstanceAdvisorMixin()
public GeneratedInstanceAdvisorMixin(Object instance, GeneratedClassAdvisor genadvisor)
Method Detail |
---|
public boolean hasInterceptors()
InstanceAdvisor
hasInterceptors
in interface InstanceAdvisor
true
if the advised instance interceptor chain contains one
or more elements.public Object getPerInstanceAspect(String def)
InstanceAdvisor
aspectName
.
For internal use only.
getPerInstanceAspect
in interface InstanceAdvisor
def
- name of the queried aspect
aspectName
public Object getPerInstanceAspect(AspectDefinition def)
InstanceAdvisor
def
.
For internal use only.
getPerInstanceAspect
in interface InstanceAdvisor
def
- definition of the queried aspect
def
public Object getPerInstanceJoinpointAspect(Joinpoint joinpoint, AspectDefinition def)
InstanceAdvisor
def
to be
applied at joipoint
.
For internal use only.
getPerInstanceJoinpointAspect
in interface InstanceAdvisor
joinpoint
- the joinpoint to which the aspect object will be applied.def
- definition of the queried aspect
def
to be applied
at joinpoint
public SimpleMetaData getMetaData()
InstanceAdvisor
getMetaData
in interface InstanceAdvisor
public Interceptor[] getInterceptors()
InstanceAdvisor
For internal use only.
getInterceptors
in interface InstanceAdvisor
public Interceptor[] getInterceptors(Interceptor[] advisorChain)
getInterceptors
in interface InstanceAdvisor
advisorChain
- the chain to be joined with the advised instance's chain.
baseChain
with the instance's chain. May return baseChain
if the last one
is empty.public GeneratedAdvisorInterceptor[] getWrappers()
public Interceptor[] getWrappers(Interceptor[] advisorChain)
An
- array of GeneratedAdvisorInterceptor from the advisor's intereceptor chain for the joinpoint
public void insertInterceptor(int index, Interceptor interceptor)
InstanceAdvisor
index
of the inserted instance's
interceptor chain.
insertInterceptor
in interface InstanceAdvisor
index
- the position where to insert interceptor
. This value must
not be greater than or equal to the number of inserted interceptors in
the chain.interceptor
- the interceptor to be added to the instance's chain.public void insertInterceptor(Interceptor interceptor)
InstanceAdvisor
insertInterceptor
in interface InstanceAdvisor
interceptor
- the interceptor to be added to the instance's chain.public void appendInterceptor(Interceptor interceptor)
InstanceAdvisor
appendInterceptor
in interface InstanceAdvisor
interceptor
- the interceptor to be appended to the instance's chainpublic void appendInterceptor(int index, Interceptor interceptor)
InstanceAdvisor
index
of the appended instance's
interceptor chain.
appendInterceptor
in interface InstanceAdvisor
index
- the position where to insert interceptor
. This value must
not be greater than or equal to the number of appended interceptors in
the chain.interceptor
- the interceptor to be added to the instance's chain.public void removeInterceptor(String name)
removeInterceptor
in interface InstanceAdvisor
name
- name of the interceptor to be removed from the chain.Interceptor.getName()
public final boolean hasAspects()
InstanceAdvisor
InstanceAdvisor.hasInterceptors()
.
hasAspects
in interface InstanceAdvisor
true
if there is one or more aspects bound to this advised
instance.public void insertInterceptorStack(String stackName)
InstanceAdvisor
insertInterceptorStack
in interface InstanceAdvisor
stackName
- the name that identifies the interceptor stack to be insertedpublic void appendInterceptorStack(String stackName)
InstanceAdvisor
appendInterceptorStack
in interface InstanceAdvisor
stackName
- the name that identifies the interceptor stack to be appendedpublic void removeInterceptorStack(String stackName)
InstanceAdvisor
removeInterceptorStack
in interface InstanceAdvisor
stackName
- the name that identifies the interceptor stack to be removedpublic Domain getDomain()
InstanceAdvisor
getDomain
in interface InstanceAdvisor
protected void finalize()
finalize
in class Object
public Object getInstance()
InstanceAdvisor
getInstance
in interface InstanceAdvisor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |