|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.aop.instrument.WrapperTransformer
This class is responsible for wrapping joinpoints.
In this context, wrapping means just changing a joinpoint status according
to it's wrapping state.
A joinpoint is identified by a class member and a transformation text, because
there may be more than one joinpoint associated with a classe member, and
whe have to differentiate them (pick, for exemple, the field read and field write
joinpoints; in this case we have two joinponts associated with a single field).
When more than a joinpont is associated with a class member, we say that there is
more than one transformation type available to be applied to this class member.
The transformation types available to a member are identified by a String
array passed to WrapperTransformer constructor.
There must be a WrapperTransformer instance for each transformer. That
means that when we talk about transformation types available to a class member, we mean
the member associated with the transformer (for exemple, in the case of
ConstructorExecutionTransformer, the member is a constructor).
| Field Summary | |
protected static String[] |
SINGLE_TRANSFORMATION
May be used as the transformations array in the constructor, if a class
member will be affected by only one type of transformation. |
protected static int |
SINGLE_TRANSFORMATION_INDEX
Index that identifies the single transformation contained in SINGLE_TRANSFORMATION. |
| Constructor Summary | |
WrapperTransformer(String[] transformations)
Creates a wrapper transformer. |
|
| Method Summary | |
boolean |
isNotPrepared(javassist.CtMember member,
int transformationIndex)
Checks if the joinpoint is not prepared. |
boolean |
isWrapped(javassist.CtMember member,
int transformationIndex)
Checks if the joinpoint is wrapped. |
void |
prepareForWrapping(javassist.CtMember member,
int transformationIndex)
Prepares the joinpoint for wrapping. |
void |
unwrap(javassist.CtMember member,
int transformationIndex)
Unwraps the joinpoint. |
void |
wrap(javassist.CtMember member,
int transformationIndex)
Wraps the joinpoint. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final String[] SINGLE_TRANSFORMATION
transformations array in the constructor, if a class
member will be affected by only one type of transformation. In this case, a joinpoint
can be identified only by a class member.
protected static final int SINGLE_TRANSFORMATION_INDEX
SINGLE_TRANSFORMATION.
If SINGLE_TRANSFORMATION was passed as the transformations
argument to the constructor, this variable has to be used as the transformation index value
in the WrapperTransformer methods calls.
| Constructor Detail |
public WrapperTransformer(String[] transformations)
transformations - list of all transformations that may be applied
to a joinpoint. It may be SINGLE_TRANSFORMATION if
a class member will be affected by only one type of transformation (i. e. if
a joinpont can be identified only by the class member).| Method Detail |
public void prepareForWrapping(javassist.CtMember member,
int transformationIndex)
member - the member associated with the joinpoint.transformationIndex - index of the transformation text which, along with
member, identifies the joinpoint to be prepared.
public void wrap(javassist.CtMember member,
int transformationIndex)
member - the member associated with the joinpoint.transformationIndex - index of the transformation text which, along with
member, identifies the joinpoint to be wrapped.
public void unwrap(javassist.CtMember member,
int transformationIndex)
member - the member associated with the joinpoint.transformationIndex - index of the transformation text which, along with
member, identifies the joinpoint to be unwrapped.
public boolean isNotPrepared(javassist.CtMember member,
int transformationIndex)
member - the member associated with the joinpoint.transformationIndex - index of the transformation text which, along with
member, identifies the joinpoint whose status will be checked.
public boolean isWrapped(javassist.CtMember member,
int transformationIndex)
member - the member associated with the joinpoint.transformationIndex - index of the transformation text which, along with
member, identifies the joinpoint whose status will be checked.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||